Skip to content

Commit 7c07b2b

Browse files
committed
Complete namespace migration from dataverse_sdk to PowerPlatform.Dataverse
- Update all docstring references from ~dataverse_sdk.* to ~PowerPlatform.Dataverse.* - Update dynamic imports from dataverse_sdk to PowerPlatform.Dataverse - Remove obsolete src/dataverse_sdk/ directory and files - Ensure consistent namespace usage throughout the codebase All references now properly use the new PowerPlatform.Dataverse namespace.
1 parent 17d24fc commit 7c07b2b

6 files changed

Lines changed: 13 additions & 19 deletions

File tree

src/PowerPlatform/Dataverse/client.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class DataverseClient:
1818
1919
This client provides a simple, stable interface for interacting with Dataverse environments
2020
through the Web API. It handles authentication via Azure Identity and delegates HTTP operations
21-
to an internal :class:`~dataverse_sdk.odata.ODataClient`.
21+
to an internal :class:`~PowerPlatform.Dataverse.data.odata.ODataClient`.
2222
2323
Key capabilities:
2424
- OData CRUD operations: create, read, update, delete records
@@ -32,8 +32,8 @@ class DataverseClient:
3232
:param credential: Azure Identity credential for authentication.
3333
:type credential: ~azure.core.credentials.TokenCredential
3434
:param config: Optional configuration for language, timeouts, and retries.
35-
If not provided, defaults are loaded from :meth:`~dataverse_sdk.config.DataverseConfig.from_env`.
36-
:type config: ~dataverse_sdk.config.DataverseConfig or None
35+
If not provided, defaults are loaded from :meth:`~PowerPlatform.Dataverse.core.config.DataverseConfig.from_env`.
36+
:type config: ~PowerPlatform.Dataverse.core.config.DataverseConfig or None
3737
3838
:raises ValueError: If ``base_url`` is missing or empty after trimming.
3939
@@ -90,7 +90,7 @@ def _get_odata(self) -> ODataClient:
9090
deferring construction until the first API call.
9191
9292
:return: The lazily-initialized low-level client used to perform HTTP requests.
93-
:rtype: ~dataverse_sdk.odata.ODataClient
93+
:rtype: ~PowerPlatform.Dataverse.data.odata.ODataClient
9494
"""
9595
if self._odata is None:
9696
self._odata = ODataClient(
@@ -348,8 +348,8 @@ def query_sql(self, sql: str):
348348
:return: List of result row dictionaries. Returns an empty list if no rows match.
349349
:rtype: list[dict]
350350
351-
:raises ~dataverse_sdk.errors.SQLParseError: If the SQL query uses unsupported syntax.
352-
:raises ~dataverse_sdk.errors.HttpError: If the Web API returns an error.
351+
:raises ~PowerPlatform.Dataverse.core.errors.SQLParseError: If the SQL query uses unsupported syntax.
352+
:raises ~PowerPlatform.Dataverse.core.errors.HttpError: If the Web API returns an error.
353353
354354
.. note::
355355
The SQL support is limited to read-only queries. Complex joins, subqueries,
@@ -432,7 +432,7 @@ class ItemStatus(IntEnum):
432432
``entity_set_name``, ``entity_logical_name``, ``metadata_id``, and ``columns_created``.
433433
:rtype: dict
434434
435-
:raises ~dataverse_sdk.errors.MetadataError: If table creation fails or the schema is invalid.
435+
:raises ~PowerPlatform.Dataverse.core.errors.MetadataError: If table creation fails or the schema is invalid.
436436
437437
Example:
438438
Create a table with simple columns::
@@ -469,7 +469,7 @@ def delete_table(self, tablename: str) -> None:
469469
(e.g. ``"new_SampleItem"``).
470470
:type tablename: str
471471
472-
:raises ~dataverse_sdk.errors.MetadataError: If the table does not exist or deletion fails.
472+
:raises ~PowerPlatform.Dataverse.core.errors.MetadataError: If the table does not exist or deletion fails.
473473
474474
.. warning::
475475
This operation is irreversible and will delete all records in the table along
@@ -594,7 +594,7 @@ def upload_file(
594594
``If-Match: *``. Used for small and chunk modes only.
595595
:type if_none_match: bool
596596
597-
:raises ~dataverse_sdk.errors.HttpError: If the upload fails or the file column is not empty
597+
:raises ~PowerPlatform.Dataverse.core.errors.HttpError: If the upload fails or the file column is not empty
598598
when ``if_none_match=True``.
599599
:raises FileNotFoundError: If the specified file path does not exist.
600600

src/PowerPlatform/Dataverse/core/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def acquire_token(self, scope: str) -> TokenPair:
4545
:param scope: OAuth2 scope string, typically ``"https://<org>.crm.dynamics.com/.default"``.
4646
:type scope: str
4747
:return: Token pair containing the scope and access token.
48-
:rtype: ~dataverse_sdk.auth.TokenPair
48+
:rtype: ~PowerPlatform.Dataverse.core.auth.TokenPair
4949
:raises ~azure.core.exceptions.ClientAuthenticationError: If token acquisition fails.
5050
"""
5151
token = self.credential.get_token(scope)

src/PowerPlatform/Dataverse/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def from_env(cls) -> "DataverseConfig":
3434
Create a configuration instance with default settings.
3535
3636
:return: Configuration instance with default values.
37-
:rtype: ~dataverse_sdk.config.DataverseConfig
37+
:rtype: ~PowerPlatform.Dataverse.core.config.DataverseConfig
3838
"""
3939
# Environment-free defaults
4040
return cls(

src/PowerPlatform/Dataverse/data/odata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(
4343
if not self.base_url:
4444
raise ValueError("base_url is required.")
4545
self.api = f"{self.base_url}/api/data/v9.2"
46-
self.config = config or __import__("dataverse_sdk.core.config", fromlist=["DataverseConfig"]).DataverseConfig.from_env()
46+
self.config = config or __import__("PowerPlatform.Dataverse.core.config", fromlist=["DataverseConfig"]).DataverseConfig.from_env()
4747
self._http = HttpClient(
4848
retries=self.config.http_retries,
4949
backoff=self.config.http_backoff,

src/PowerPlatform/Dataverse/utils/pandas_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class PandasODataClient:
3939
High-level pandas-friendly wrapper for Dataverse OData operations.
4040
4141
:param odata_client: Initialized low-level OData client with authentication configured.
42-
:type odata_client: ~dataverse_sdk.odata.ODataClient
42+
:type odata_client: ~PowerPlatform.Dataverse.data.odata.ODataClient
4343
"""
4444

4545
def __init__(self, odata_client: ODataClient) -> None:

src/dataverse_sdk/__version__.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)