Skip to content

Commit

Permalink
added uuid.UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kovalsky committed Dec 18, 2024
1 parent fe9e5fc commit 7b02333
Show file tree
Hide file tree
Showing 41 changed files with 151 additions and 155 deletions.
8 changes: 4 additions & 4 deletions src/sempy_labs/_managed_private_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ def create_managed_private_endpoint(
----------
name: str
Name of the managed private endpoint.
target_private_link_resource_id: UUID
target_private_link_resource_id: uuid.UUID
Resource Id of data source for which private endpoint needs to be created.
target_subresource_type : str
Sub-resource pointing to Private-link resoure.
request_message : str, default=None
Message to approve private endpoint request. Should not be more than 140 characters.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -76,7 +76,7 @@ def list_managed_private_endpoints(
Parameters
----------
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -137,7 +137,7 @@ def delete_managed_private_endpoint(
----------
managed_private_endpoint: str
Name of the managed private endpoint.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down
18 changes: 9 additions & 9 deletions src/sempy_labs/_mirrored_databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def list_mirrored_databases(workspace: Optional[str | UUID] = None) -> pd.DataFr
Parameters
----------
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -86,7 +86,7 @@ def create_mirrored_database(
Name of the mirrored database.
description : str, default=None
A description of the mirrored database.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -124,7 +124,7 @@ def delete_mirrored_database(
----------
mirrored_database: str
Name of the mirrored database.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -161,7 +161,7 @@ def get_mirroring_status(
----------
mirrored_database: str
Name of the mirrored database.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -201,7 +201,7 @@ def get_tables_mirroring_status(
----------
mirrored_database: str
Name of the mirrored database.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -270,7 +270,7 @@ def start_mirroring(mirrored_database: str, workspace: Optional[str | UUID] = No
----------
mirrored_database: str
Name of the mirrored database.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -305,7 +305,7 @@ def stop_mirroring(mirrored_database: str, workspace: Optional[str | UUID] = Non
----------
mirrored_database: str
Name of the mirrored database.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -342,7 +342,7 @@ def get_mirrored_database_definition(
----------
mirrored_database : str
The name of the mirrored database.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The name or ID of the workspace.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -392,7 +392,7 @@ def update_mirrored_database_definition(
The name of the mirrored database to be created.
mirrored_database_content : dict
The mirrored database definition (not in Base64 format).
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The name or ID of the workspace.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down
2 changes: 1 addition & 1 deletion src/sempy_labs/_mirrored_warehouses.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def list_mirrored_warehouses(workspace: Optional[str | UUID] = None) -> pd.DataF
Parameters
----------
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down
6 changes: 3 additions & 3 deletions src/sempy_labs/_ml_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def list_ml_experiments(workspace: Optional[str | UUID] = None) -> pd.DataFrame:
Parameters
----------
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -71,7 +71,7 @@ def create_ml_experiment(
Name of the ML experiment.
description : str, default=None
A description of the environment.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -106,7 +106,7 @@ def delete_ml_experiment(name: str, workspace: Optional[str | UUID] = None):
----------
name: str
Name of the ML experiment.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down
6 changes: 3 additions & 3 deletions src/sempy_labs/_ml_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def list_ml_models(workspace: Optional[str | UUID] = None) -> pd.DataFrame:
Parameters
----------
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -71,7 +71,7 @@ def create_ml_model(
Name of the ML model.
description : str, default=None
A description of the ML model.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -104,7 +104,7 @@ def delete_ml_model(name: str, workspace: Optional[str | UUID] = None):
----------
name: str
Name of the ML model.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down
6 changes: 3 additions & 3 deletions src/sempy_labs/_model_bpa.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ def run_model_bpa(
Parameters
----------
dataset : str | UUID
dataset : str | uuid.UUID
Name or ID of the semantic model.
rules : pandas.DataFrame, default=None
A pandas dataframe containing rules to be evaluated.
workspace : str, default=None
The Fabric workspace name.
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
export : bool, default=False
Expand Down
14 changes: 7 additions & 7 deletions src/sempy_labs/_model_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def get_measure_dependencies(
Parameters
----------
dataset : str | UUID
dataset : str | uuid.UUID
Name or ID of the semantic model.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -149,10 +149,10 @@ def get_model_calc_dependencies(
Parameters
----------
dataset : str | UUID
dataset : str | uuid.UUID
Name or ID of the semantic model.
workspace : str, default=None
The Fabric workspace name.
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -241,11 +241,11 @@ def measure_dependency_tree(
Parameters
----------
dataset : str | UUID
dataset : str | uuid.UUID
Name or ID of the semantic model.
measure_name : str
Name of the measure.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down
8 changes: 4 additions & 4 deletions src/sempy_labs/_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def get_notebook_definition(
----------
notebook_name : str
The name of the notebook.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The name or ID of the workspace.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -113,7 +113,7 @@ def import_notebook_from_web(
description : str, default=None
The description of the notebook.
Defaults to None which does not place a description.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The name or ID of the workspace.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -176,7 +176,7 @@ def create_notebook(
description : str, default=None
The description of the notebook.
Defaults to None which does not place a description.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The name or ID of the workspace.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -223,7 +223,7 @@ def update_notebook_definition(
The name of the notebook to be updated.
notebook_content : str
The Jupyter notebook content (not in Base64 format).
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The name or ID of the workspace.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down
10 changes: 5 additions & 5 deletions src/sempy_labs/_one_lake_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@log
def export_model_to_onelake(
dataset: str | UUID,
workspace: Optional[str] = None,
workspace: Optional[str | UUID] = None,
destination_lakehouse: Optional[str] = None,
destination_workspace: Optional[str] = None,
):
Expand All @@ -22,10 +22,10 @@ def export_model_to_onelake(
Parameters
----------
dataset : str
Name of the semantic model.
workspace : str, default=None
The Fabric workspace name.
dataset : str | uuid.UUID
Name or ID of the semantic model.
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
destination_lakehouse : str, default=None
Expand Down
27 changes: 13 additions & 14 deletions src/sempy_labs/_query_scale_out.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import sempy.fabric as fabric
import pandas as pd
from sempy_labs._helper_functions import (
resolve_dataset_id,
resolve_workspace_name_and_id,
resolve_dataset_name_and_id,
)
Expand All @@ -19,9 +18,9 @@ def qso_sync(dataset: str | UUID, workspace: Optional[str | UUID] = None):
Parameters
----------
dataset : str | UUID
dataset : str | uuid.UUID
Name or ID of the semantic model.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -52,9 +51,9 @@ def qso_sync_status(
Parameters
----------
dataset : str | UUID
dataset : str | uuid.UUID
Name or ID of the semantic model.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -151,9 +150,9 @@ def disable_qso(
Parameters
----------
dataset : str | UUID
dataset : str | uuid.UUID
Name or ID of the semantic model.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -198,13 +197,13 @@ def set_qso(
Parameters
----------
dataset : str | UUID
dataset : str | uuid.UUID
Name or ID of the semantic model.
auto_sync : bool, default=True
Whether the semantic model automatically syncs read-only replicas.
max_read_only_replicas : int, default=-1
To enable semantic model scale-out, set max_read_only_replicas to -1, or any non-0 value. A value of -1 allows Power BI to create as many read-only replicas as your Power BI capacity supports. You can also explicitly set the replica count to a value lower than that of the capacity maximum. Setting max_read_only_replicas to -1 is recommended.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -268,11 +267,11 @@ def set_semantic_model_storage_format(
Parameters
----------
dataset : str | UUID
dataset : str | uuid.UUID
Name or ID of the semantic model.
storage_format : str
The storage format for the semantic model. Valid options: 'Large', 'Small'.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -327,9 +326,9 @@ def list_qso_settings(
Parameters
----------
dataset : str | UUID, default=None
dataset : str | uuid.UUID, default=None
Name or ID of the semantic model.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down Expand Up @@ -395,7 +394,7 @@ def set_workspace_default_storage_format(
----------
storage_format : str
The storage format for the semantic model. Valid options: 'Large', 'Small'.
workspace : str | UUID, default=None
workspace : str | uuid.UUID, default=None
The Fabric workspace name or ID.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Expand Down
Loading

0 comments on commit 7b02333

Please sign in to comment.