semantic-link-labs 0.8.5__py3-none-any.whl → 0.8.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of semantic-link-labs might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: semantic-link-labs
3
- Version: 0.8.5
3
+ Version: 0.8.6
4
4
  Summary: Semantic Link Labs for Microsoft Fabric
5
5
  Author: Microsoft Corporation
6
6
  License: MIT License
@@ -27,7 +27,7 @@ Requires-Dist: pytest >=8.2.1 ; extra == 'test'
27
27
  # Semantic Link Labs
28
28
 
29
29
  [![PyPI version](https://badge.fury.io/py/semantic-link-labs.svg)](https://badge.fury.io/py/semantic-link-labs)
30
- [![Read The Docs](https://readthedocs.org/projects/semantic-link-labs/badge/?version=0.8.5&style=flat)](https://readthedocs.org/projects/semantic-link-labs/)
30
+ [![Read The Docs](https://readthedocs.org/projects/semantic-link-labs/badge/?version=0.8.6&style=flat)](https://readthedocs.org/projects/semantic-link-labs/)
31
31
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
32
32
  [![Downloads](https://static.pepy.tech/badge/semantic-link-labs)](https://pepy.tech/project/semantic-link-labs)
33
33
 
@@ -134,6 +134,7 @@ An even better way to ensure the semantic-link-labs library is available in your
134
134
  2. Select your newly created environment within the 'Environment' drop down in the navigation bar at the top of the notebook
135
135
 
136
136
  ## Version History
137
+ * [0.8.6](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.6) (November 14, 2024)
137
138
  * [0.8.5](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.5) (November 13, 2024)
138
139
  * [0.8.4](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.4) (October 30, 2024)
139
140
  * [0.8.3](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.3) (October 14, 2024)
@@ -27,9 +27,9 @@ sempy_labs/_ml_experiments.py,sha256=UVh3cwNvpY-otCBIaKW-sgtzyjwAuu8qJDLhZGBHToE
27
27
  sempy_labs/_ml_models.py,sha256=phYLySjN7MO2YYfq7ZQKMS6w18G6L1-7DdNWB4fcLjQ,4044
28
28
  sempy_labs/_model_auto_build.py,sha256=-qDwmFx3KMuIaaUU8CzmCX7CF7ZUVWWu-_GH2UhAU_8,5045
29
29
  sempy_labs/_model_bpa.py,sha256=So6-33PiogMBXwtt_drPsBDNVBp7rXJm-caADuXKseE,22268
30
- sempy_labs/_model_bpa_bulk.py,sha256=W7BOOI-sgMTIoKr8_NnhJswPK4t9x79hdP5kTVYpdkY,15690
30
+ sempy_labs/_model_bpa_bulk.py,sha256=NDNdPPj6wkk4jvWzhdl61MAlAK9_GsdK0juvC9-LgmY,15956
31
31
  sempy_labs/_model_bpa_rules.py,sha256=96_GkXQGhON-_uyUATgUibk4W9y7e9wl1QciUr96gIQ,45544
32
- sempy_labs/_model_dependencies.py,sha256=iQLDiwvClmaV6fHH0nRGksHG_GBmJK3NW4stIitmCSQ,11647
32
+ sempy_labs/_model_dependencies.py,sha256=D_I3nwBMJ8YaxVz4x-W3P5qHjtukYdjH_FSFrvhsE94,11676
33
33
  sempy_labs/_notebooks.py,sha256=EUYVeRJrCL9IllQevwRxzkCUU-rzX6KEEH7x7mBYUqc,7422
34
34
  sempy_labs/_one_lake_integration.py,sha256=eIuLxlw8eXfUH2avKhsyLmXZbTllSwGsz2j_HMAikpQ,6234
35
35
  sempy_labs/_query_scale_out.py,sha256=xoHnuDUgPYsg-NlUplB9ieb0bClcBQeG4veJNo_4TNw,15708
@@ -102,7 +102,7 @@ sempy_labs/lakehouse/_get_lakehouse_tables.py,sha256=zizPKtwDojIN6wbPhrQOUL6-_-k
102
102
  sempy_labs/lakehouse/_lakehouse.py,sha256=_yn0ySUrJQD9nySa3gFpEGr6AvF-vOKIMNJruotfxHQ,5224
103
103
  sempy_labs/lakehouse/_shortcuts.py,sha256=tHkeLcSOiDv36XFysyiQBSKsq9-ohb20vXziU-lf0G4,7337
104
104
  sempy_labs/migration/__init__.py,sha256=w4vvGk6wTWXVfofJDmio2yIFvSSJsxOpjv6mvNGmrOI,1043
105
- sempy_labs/migration/_create_pqt_file.py,sha256=RgRo1lG9lex9Xwe5dwSJ2udHiE7w0N_a5BilS2cX6xo,9320
105
+ sempy_labs/migration/_create_pqt_file.py,sha256=oJJrHfwkq32p_UKBFi0LccjaVI5j4CbRvtYhnDC0b6c,9391
106
106
  sempy_labs/migration/_migrate_calctables_to_lakehouse.py,sha256=5fSZHylS8yLmk7maYDsvKbOqB9unxT4sQZq5HxBZwQY,17969
107
107
  sempy_labs/migration/_migrate_calctables_to_semantic_model.py,sha256=yNSx126ru7-mUXI3iISwmw8a5jRCwcWw4l5eMXldrcU,6253
108
108
  sempy_labs/migration/_migrate_model_objects_to_semantic_model.py,sha256=8IN45AKxic3_4yrC-N5rqWMzO6bCLF9qoyWxbxrvBHc,22900
@@ -151,9 +151,9 @@ sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visua
151
151
  sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/page.json,sha256=wBVuNc8S2NaUA0FC708w6stmR2djNZp8nAsHMqesgsc,293
152
152
  sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/visuals/ce8532a7e25020271077/visual.json,sha256=mlY6t9OlSe-Y6_QmXJpS1vggU6Y3FjISUKECL8FVSg8,931
153
153
  sempy_labs/tom/__init__.py,sha256=Qbs8leW0fjzvWwOjyWK3Hjeehu7IvpB1beASGsi28bk,121
154
- sempy_labs/tom/_model.py,sha256=gW0uR-Fx8zNkaIZS6wUTtEJeYQjMsbcaSft9lv9SGGA,172011
155
- semantic_link_labs-0.8.5.dist-info/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
156
- semantic_link_labs-0.8.5.dist-info/METADATA,sha256=K5_wjyzRaw-p85GzF4laagXYMFuSIxR0ypuXx6nadno,19241
157
- semantic_link_labs-0.8.5.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
158
- semantic_link_labs-0.8.5.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
159
- semantic_link_labs-0.8.5.dist-info/RECORD,,
154
+ sempy_labs/tom/_model.py,sha256=_LEi6Lw7XwQgMGSCSwGL7MFQu5AgyAnMOHkXT-x4pow,172012
155
+ semantic_link_labs-0.8.6.dist-info/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
156
+ semantic_link_labs-0.8.6.dist-info/METADATA,sha256=o8z5fU7xNgxxUX3AXeynfrRSu8LN9_nRuMLPV4GJUrE,19339
157
+ semantic_link_labs-0.8.6.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
158
+ semantic_link_labs-0.8.6.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
159
+ semantic_link_labs-0.8.6.dist-info/RECORD,,
@@ -101,8 +101,11 @@ def run_model_bpa_bulk(
101
101
  dfD = fabric.list_datasets(workspace=wksp, mode="rest")
102
102
 
103
103
  # Skip models in workspace
104
- skip_models_wkspc = skip_models_in_workspace.get(wksp)
105
- dfD = dfD[~dfD["Dataset Name"].isin(skip_models_wkspc)]
104
+ if skip_models_in_workspace is not None and isinstance(
105
+ skip_models_in_workspace, dict
106
+ ):
107
+ skip_models_wkspc = skip_models_in_workspace.get(wksp)
108
+ dfD = dfD[~dfD["Dataset Name"].isin(skip_models_wkspc)]
106
109
 
107
110
  # Exclude default semantic models
108
111
  if len(dfD) > 0:
@@ -145,7 +148,10 @@ def run_model_bpa_bulk(
145
148
 
146
149
  bpa_df["RunId"] = bpa_df["RunId"].astype("int")
147
150
 
148
- df = pd.concat([df, bpa_df], ignore_index=True)
151
+ if df.empty:
152
+ df = bpa_df
153
+ if not bpa_df.empty:
154
+ df = pd.concat([df, bpa_df], ignore_index=True)
149
155
  print(
150
156
  f"{icons.green_dot} Collected Model BPA stats for the '{dataset_name}' semantic model within the '{wksp}' workspace."
151
157
  )
@@ -160,7 +166,7 @@ def run_model_bpa_bulk(
160
166
  f"{icons.yellow_dot} No BPA results to save for the '{wksp}' workspace."
161
167
  )
162
168
  else:
163
- df["Severity"].replace(icons.severity_mapping)
169
+ df["Severity"].replace(icons.severity_mapping, inplace=True)
164
170
 
165
171
  # Append save results individually for each workspace (so as not to create a giant dataframe)
166
172
  print(
@@ -190,7 +190,9 @@ def get_model_calc_dependencies(
190
190
  # Initialize dependency DataFrame with 'Done' status
191
191
  df = dep.copy()
192
192
  objs = {"Measure", "Calc Column", "Calculation Item", "Calc Table"}
193
- df["Done"] = df["Referenced Object Type"].apply(lambda x: x not in objs)
193
+ df["Done"] = (
194
+ df["Referenced Object Type"].apply(lambda x: x not in objs).astype(bool)
195
+ )
194
196
  # Expand dependencies iteratively
195
197
  while not df["Done"].all():
196
198
  incomplete_rows = df[df["Done"] == False]
@@ -226,6 +226,8 @@ def create_pqt_file(
226
226
  a = 0
227
227
  for t_map in table_chunks:
228
228
  if a > 0:
229
- file_name = f"{file_name}_{a}"
229
+ save_file_name = f"{file_name}_{a}"
230
+ else:
231
+ save_file_name = file_name
230
232
  a += 1
231
- create_pqt(t_map, expr_map, file_name=file_name)
233
+ create_pqt(t_map, expr_map, file_name=save_file_name)
sempy_labs/tom/_model.py CHANGED
@@ -2278,7 +2278,7 @@ class TOMWrapper:
2278
2278
  t = self.model.Tables[table_name]
2279
2279
 
2280
2280
  return (
2281
- self.is_field_parameter(table_name=table_name)
2281
+ self.is_calculated_table(table_name=table_name)
2282
2282
  and t.Columns.Count == 4
2283
2283
  and any(
2284
2284
  "NAMEOF(" in p.Source.Expression.replace(" ", "") for p in t.Partitions