Skip to content

Fix multiple issues in README documentation#186

Merged
vrathee-msft merged 14 commits into
mainfrom
users/vikasrathee/readmefixes
May 28, 2026
Merged

Fix multiple issues in README documentation#186
vrathee-msft merged 14 commits into
mainfrom
users/vikasrathee/readmefixes

Conversation

@vrathee-msft
Copy link
Copy Markdown
Contributor

This pull request significantly improves the documentation for the Dataverse Python SDK, focusing on clearer authentication setup, improved async usage guidance, enhanced exception handling documentation, and more accurate and idiomatic code examples. The changes help new and existing users better understand both basic and advanced SDK usage, error handling, and recommended best practices.

Authentication and credential setup:

  • Expanded and clarified instructions for production authentication, including detailed comments and links for setting up ClientSecretCredential and CertificateCredential, and emphasized the need to register an Azure AD application and configure permissions.
  • Added a reference link to the Azure Identity documentation for further guidance.

Async client usage and documentation:

  • Added notes and code comments throughout the async sections in both README.md and .claude/skills/dataverse-sdk-use/SKILL.md to clarify that async code fragments require an async def main() context, and that await cannot be used at the top level. [1] [2] [3] [4] [5] [6] [7]
  • Updated async code snippets to show proper credential instantiation and improved context management examples. [1] [2] [3] [4]

Exception handling and troubleshooting:

  • Added a comprehensive section detailing the SDK's exception hierarchy, including a diagram and table explaining when each error type is raised and how to handle them. Provided explicit examples for handling ValidationError, MetadataError, SQLParseError, HttpError, and network errors (httpx/aiohttp).
  • Clarified that continue_on_error in batch operations only affects server-side failures, not client-side validation or metadata errors.

Code correctness and idiomatic usage:

  • Updated all relationship and metadata access in code examples to use attribute access (e.g., result.lookup_schema_name) instead of dictionary-style access, reflecting the actual SDK API and improving code reliability. [1] [2] [3] [4] [5]
  • Improved and corrected query builder examples to use realistic and relevant fields, such as using email and creditlimit instead of deprecated or less common fields.

Bulk and upsert operations:

  • Added a new section with code for setting up alternate keys before performing upsert operations, clarifying the one-time setup required and how to check key status.
  • Updated bulk update examples to use the correct field (exchangerate) and improved comments for clarity.

These changes collectively make the documentation more accurate, user-friendly, and robust for both synchronous and asynchronous SDK usage.

References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21]

Copilot AI review requested due to automatic review settings May 28, 2026 17:48
@vrathee-msft vrathee-msft requested a review from a team as a code owner May 28, 2026 17:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documentation-only PR that tightens the README and Claude skill files: corrects dict-style relationship access to attribute access (matching the typed RelationshipInfo dataclass), clarifies that async snippets are fragments meant to be embedded in async def main(), expands authentication and exception-hierarchy guidance, and adds an alternate-key setup walkthrough plus minor query/bulk-update tweaks. Also fixes two operation docstring examples.

Changes:

  • Replace result['lookup_schema_name'] / rel['SchemaName'] / result['relationship_id'] style access with .lookup_schema_name / .relationship_schema_name / .relationship_id attribute access throughout README and both SKILL.md copies.
  • Add async-fragment notes, alternate-key setup section, len(results) count guidance, records.get() deprecation note, and a new exception-hierarchy/troubleshooting section.
  • Update authentication block with detailed ClientSecretCredential setup comments and an Azure Identity reference link.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Major doc revisions: auth guidance, async fragment notes, alternate-key setup, attribute access on relationships, expanded exception hierarchy/troubleshooting (introduces httpx references and a credential mix-up in async Quick start).
.claude/skills/dataverse-sdk-use/SKILL.md Mirrors README updates for relationship attribute access and async fragment notes.
src/PowerPlatform/Dataverse/claude_skill/dataverse-sdk-use/SKILL.md Packaged copy of the same skill, kept in sync with the repo copy.
src/PowerPlatform/Dataverse/operations/tables.py Fixes docstring example to use result.lookup_schema_name.
src/PowerPlatform/Dataverse/aio/operations/async_tables.py Same docstring fix for the async variant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread README.md
Comment thread README.md
Comment thread README.md
@vrathee-msft vrathee-msft merged commit 5e27de2 into main May 28, 2026
9 checks passed
@vrathee-msft vrathee-msft deleted the users/vikasrathee/readmefixes branch May 28, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants