diff --git a/docs/requirements.txt b/docs/requirements.txt index ad8b4fa4..38a3b6c1 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1,11 @@ -semantic-link-sempy \ No newline at end of file +semantic-link-sempy +sphinx_rtd_theme +pandas==2.0.3 +numpy<2.0.0 # 2.0.0 breaks the build +# pyspark==3.5.0 +azure-identity==1.7.1 +azure-keyvault-secrets +azure-storage-file-datalake==12.3.1 +azure-storage-blob>=12.9.0 +anytree +IPython diff --git a/sempy_labs/GetLakehouseColumns.py b/sempy_labs/GetLakehouseColumns.py index 56807281..1cf5dd46 100644 --- a/sempy_labs/GetLakehouseColumns.py +++ b/sempy_labs/GetLakehouseColumns.py @@ -6,7 +6,9 @@ from .HelperFunctions import resolve_lakehouse_name, format_dax_object_name, resolve_lakehouse_id from .GetLakehouseTables import get_lakehouse_tables from typing import List, Optional, Union +from sempy._utils._log import log +@log def get_lakehouse_columns(lakehouse: Optional[str] = None, workspace: Optional[str] = None): """ diff --git a/sempy_labs/GetLakehouseTables.py b/sempy_labs/GetLakehouseTables.py index f14f60fa..fdb7b3c1 100644 --- a/sempy_labs/GetLakehouseTables.py +++ b/sempy_labs/GetLakehouseTables.py @@ -8,7 +8,9 @@ from .Guardrails import get_sku_size, get_directlake_guardrails_for_sku from .Lakehouse import lakehouse_attached from typing import List, Optional, Union +from sempy._utils._log import log +@log def get_lakehouse_tables(lakehouse: Optional[str] = None, workspace: Optional[str] = None, extended: Optional[bool] = False, count_rows: Optional[bool] = False, export: Optional[bool] = False): """ diff --git a/sempy_labs/GetMeasureDependencies.py b/sempy_labs/GetMeasureDependencies.py index 6a1ba50d..053e0eae 100644 --- a/sempy_labs/GetMeasureDependencies.py +++ b/sempy_labs/GetMeasureDependencies.py @@ -3,7 +3,9 @@ import pandas as pd from .HelperFunctions import format_dax_object_name from typing import List, Optional, Union +from sempy._utils._log import log +@log def get_measure_dependencies(dataset: str, workspace: Optional[str] = None): """ @@ -75,6 +77,7 @@ def get_measure_dependencies(dataset: str, workspace: Optional[str] = None): return df +@log def get_model_calc_dependencies(dataset: str, workspace: Optional[str] = None): """ diff --git a/sempy_labs/Lakehouse.py b/sempy_labs/Lakehouse.py index eb65e010..2bfebb53 100644 --- a/sempy_labs/Lakehouse.py +++ b/sempy_labs/Lakehouse.py @@ -5,6 +5,7 @@ from delta import DeltaTable from .HelperFunctions import resolve_lakehouse_name from typing import List, Optional, Union +from sempy._utils._log import log def lakehouse_attached() -> bool: @@ -28,6 +29,7 @@ def lakehouse_attached() -> bool: else: return False +@log def optimize_lakehouse_tables(tables: Optional[Union[str, List[str]]] = None, lakehouse: Optional[str] = None, workspace: Optional[str] = None): """ diff --git a/sempy_labs/ReportFunctions.py b/sempy_labs/ReportFunctions.py index 6c6d3b52..e8521438 100644 --- a/sempy_labs/ReportFunctions.py +++ b/sempy_labs/ReportFunctions.py @@ -348,7 +348,7 @@ def export_report(report: str, export_format: str, file_name: Optional[str] = No export_file.write(response.content) print(f"{green_dot} The '{export_format}' export for the '{report}' report within the '{workspace}' workspace has been saved to the following location: '{filePath}'.") - +@log def clone_report(report: str, cloned_report: str, workspace: Optional[str] = None, target_workspace: Optional[str] = None, target_dataset: Optional[str] = None): """ @@ -646,6 +646,7 @@ def list_report_bookmarks(report: str, workspace: Optional[str] = None): except: print(f"The '{report}' report within the '{workspace}' workspace has no bookmarks.") +@log def translate_report_titles(report: str, languages: Union[str,List[str]], workspace: Optional[str] = None): """ diff --git a/sempy_labs/__init__.py b/sempy_labs/__init__.py index e69de29b..95653de0 100644 --- a/sempy_labs/__init__.py +++ b/sempy_labs/__init__.py @@ -0,0 +1,113 @@ +import sempy +import sempy.fabric as fabric + +from .ListFunctions import list_tables +from .ListFunctions import list_annotations +from .HelperFunctions import format_dax_object_name +from .HelperFunctions import create_relationship_name +from .HelperFunctions import resolve_lakehouse_name +from .HelperFunctions import resolve_lakehouse_id +from .HelperFunctions import resolve_dataset_name +from .HelperFunctions import resolve_dataset_id +from .HelperFunctions import resolve_report_id +from .HelperFunctions import resolve_report_name +from .CreatePQTFile import create_pqt_file +from .CreateBlankSemanticModel import create_blank_semantic_model +from .GetSharedExpression import get_shared_expression +from .MigrateTablesColumnsToSemanticModel import migrate_tables_columns_to_semantic_model +from .MigrateModelObjectsToSemanticModel import migrate_model_objects_to_semantic_model +from .ReportRebind import report_rebind +from .ReportRebind import report_rebind_all +from .RefreshSemanticModel import refresh_semantic_model +from .ShowUnsupportedDirectLakeObjects import show_unsupported_direct_lake_objects +from .GetLakehouseColumns import get_lakehouse_columns +from .GetLakehouseTables import get_lakehouse_tables +from .DirectLakeSchemaCompare import direct_lake_schema_compare +from .MigrateCalcTablesToLakehouse import migrate_calc_tables_to_lakehouse +from .MigrateCalcTablesToLakehouse import migrate_field_parameters +from .RefreshCalcTables import refresh_calc_tables +from .MigrateCalcTablesToSemanticModel import migrate_calc_tables_to_semantic_model +from .UpdateDirectLakeModelLakehouseConnection import update_direct_lake_model_lakehouse_connection +from .ListDirectLakeModelCalcTables import list_direct_lake_model_calc_tables +from .UpdateDirectLakePartitionEntity import update_direct_lake_partition_entity +from .GetDirectLakeLakehouse import get_direct_lake_lakehouse +from .ClearCache import clear_cache +from .Fallback import check_fallback_reason +from .Guardrails import get_direct_lake_guardrails +from .Guardrails import get_sku_size +from .Guardrails import get_directlake_guardrails_for_sku +from .GetMeasureDependencies import get_measure_dependencies +from .MeasureDependencyTree import measure_dependency_tree +from .GetSemanticModelBim import get_semantic_model_bim +from .GenerateSemanticModel import create_semantic_model_from_bim +from .GenerateReport import create_report_from_reportjson +from .WarmCache import warm_direct_lake_cache_perspective +from .WarmCache import warm_direct_lake_cache_isresident +from .Vertipaq import vertipaq_analyzer +from .Vertipaq import import_vertipaq_analyzer +from .Vertipaq import visualize_vertipaq +from .ModelBPA import run_model_bpa +from .DirectLakeSchemaSync import direct_lake_schema_sync +from .HelperFunctions import get_direct_lake_sql_endpoint +from .ReportFunctions import get_report_json +from .ReportFunctions import export_report +from .ReportFunctions import clone_report +from .OneLakeIntegration import export_model_to_onelake +from .Shortcuts import create_shortcut_onelake +from .Shortcuts import delete_shortcut +from .Shortcuts import list_shortcuts +#from .Shortcuts import create_shortcut +from .ReportFunctions import launch_report +from .ListFunctions import list_dashboards +from .RefreshSemanticModel import cancel_dataset_refresh +from .Lakehouse import optimize_lakehouse_tables +from .ListFunctions import list_lakehouses +#from .ListFunctions import list_sqlendpoints +from .ListFunctions import list_warehouses +#from .ListFunctions import list_mirroredwarehouses +#from .ListFunctions import list_kqldatabases +#from .ListFunctions import list_kqlquerysets +#from .ListFunctions import list_eventstreams +#from .ListFunctions import list_datamarts +#from .ListFunctions import list_datapipelines +#from .ListFunctions import list_mlexperiments +#from .ListFunctions import list_mlmodels +from .ListFunctions import update_item +from .ModelBPA import model_bpa_rules +from .ListFunctions import list_relationships +from .ListFunctions import create_warehouse +#from .ReportFunctions import list_report_pages +#from .ReportFunctions import list_report_visuals +#from .ReportFunctions import list_report_bookmarks +#from .ReportFunctions import translate_report_titles +#from .GenerateReport import update_report_from_reportjson +from .Lakehouse import lakehouse_attached +from .Translations import language_validate +#from .GenerateSemanticModel import deploy_semantic_model +#from .AI import generate_aggs +#from .AI import generate_measure_descriptions +#from .ReportFunctions import report_dependency_tree +from .HelperFunctions import create_abfss_path +#from .AI import optimize_semantic_model +from .ListFunctions import list_dataflow_storage_accounts +from .ListFunctions import get_object_level_security +from .Translations import translate_semantic_model +from .HelperFunctions import generate_embedded_filter +from .LogAnalytics import run_dax +from .TOM import connect_semantic_model +#from .ModelAutoBuild import model_auto_build +from .GetMeasureDependencies import get_model_calc_dependencies +from .HelperFunctions import save_as_delta_table +#from .ListFunctions import list_kpis +#from .QSO import list_qso_settings +#from .QSO import qso_sync +#from .QSO import qso_sync_status +#from .QSO import set_qso +#from .QSO import disable_qso +#from .QSO import set_semantic_model_storage_format +#from .QSO import set_workspace_default_storage_format +#from .Connections import create_connection_cloud +#from .Connections import create_connection_on_prem +#from .Connections import create_connection_vnet +from .MigrationValidation import migration_validation +from .MigrationValidation import list_semantic_model_objects \ No newline at end of file diff --git a/sempy_labs/shortcuts.py b/sempy_labs/shortcuts.py index 8a246bff..77b739d4 100644 --- a/sempy_labs/shortcuts.py +++ b/sempy_labs/shortcuts.py @@ -1,4 +1,4 @@ -import sempy_labs +import sempy import sempy.fabric as fabric import pandas as pd from .HelperFunctions import resolve_lakehouse_name, resolve_lakehouse_id diff --git a/setup.py b/setup.py index 24a4a224..f383e53d 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ long_description_content_type="text/markdown", packages=setuptools.find_packages(), install_requires=[ - 'semantic-link-sempy>=0.7.5', + 'semantic-link', 'anytree', 'powerbiclient', ],