Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M kovalsky/versioning #8

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
semantic-link-sempy
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
2 changes: 2 additions & 0 deletions sempy_labs/GetLakehouseColumns.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

"""
Expand Down
2 changes: 2 additions & 0 deletions sempy_labs/GetLakehouseTables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

"""
Expand Down
3 changes: 3 additions & 0 deletions sempy_labs/GetMeasureDependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

"""
Expand Down Expand Up @@ -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):

"""
Expand Down
2 changes: 2 additions & 0 deletions sempy_labs/Lakehouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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):

"""
Expand Down
3 changes: 2 additions & 1 deletion sempy_labs/ReportFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

"""
Expand Down Expand Up @@ -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):

"""
Expand Down
113 changes: 113 additions & 0 deletions sempy_labs/__init__.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion sempy_labs/shortcuts.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
Expand Down
Loading