Skip to content

Commit

Permalink
alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kovalsky committed Jan 9, 2025
1 parent f801afb commit e738a7a
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/sempy_labs/_capacities.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ def list_skus(
return df


@log
def list_subscriptions(token_provider: TokenProvider) -> pd.DataFrame:
"""
Gets all subscriptions for a tenant.
Expand Down Expand Up @@ -811,6 +812,7 @@ def list_subscriptions(token_provider: TokenProvider) -> pd.DataFrame:
return df


@log
def get_subscription(
azure_subscription_id: str, token_provider: TokenProvider
) -> pd.DataFrame:
Expand Down Expand Up @@ -897,6 +899,7 @@ def _resolve_subscription_name_and_id(
return subscription_name, subscription_id


@log
def list_tenants(token_provider: TokenProvider) -> pd.DataFrame:
"""
Gets the tenants for your account.
Expand Down Expand Up @@ -951,6 +954,7 @@ def list_tenants(token_provider: TokenProvider) -> pd.DataFrame:
return df


@log
def create_or_update_resource_group(
azure_subscription_id: str,
resource_group: str,
Expand Down Expand Up @@ -990,6 +994,7 @@ def create_or_update_resource_group(
)


@log
def create_storage_account(
azure_subscription_id: str,
resource_group: str,
Expand Down Expand Up @@ -1035,6 +1040,7 @@ def create_storage_account(
)


@log
def list_storage_accounts(
azure_subscription_id: str,
token_provider: TokenProvider,
Expand Down Expand Up @@ -1134,6 +1140,7 @@ def list_storage_accounts(
return df


@log
def check_resource_group_existence(
azure_subscription_id: str, resource_group: str, token_provider: TokenProvider
) -> bool:
Expand Down Expand Up @@ -1171,6 +1178,7 @@ def check_resource_group_existence(
return False


@log
def list_resource_groups(
azure_subscription_id: str,
token_provider: TokenProvider,
Expand Down Expand Up @@ -1231,6 +1239,7 @@ def list_resource_groups(
return df


@log
def get_resource_group(
azure_subscription_id: str, resource_group: str, token_provider: TokenProvider
) -> pd.DataFrame:
Expand Down
1 change: 1 addition & 0 deletions src/sempy_labs/_clear_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from uuid import UUID


@log
def clear_cache(dataset: str | UUID, workspace: Optional[str | UUID] = None):
"""
Clears the cache of a semantic model.
Expand Down
2 changes: 2 additions & 0 deletions src/sempy_labs/_gateways.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sempy.fabric as fabric
from sempy._utils._log import log
import pandas as pd
from typing import Optional
from sempy.fabric.exceptions import FabricHTTPException
Expand All @@ -13,6 +14,7 @@
import sempy_labs._icons as icons


@log
def list_gateways() -> pd.DataFrame:
"""
Returns a list of all gateways the user has permission for, including on-premises, on-premises (personal mode), and virtual network gateways.
Expand Down
2 changes: 2 additions & 0 deletions src/sempy_labs/_generate_semantic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json
import os
from typing import Optional, List
from sempy._utils._log import log
from sempy_labs._helper_functions import (
resolve_lakehouse_name,
resolve_workspace_name_and_id,
Expand Down Expand Up @@ -242,6 +243,7 @@ def update_semantic_model_from_bim(
)


@log
def deploy_semantic_model(
source_dataset: str,
source_workspace: Optional[str | UUID] = None,
Expand Down
4 changes: 4 additions & 0 deletions src/sempy_labs/_job_scheduler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sempy.fabric as fabric
from sempy._utils._log import log
import pandas as pd
from typing import Optional
from sempy_labs._helper_functions import (
Expand All @@ -12,6 +13,7 @@
import sempy_labs._icons as icons


@log
def list_item_job_instances(
item: str | UUID, type: Optional[str] = None, workspace: Optional[str | UUID] = None
) -> pd.DataFrame:
Expand Down Expand Up @@ -96,6 +98,7 @@ def list_item_job_instances(
return df


@log
def list_item_schedules(
item: str | UUID,
type: Optional[str] = None,
Expand Down Expand Up @@ -183,6 +186,7 @@ def list_item_schedules(
return df


@log
def run_on_demand_item_job(
item: str | UUID,
type: Optional[str] = None,
Expand Down
2 changes: 2 additions & 0 deletions src/sempy_labs/_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Optional
import base64
import requests
from sempy._utils._log import log
from sempy_labs._helper_functions import (
resolve_workspace_name_and_id,
lro,
Expand Down Expand Up @@ -91,6 +92,7 @@ def get_notebook_definition(
return result


@log
def import_notebook_from_web(
notebook_name: str,
url: str,
Expand Down
8 changes: 8 additions & 0 deletions src/sempy_labs/_query_scale_out.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
resolve_workspace_name_and_id,
resolve_dataset_name_and_id,
)
from sempy._utils._log import log
from typing import Optional, Tuple
import sempy_labs._icons as icons
from sempy.fabric.exceptions import FabricHTTPException
from uuid import UUID


@log
def qso_sync(dataset: str | UUID, workspace: Optional[str | UUID] = None):
"""
Triggers a query scale-out sync of read-only replicas for the specified dataset from the specified workspace.
Expand Down Expand Up @@ -41,6 +43,7 @@ def qso_sync(dataset: str | UUID, workspace: Optional[str | UUID] = None):
)


@log
def qso_sync_status(
dataset: str | UUID, workspace: Optional[str | UUID] = None
) -> Tuple[pd.DataFrame, pd.DataFrame]:
Expand Down Expand Up @@ -140,6 +143,7 @@ def qso_sync_status(
return df, dfRep


@log
def disable_qso(
dataset: str | UUID, workspace: Optional[str | UUID] = None
) -> pd.DataFrame:
Expand Down Expand Up @@ -184,6 +188,7 @@ def disable_qso(
return df


@log
def set_qso(
dataset: str | UUID,
auto_sync: bool = True,
Expand Down Expand Up @@ -259,6 +264,7 @@ def set_qso(
return df


@log
def set_semantic_model_storage_format(
dataset: str | UUID, storage_format: str, workspace: Optional[str | UUID] = None
):
Expand Down Expand Up @@ -318,6 +324,7 @@ def set_semantic_model_storage_format(
)


@log
def list_qso_settings(
dataset: Optional[str | UUID] = None, workspace: Optional[str | UUID] = None
) -> pd.DataFrame:
Expand Down Expand Up @@ -384,6 +391,7 @@ def list_qso_settings(
return df


@log
def set_workspace_default_storage_format(
storage_format: str, workspace: Optional[str | UUID] = None
):
Expand Down
6 changes: 6 additions & 0 deletions src/sempy_labs/admin/_basic_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
_is_valid_uuid,
_build_url,
)
from sempy._utils._log import log
import numpy as np
import pandas as pd
from dateutil.parser import parse as dtparser
from sempy.fabric._token_provider import TokenProvider


@log
def list_workspaces(
capacity: Optional[str | UUID] = None,
workspace: Optional[str | UUID] = None,
Expand Down Expand Up @@ -125,6 +127,7 @@ def list_workspaces(
return df


@log
def list_capacities(
capacity: Optional[str | UUID] = None,
token_provider: Optional[TokenProvider] = None,
Expand Down Expand Up @@ -180,6 +183,7 @@ def list_capacities(
return df


@log
def assign_workspaces_to_capacity(
source_capacity: Optional[str | UUID] = None,
target_capacity: Optional[str | UUID] = None,
Expand Down Expand Up @@ -271,6 +275,7 @@ def assign_workspaces_to_capacity(
)


@log
def unassign_workspaces_from_capacity(
workspaces: str | List[str] | UUID | List[UUID],
):
Expand Down Expand Up @@ -312,6 +317,7 @@ def unassign_workspaces_from_capacity(
)


@log
def list_tenant_settings(
token_provider: Optional[TokenProvider] = None,
) -> pd.DataFrame:
Expand Down

0 comments on commit e738a7a

Please sign in to comment.