Skip to content

Commit e738a7a

Browse files
committed
alignment
1 parent f801afb commit e738a7a

File tree

8 files changed

+34
-0
lines changed

8 files changed

+34
-0
lines changed

src/sempy_labs/_capacities.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,7 @@ def list_skus(
752752
return df
753753

754754

755+
@log
755756
def list_subscriptions(token_provider: TokenProvider) -> pd.DataFrame:
756757
"""
757758
Gets all subscriptions for a tenant.
@@ -811,6 +812,7 @@ def list_subscriptions(token_provider: TokenProvider) -> pd.DataFrame:
811812
return df
812813

813814

815+
@log
814816
def get_subscription(
815817
azure_subscription_id: str, token_provider: TokenProvider
816818
) -> pd.DataFrame:
@@ -897,6 +899,7 @@ def _resolve_subscription_name_and_id(
897899
return subscription_name, subscription_id
898900

899901

902+
@log
900903
def list_tenants(token_provider: TokenProvider) -> pd.DataFrame:
901904
"""
902905
Gets the tenants for your account.
@@ -951,6 +954,7 @@ def list_tenants(token_provider: TokenProvider) -> pd.DataFrame:
951954
return df
952955

953956

957+
@log
954958
def create_or_update_resource_group(
955959
azure_subscription_id: str,
956960
resource_group: str,
@@ -990,6 +994,7 @@ def create_or_update_resource_group(
990994
)
991995

992996

997+
@log
993998
def create_storage_account(
994999
azure_subscription_id: str,
9951000
resource_group: str,
@@ -1035,6 +1040,7 @@ def create_storage_account(
10351040
)
10361041

10371042

1043+
@log
10381044
def list_storage_accounts(
10391045
azure_subscription_id: str,
10401046
token_provider: TokenProvider,
@@ -1134,6 +1140,7 @@ def list_storage_accounts(
11341140
return df
11351141

11361142

1143+
@log
11371144
def check_resource_group_existence(
11381145
azure_subscription_id: str, resource_group: str, token_provider: TokenProvider
11391146
) -> bool:
@@ -1171,6 +1178,7 @@ def check_resource_group_existence(
11711178
return False
11721179

11731180

1181+
@log
11741182
def list_resource_groups(
11751183
azure_subscription_id: str,
11761184
token_provider: TokenProvider,
@@ -1231,6 +1239,7 @@ def list_resource_groups(
12311239
return df
12321240

12331241

1242+
@log
12341243
def get_resource_group(
12351244
azure_subscription_id: str, resource_group: str, token_provider: TokenProvider
12361245
) -> pd.DataFrame:

src/sempy_labs/_clear_cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from uuid import UUID
1414

1515

16+
@log
1617
def clear_cache(dataset: str | UUID, workspace: Optional[str | UUID] = None):
1718
"""
1819
Clears the cache of a semantic model.

src/sempy_labs/_gateways.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sempy.fabric as fabric
2+
from sempy._utils._log import log
23
import pandas as pd
34
from typing import Optional
45
from sempy.fabric.exceptions import FabricHTTPException
@@ -13,6 +14,7 @@
1314
import sempy_labs._icons as icons
1415

1516

17+
@log
1618
def list_gateways() -> pd.DataFrame:
1719
"""
1820
Returns a list of all gateways the user has permission for, including on-premises, on-premises (personal mode), and virtual network gateways.

src/sempy_labs/_generate_semantic_model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import json
44
import os
55
from typing import Optional, List
6+
from sempy._utils._log import log
67
from sempy_labs._helper_functions import (
78
resolve_lakehouse_name,
89
resolve_workspace_name_and_id,
@@ -242,6 +243,7 @@ def update_semantic_model_from_bim(
242243
)
243244

244245

246+
@log
245247
def deploy_semantic_model(
246248
source_dataset: str,
247249
source_workspace: Optional[str | UUID] = None,

src/sempy_labs/_job_scheduler.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sempy.fabric as fabric
2+
from sempy._utils._log import log
23
import pandas as pd
34
from typing import Optional
45
from sempy_labs._helper_functions import (
@@ -12,6 +13,7 @@
1213
import sempy_labs._icons as icons
1314

1415

16+
@log
1517
def list_item_job_instances(
1618
item: str | UUID, type: Optional[str] = None, workspace: Optional[str | UUID] = None
1719
) -> pd.DataFrame:
@@ -96,6 +98,7 @@ def list_item_job_instances(
9698
return df
9799

98100

101+
@log
99102
def list_item_schedules(
100103
item: str | UUID,
101104
type: Optional[str] = None,
@@ -183,6 +186,7 @@ def list_item_schedules(
183186
return df
184187

185188

189+
@log
186190
def run_on_demand_item_job(
187191
item: str | UUID,
188192
type: Optional[str] = None,

src/sempy_labs/_notebooks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from typing import Optional
55
import base64
66
import requests
7+
from sempy._utils._log import log
78
from sempy_labs._helper_functions import (
89
resolve_workspace_name_and_id,
910
lro,
@@ -91,6 +92,7 @@ def get_notebook_definition(
9192
return result
9293

9394

95+
@log
9496
def import_notebook_from_web(
9597
notebook_name: str,
9698
url: str,

src/sempy_labs/_query_scale_out.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
resolve_workspace_name_and_id,
55
resolve_dataset_name_and_id,
66
)
7+
from sempy._utils._log import log
78
from typing import Optional, Tuple
89
import sempy_labs._icons as icons
910
from sempy.fabric.exceptions import FabricHTTPException
1011
from uuid import UUID
1112

1213

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

4345

46+
@log
4447
def qso_sync_status(
4548
dataset: str | UUID, workspace: Optional[str | UUID] = None
4649
) -> Tuple[pd.DataFrame, pd.DataFrame]:
@@ -140,6 +143,7 @@ def qso_sync_status(
140143
return df, dfRep
141144

142145

146+
@log
143147
def disable_qso(
144148
dataset: str | UUID, workspace: Optional[str | UUID] = None
145149
) -> pd.DataFrame:
@@ -184,6 +188,7 @@ def disable_qso(
184188
return df
185189

186190

191+
@log
187192
def set_qso(
188193
dataset: str | UUID,
189194
auto_sync: bool = True,
@@ -259,6 +264,7 @@ def set_qso(
259264
return df
260265

261266

267+
@log
262268
def set_semantic_model_storage_format(
263269
dataset: str | UUID, storage_format: str, workspace: Optional[str | UUID] = None
264270
):
@@ -318,6 +324,7 @@ def set_semantic_model_storage_format(
318324
)
319325

320326

327+
@log
321328
def list_qso_settings(
322329
dataset: Optional[str | UUID] = None, workspace: Optional[str | UUID] = None
323330
) -> pd.DataFrame:
@@ -384,6 +391,7 @@ def list_qso_settings(
384391
return df
385392

386393

394+
@log
387395
def set_workspace_default_storage_format(
388396
storage_format: str, workspace: Optional[str | UUID] = None
389397
):

src/sempy_labs/admin/_basic_functions.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
_is_valid_uuid,
99
_build_url,
1010
)
11+
from sempy._utils._log import log
1112
import numpy as np
1213
import pandas as pd
1314
from dateutil.parser import parse as dtparser
1415
from sempy.fabric._token_provider import TokenProvider
1516

1617

18+
@log
1719
def list_workspaces(
1820
capacity: Optional[str | UUID] = None,
1921
workspace: Optional[str | UUID] = None,
@@ -125,6 +127,7 @@ def list_workspaces(
125127
return df
126128

127129

130+
@log
128131
def list_capacities(
129132
capacity: Optional[str | UUID] = None,
130133
token_provider: Optional[TokenProvider] = None,
@@ -180,6 +183,7 @@ def list_capacities(
180183
return df
181184

182185

186+
@log
183187
def assign_workspaces_to_capacity(
184188
source_capacity: Optional[str | UUID] = None,
185189
target_capacity: Optional[str | UUID] = None,
@@ -271,6 +275,7 @@ def assign_workspaces_to_capacity(
271275
)
272276

273277

278+
@log
274279
def unassign_workspaces_from_capacity(
275280
workspaces: str | List[str] | UUID | List[UUID],
276281
):
@@ -312,6 +317,7 @@ def unassign_workspaces_from_capacity(
312317
)
313318

314319

320+
@log
315321
def list_tenant_settings(
316322
token_provider: Optional[TokenProvider] = None,
317323
) -> pd.DataFrame:

0 commit comments

Comments
 (0)