Skip to content

Commit

Permalink
versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kovalsky committed Jun 7, 2024
1 parent bc44775 commit 5f42070
Show file tree
Hide file tree
Showing 22 changed files with 48 additions and 48 deletions.
4 changes: 2 additions & 2 deletions sempy_labs/CreatePQTFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
import xml.etree.ElementTree as ET
from .ListFunctions import list_tables
from .Lakehouse import lakehouse_attached
from sempy._utils._log import log

from typing import List, Optional, Union

green_dot = '\U0001F7E2'
yellow_dot = '\U0001F7E1'
red_dot = '\U0001F534'
in_progress = '⌛'

@log

def create_pqt_file(dataset: str, workspace: Optional[str] = None, file_name: Optional[str] = None):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/DirectLakeSchemaSync.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from .GetLakehouseColumns import get_lakehouse_columns
from .HelperFunctions import format_dax_object_name, resolve_lakehouse_name, get_direct_lake_sql_endpoint
from typing import List, Optional, Union
from sempy._utils._log import log

@log


def direct_lake_schema_sync(dataset: str, workspace: Optional[str] = None, add_to_model: Optional[bool] = False, lakehouse: Optional[str] = None, lakehouse_workspace: Optional[str] = None):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/ListDirectLakeModelCalcTables.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import pandas as pd
from .ListFunctions import list_tables, list_annotations
from typing import List, Optional, Union
from sempy._utils._log import log

@log


def list_direct_lake_model_calc_tables(dataset: str, workspace: Optional[str] = None):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/LogAnalytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import pandas as pd
from .HelperFunctions import resolve_dataset_id
from typing import List, Optional, Union
from sempy._utils._log import log

@log


def run_dax(dataset: str, dax_query: str, user_name: Optional[str] = None, workspace: Optional[str] = None):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/MeasureDependencyTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from anytree import Node, RenderTree
from .GetMeasureDependencies import get_measure_dependencies
from typing import List, Optional, Union
from sempy._utils._log import log

@log


def measure_dependency_tree(dataset: str, measure_name: str, workspace: Optional[str] = None):

"""
Expand Down
6 changes: 3 additions & 3 deletions sempy_labs/MigrateCalcTablesToLakehouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
from .TOM import connect_semantic_model
from pyspark.sql import SparkSession
from typing import List, Optional, Union
from sempy._utils._log import log


green_dot = '\U0001F7E2'
yellow_dot = '\U0001F7E1'
red_dot = '\U0001F534'
in_progress = '⌛'

@log

def migrate_calc_tables_to_lakehouse(dataset: str, new_dataset: str, workspace: Optional[str] = None, new_dataset_workspace: Optional[str] = None, lakehouse: Optional[str] = None, lakehouse_workspace: Optional[str] = None):

"""
Expand Down Expand Up @@ -178,7 +178,7 @@ def migrate_calc_tables_to_lakehouse(dataset: str, new_dataset: str, workspace:
break
time.sleep(1)

@log

def migrate_field_parameters(dataset: str, new_dataset: str, workspace: Optional[str] = None, new_dataset_workspace: Optional[str] = None):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/MigrateCalcTablesToSemanticModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
from .HelperFunctions import resolve_lakehouse_name
from .TOM import connect_semantic_model
from typing import List, Optional, Union
from sempy._utils._log import log


green_dot = '\U0001F7E2'
yellow_dot = '\U0001F7E1'
red_dot = '\U0001F534'
in_progress = '⌛'

@log

def migrate_calc_tables_to_semantic_model(dataset: str, new_dataset: str, workspace: Optional[str] = None, new_dataset_workspace: Optional[str] = None, lakehouse: Optional[str] = None, lakehouse_workspace: Optional[str] = None ):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/MigrateModelObjectsToSemanticModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
from .HelperFunctions import create_relationship_name
from .TOM import connect_semantic_model
from typing import List, Optional, Union
from sempy._utils._log import log


green_dot = '\U0001F7E2'
yellow_dot = '\U0001F7E1'
red_dot = '\U0001F534'
in_progress = '⌛'

@log

def migrate_model_objects_to_semantic_model(dataset: str, new_dataset: str, workspace: Optional[str] = None, new_dataset_workspace: Optional[str] = None):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/MigrateTablesColumnsToSemanticModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
from .Lakehouse import lakehouse_attached
from .TOM import connect_semantic_model
from typing import List, Optional, Union
from sempy._utils._log import log


green_dot = '\U0001F7E2'
yellow_dot = '\U0001F7E1'
red_dot = '\U0001F534'
in_progress = '⌛'

@log

def migrate_tables_columns_to_semantic_model(dataset: str, new_dataset: str, workspace: Optional[str] = None, new_dataset_workspace: Optional[str] = None, lakehouse: Optional[str] = None, lakehouse_workspace: Optional[str] = None):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/MigrationValidation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .HelperFunctions import create_relationship_name
from .TOM import connect_semantic_model
from typing import List, Optional, Union
from sempy._utils._log import log


def list_semantic_model_objects(dataset: str, workspace: Optional[str] = None):

Expand Down Expand Up @@ -84,7 +84,7 @@ def list_semantic_model_objects(dataset: str, workspace: Optional[str] = None):

return df

@log

def migration_validation(dataset: str, new_dataset: str, workspace: Optional[str] = None, new_dataset_workspace: Optional[str] = None):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/ModelAutoBuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from .CreateBlankSemanticModel import create_blank_semantic_model
from .GetSharedExpression import get_shared_expression
from typing import List, Optional, Union
from sempy._utils._log import log

@log


def model_auto_build(dataset: str, file_path: str, workspace: Optional[str] = None, lakehouse: Optional[str] = None, lakehouse_workspace: Optional[str] = None):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/ModelBPA.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .Lakehouse import lakehouse_attached
from .GetLakehouseTables import get_lakehouse_tables
from typing import List, Optional, Union
from sempy._utils._log import log


def model_bpa_rules():

Expand Down Expand Up @@ -306,7 +306,7 @@ def model_bpa_rules():

return df_rules

@log

def run_model_bpa(dataset: str, rules_dataframe: Optional[pd.DataFrame] = None, workspace: Optional[str] = None, export: Optional[bool] = False, return_dataframe: Optional[bool] = False, **kwargs):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/OneLakeIntegration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import sempy.fabric as fabric
import pandas as pd
from typing import List, Optional, Union
from sempy._utils._log import log

@log


def export_model_to_onelake(dataset: str, workspace: Optional[str] = None, destination_lakehouse: Optional[str] = None, destination_workspace: Optional[str] = None):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/RefreshCalcTables.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
from pyspark.sql import SparkSession
from .TOM import connect_semantic_model
from typing import List, Optional, Union
from sempy._utils._log import log


green_dot = '\U0001F7E2'
yellow_dot = '\U0001F7E1'
red_dot = '\U0001F534'
in_progress = '⌛'

@log

def refresh_calc_tables(dataset: str, workspace: Optional[str] = None):

"""
Expand Down
6 changes: 3 additions & 3 deletions sempy_labs/RefreshSemanticModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import time
from .HelperFunctions import resolve_dataset_id
from typing import List, Optional, Union
from sempy._utils._log import log


green_dot = '\U0001F7E2'
yellow_dot = '\U0001F7E1'
red_dot = '\U0001F534'
in_progress = '⌛'

@log

def refresh_semantic_model(dataset: str, tables: Optional[Union[str, List[str]]] = None, partitions: Optional[Union[str, List[str]]] = None, refresh_type: Optional[str] = None, retry_count: Optional[int] = 0, apply_refresh_policy: Optional[bool] = True, workspace: Optional[str] = None):

"""
Expand Down Expand Up @@ -99,7 +99,7 @@ def extract_names(partition):

print(f"{green_dot} Refresh of the '{dataset}' semantic model within the '{workspace}' workspace is complete.")

@log

def cancel_dataset_refresh(dataset: str, request_id: Optional[str] = None, workspace: Optional[str] = None):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/ReportFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .Lakehouse import lakehouse_attached
from .HelperFunctions import generate_embedded_filter, resolve_dataset_name, resolve_report_id, resolve_lakehouse_name
from typing import List, Optional, Union
from sempy._utils._log import log


green_dot = '\U0001F7E2'
yellow_dot = '\U0001F7E1'
Expand Down Expand Up @@ -136,7 +136,7 @@ def report_dependency_tree(workspace: Optional[str] = None):
for pre, _, node in RenderTree(node_dict[workspace]):
print(f"{pre}{node.custom_property}'{node.name}'")

@log

def export_report(report: str, export_format: str, file_name: Optional[str] = None, bookmark_name: Optional[str] = None, page_name: Optional[str] = None, visual_name: Optional[str] = None, report_filter: Optional[str] = None, workspace: Optional[str] = None):

"""
Expand Down
6 changes: 3 additions & 3 deletions sempy_labs/ReportRebind.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
import sempy.fabric as fabric
from .HelperFunctions import resolve_dataset_id, resolve_report_id
from typing import List, Optional, Union
from sempy._utils._log import log


green_dot = '\U0001F7E2'
yellow_dot = '\U0001F7E1'
red_dot = '\U0001F534'
in_progress = '⌛'

@log

def report_rebind(report: str, dataset: str, report_workspace: Optional[str] = None, dataset_workspace: Optional[str] = None):

"""
Expand Down Expand Up @@ -60,7 +60,7 @@ def report_rebind(report: str, dataset: str, report_workspace: Optional[str] = N
else:
print(f"{red_dot} The '{report}' report within the '{report_workspace}' workspace failed to rebind to the '{dataset}' semantic model within the '{dataset_workspace}' workspace.")

@log

def report_rebind_all(dataset: str, new_dataset: str, dataset_workspace: Optional[str] = None, new_dataset_workpace: Optional[str] = None, report_workspace: Optional[str] = None):

"""
Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/TOM.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .Fallback import check_fallback_reason
from contextlib import contextmanager
from typing import List, Optional, Union, TYPE_CHECKING
from sempy._utils._log import log


if TYPE_CHECKING:
import Microsoft.AnalysisServices.Tabular
Expand All @@ -23,7 +23,7 @@
start_bold = '\033[1m'
end_bold = '\033[0m'

@log

@contextmanager
def connect_semantic_model(dataset: str, readonly: Optional[bool] = True, workspace: Optional[str] = None):

Expand Down
4 changes: 2 additions & 2 deletions sempy_labs/Translations.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pandas as pd
from typing import List, Optional, Union
from sempy._utils._log import log


green_dot = '\U0001F7E2'
yellow_dot = '\U0001F7E1'
Expand Down Expand Up @@ -42,7 +42,7 @@ def language_validate(language: str):

return lang

@log

def translate_semantic_model(dataset: str, languages: Union[str, List[str]], exclude_characters: Optional[str] = None, workspace: Optional[str] = None):

"""
Expand Down
6 changes: 3 additions & 3 deletions sempy_labs/Vertipaq.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from .GetLakehouseTables import get_lakehouse_tables
from .Lakehouse import lakehouse_attached
from typing import List, Optional, Union
from sempy._utils._log import log

@log


def vertipaq_analyzer(dataset: str, workspace: Optional[str] = None, export: Optional[str] = None, lakehouse_workspace: Optional[str] = None, read_stats_from_data: Optional[bool] = False):

"""
Expand Down Expand Up @@ -532,7 +532,7 @@ def visualize_vertipaq(dataframes):
# Default to open the first tab
display(HTML("<script>document.getElementsByClassName('tablinks')[0].click();</script>"))

@log

def import_vertipaq_analyzer(folder_path: str, file_name: str):

"""
Expand Down
6 changes: 3 additions & 3 deletions sempy_labs/WarmCache.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
from .RefreshSemanticModel import refresh_semantic_model
from .GetMeasureDependencies import get_measure_dependencies
from typing import List, Optional, Union
from sempy._utils._log import log


green_dot = '\U0001F7E2'
yellow_dot = '\U0001F7E1'
red_dot = '\U0001F534'
in_progress = '⌛'

@log

def warm_direct_lake_cache_perspective(dataset: str, perspective: str, add_dependencies: Optional[bool] = False, workspace: Optional[str] = None):

"""
Expand Down Expand Up @@ -115,7 +115,7 @@ def warm_direct_lake_cache_perspective(dataset: str, perspective: str, add_depen

return df

@log

def warm_direct_lake_cache_isresident(dataset: str, workspace: Optional[str] = None):

"""
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

0 comments on commit 5f42070

Please sign in to comment.