Skip to content

Commit fb21636

Browse files
committed
added annotation functions for reports
1 parent 5b2d53e commit fb21636

File tree

6 files changed

+413
-177
lines changed

6 files changed

+413
-177
lines changed

src/sempy_labs/_git.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def initialize_git_connection(workspace: Optional[str] = None) -> str:
229229
The Fabric workspace name.
230230
Defaults to None which resolves to the workspace of the attached lakehouse
231231
or if no lakehouse attached, resolves to the workspace of the notebook.
232-
232+
233233
Returns
234234
-------
235235
str
@@ -250,7 +250,7 @@ def initialize_git_connection(workspace: Optional[str] = None) -> str:
250250
f"{icons.green_dot} The '{workspace}' workspace git connection has been initialized."
251251
)
252252

253-
return response.json()['remoteCommitHash']
253+
return response.json()["remoteCommitHash"]
254254

255255

256256
def commit_to_git(

src/sempy_labs/_helper_functions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,10 @@ def _decode_b64(file, format: Optional[str] = "utf-8"):
593593
return result
594594

595595

596+
def _load_json(file):
597+
return json.loads(file)
598+
599+
596600
def is_default_semantic_model(dataset: str, workspace: Optional[str] = None) -> bool:
597601
"""
598602
Identifies whether a semantic model is a default semantic model.

src/sempy_labs/_list_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ def list_report_semantic_model_objects(
13711371
Shows a list of semantic model objects (i.e. columns, measures, hierarchies) used in all reports which feed data from
13721372
a given semantic model.
13731373
1374-
Requirement: Reports must be in the PBIR format.
1374+
Note: As with all functions which rely on the ReportWrapper, this function requires the report(s) to be in the 'PBIR' format.
13751375
13761376
Parameters
13771377
----------

src/sempy_labs/report/_report_bpa.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def run_report_bpa(
2929
):
3030
"""
3131
Displays an HTML visualization of the results of the Best Practice Analyzer scan for a report.
32+
Note: As with all functions which rely on the ReportWrapper, this function requires the report to be in the 'PBIR' format.
3233
3334
Parameters
3435
----------

src/sempy_labs/report/_report_list_functions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def list_unused_objects_in_reports(
1313
) -> pd.DataFrame:
1414
"""
1515
Shows a list of all columns in the semantic model which are not used in any related Power BI reports (including dependencies).
16+
Note: As with all functions which rely on the ReportWrapper, this function requires the report to be in the 'PBIR' format.
1617
1718
Parameters
1819
----------
@@ -55,6 +56,7 @@ def _list_all_report_semantic_model_objects(
5556
) -> pd.DataFrame:
5657
"""
5758
Shows a unique list of all semantic model objects (columns, measures, hierarchies) which are used in all reports which leverage the semantic model.
59+
Note: As with all functions which rely on the ReportWrapper, this function requires the report to be in the 'PBIR' format.
5860
5961
Parameters
6062
----------

0 commit comments

Comments
 (0)