Skip to content

Commit e1a8ebc

Browse files
Merge branch 'main' into feature/context-manager
2 parents 58c51a8 + c61c94a commit e1a8ebc

20 files changed

Lines changed: 744 additions & 247 deletions

File tree

.claude/skills/dataverse-sdk-use/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ client.tables.delete("new_Product")
238238

239239
#### Create One-to-Many Relationship
240240
```python
241-
from PowerPlatform.Dataverse.models.metadata import (
241+
from PowerPlatform.Dataverse.models.relationship import (
242242
LookupAttributeMetadata,
243243
OneToManyRelationshipMetadata,
244244
Label,
@@ -270,7 +270,7 @@ print(f"Created lookup field: {result['lookup_schema_name']}")
270270

271271
#### Create Many-to-Many Relationship
272272
```python
273-
from PowerPlatform.Dataverse.models.metadata import ManyToManyRelationshipMetadata
273+
from PowerPlatform.Dataverse.models.relationship import ManyToManyRelationshipMetadata
274274

275275
relationship = ManyToManyRelationshipMetadata(
276276
schema_name="new_employee_project",
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Warn when ADO pipeline YAML file changes
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".azdo/ci-pr.yaml"
7+
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
12+
jobs:
13+
warn:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Emit warning in logs
17+
run: |
18+
echo "::warning file=.azdo/ci-pr.yaml::This PR changes .azdo/ci-pr.yaml. After merge, Azure DevOps may disable/require approval for the PR pipeline YAML until it is re-enabled/approved."
19+
20+
echo "ADO pipeline: DV-Python-SDK-PullRequest (definitionId=29922)"
21+
echo "https://dev.azure.com/dynamicscrm/OneCRM/_build?definitionId=29922"
22+
23+
- name: Add workflow summary
24+
run: |
25+
{
26+
echo "## ADO PR pipeline YAML change detected"
27+
echo ""
28+
echo "**File changed:** \`.azdo/ci-pr.yaml\`"
29+
echo ""
30+
echo "**Why this matters:** After this is merged, Azure DevOps may disable/require approval for the PR pipeline YAML."
31+
echo ""
32+
echo "**Action required (post-merge):** Re-enable / approve the updated YAML for:"
33+
echo "- **DV-Python-SDK-PullRequest** (definitionId=29922)"
34+
echo "- https://dev.azure.com/dynamicscrm/OneCRM/_build?definitionId=29922"
35+
echo ""
36+
echo "Then trigger a run to confirm PR validation works."
37+
} >> "$GITHUB_STEP_SUMMARY"
38+
39+
- name: Post resolvable PR review comment
40+
env:
41+
GH_TOKEN: ${{ github.token }}
42+
run: |
43+
jq -n \
44+
--arg sha "${{ github.event.pull_request.head.sha }}" \
45+
'{
46+
path: ".azdo/ci-pr.yaml",
47+
subject_type: "file",
48+
commit_id: $sha,
49+
body: "> [!WARNING]\n> **ADO PR pipeline YAML change detected**\n>\n> This PR modifies `.azdo/ci-pr.yaml`. After merge, Azure DevOps may disable or require approval for the PR validation pipeline.\n>\n> **Action required (post-merge):** Re-enable / approve the updated YAML for:\n> - **DV-Python-SDK-PullRequest** (definitionId=29922)\n> - https://dev.azure.com/dynamicscrm/OneCRM/_build?definitionId=29922\n>\n> Please resolve this comment after completing the post-merge steps."
50+
}' | \
51+
gh api \
52+
--method POST \
53+
-H "Accept: application/vnd.github+json" \
54+
/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/comments \
55+
--input -

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,57 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.0b5] - 2026-02-27
9+
10+
### Fixed
11+
- UpsertMultiple: exclude alternate key fields from request body (#127). The create path of UpsertMultiple failed with `400 Bad Request` when alternate key column values appeared in both the body and `@odata.id`.
12+
13+
## [0.1.0b4] - 2026-02-25
14+
15+
### Added
16+
- Operation namespaces: `client.records`, `client.query`, `client.tables`, `client.files` (#102)
17+
- Relationship management: `create_one_to_many_relationship`, `create_many_to_many_relationship`, `get_relationship`, `delete_relationship`, `create_lookup_field` with typed `RelationshipInfo` return model (#105, #114)
18+
- `client.records.upsert()` for upsert operations with alternate key support (#106)
19+
- `client.files.upload()` for file upload operations (#111)
20+
- `client.tables.list(filter=, select=)` parameters for filtering and projecting table metadata (#112)
21+
- Cascade behavior constants (`CASCADE_BEHAVIOR_CASCADE`, `CASCADE_BEHAVIOR_REMOVE_LINK`, etc.) and input models (`CascadeConfiguration`, `LookupAttributeMetadata`, `Label`, `LocalizedLabel`)
22+
23+
### Deprecated
24+
- All flat methods on `DataverseClient` (`create`, `update`, `delete`, `get`, `query_sql`, `upload_file`, etc.) now emit `DeprecationWarning` and delegate to the corresponding namespaced operations
25+
26+
## [0.1.0b3] - 2025-12-19
27+
28+
### Added
29+
- Client-side correlation ID and client request ID for request tracing (#70)
30+
- Unit tests for `DataverseClient` (#71)
31+
32+
### Changed
33+
- Standardized package versioning (#84)
34+
- Updated package link (#69)
35+
36+
### Fixed
37+
- Retry logic for examples (#72)
38+
- Removed double space formatting issue (#82)
39+
- Updated CI trigger to include main branch (#81)
40+
41+
## [0.1.0b2] - 2025-11-17
42+
43+
### Added
44+
- Enforce Black formatting across the codebase (#61, #62)
45+
- Python 3.14 support added to `pyproject.toml` (#55)
46+
47+
### Changed
48+
- Removed `pandas` dependency (#57)
49+
- Refactored SDK architecture and quality improvements (#55)
50+
- Prefixed table names with schema name for consistency (#51)
51+
- Updated docstrings across core modules (#54, #63)
52+
53+
### Fixed
54+
- Fixed `get` for single-select option set columns (#52)
55+
- Fixed example filename references and documentation URLs (#60)
56+
- Fixed API documentation link in examples (#64)
57+
- Fixed CI pipeline to use modern `pyproject.toml` dev dependencies (#56, #59)
58+
859
## [0.1.0b1] - 2025-11-14
960

1061
### Added
@@ -19,6 +70,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1970
- Comprehensive error handling with specific exception types (`DataverseError`, `AuthenticationError`, etc.) (#22, #24)
2071
- HTTP retry logic with exponential backoff for resilient operations (#72)
2172

73+
[0.1.0b5]: https://github.com/microsoft/PowerPlatform-DataverseClient-Python/compare/v0.1.0b4...v0.1.0b5
74+
[0.1.0b4]: https://github.com/microsoft/PowerPlatform-DataverseClient-Python/compare/v0.1.0b3...v0.1.0b4
2275
[0.1.0b3]: https://github.com/microsoft/PowerPlatform-DataverseClient-Python/compare/v0.1.0b2...v0.1.0b3
2376
[0.1.0b2]: https://github.com/microsoft/PowerPlatform-DataverseClient-Python/compare/v0.1.0b1...v0.1.0b2
2477
[0.1.0b1]: https://github.com/microsoft/PowerPlatform-DataverseClient-Python/releases/tag/v0.1.0b1

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,16 @@ Brief summary of the release
109109
### Fixed
110110
- Bug fix 1 (#125)
111111
- Bug fix 2 (#126)
112+
```
113+
114+
**Post-Release Version Bump:**
115+
116+
After tagging and publishing a release, immediately bump the version on `main` to the next
117+
development target. This ensures builds from source are clearly distinguished from the
118+
published release:
119+
120+
```bash
121+
# After publishing v0.1.0b4, bump to v0.1.0b5 on main
122+
# Update version in pyproject.toml
123+
# Commit directly to main: "Bump version to 0.1.0b5 for next development cycle"
112124
```

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,12 @@ client.tables.delete("new_Product")
319319
Create relationships between tables using the relationship API. For a complete working example, see [examples/advanced/relationships.py](https://github.com/microsoft/PowerPlatform-DataverseClient-Python/blob/main/examples/advanced/relationships.py).
320320

321321
```python
322-
from PowerPlatform.Dataverse.models.metadata import (
322+
from PowerPlatform.Dataverse.models.relationship import (
323323
LookupAttributeMetadata,
324324
OneToManyRelationshipMetadata,
325325
ManyToManyRelationshipMetadata,
326-
Label,
327-
LocalizedLabel,
328326
)
327+
from PowerPlatform.Dataverse.models.labels import Label, LocalizedLabel
329328

330329
# Create a one-to-many relationship: Department (1) -> Employee (N)
331330
# This adds a "Department" lookup field to the Employee table

examples/advanced/relationships.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@
2020
import time
2121
from azure.identity import InteractiveBrowserCredential
2222
from PowerPlatform.Dataverse.client import DataverseClient
23-
from PowerPlatform.Dataverse.models.metadata import (
23+
from PowerPlatform.Dataverse.models.relationship import (
2424
LookupAttributeMetadata,
2525
OneToManyRelationshipMetadata,
2626
ManyToManyRelationshipMetadata,
27-
Label,
28-
LocalizedLabel,
2927
CascadeConfiguration,
3028
)
29+
from PowerPlatform.Dataverse.models.labels import Label, LocalizedLabel
3130
from PowerPlatform.Dataverse.common.constants import (
3231
CASCADE_BEHAVIOR_NO_CASCADE,
3332
CASCADE_BEHAVIOR_REMOVE_LINK,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "PowerPlatform-Dataverse-Client"
7-
version = "0.1.0b3"
7+
version = "0.1.0b6"
88
description = "Python SDK for Microsoft Dataverse"
99
readme = {file = "README.md", content-type = "text/markdown"}
1010
authors = [{name = "Microsoft Corporation"}]
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT license.
33

4-
from .__version__ import __version__
4+
from importlib.metadata import version
5+
6+
__version__ = version("PowerPlatform-Dataverse-Client")
57

68
__all__ = ["__version__"]

src/PowerPlatform/Dataverse/__version__.py

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

src/PowerPlatform/Dataverse/claude_skill/dataverse-sdk-use/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ client.tables.delete("new_Product")
238238

239239
#### Create One-to-Many Relationship
240240
```python
241-
from PowerPlatform.Dataverse.models.metadata import (
241+
from PowerPlatform.Dataverse.models.relationship import (
242242
LookupAttributeMetadata,
243243
OneToManyRelationshipMetadata,
244244
Label,
@@ -270,7 +270,7 @@ print(f"Created lookup field: {result['lookup_schema_name']}")
270270

271271
#### Create Many-to-Many Relationship
272272
```python
273-
from PowerPlatform.Dataverse.models.metadata import ManyToManyRelationshipMetadata
273+
from PowerPlatform.Dataverse.models.relationship import ManyToManyRelationshipMetadata
274274

275275
relationship = ManyToManyRelationshipMetadata(
276276
schema_name="new_employee_project",

0 commit comments

Comments
 (0)