Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Rewrite README as a lean, capability-organized quickstart - #197

Merged
Vikas Rathee (vrathee-msft) merged 6 commits into
mainfrom
users/suyask/lean-readme
Sep 5, 2026
Merged

Rewrite README as a lean, capability-organized quickstart#197
Vikas Rathee (vrathee-msft) merged 6 commits into
mainfrom
users/suyask/lean-readme

Conversation

@suyask-msft

Copy link
Copy Markdown
Collaborator

What

Rewrites the package README as a lean, capability-organized quickstart (~240 lines, down from ~1150). Microsoft Learn and examples/ remain the source of truth for exhaustive depth; the README is the agent- and PyPI-facing quickstart.

Why

The README is the PyPI page and the doc surface coding agents keep in-context. The long comprehensive README duplicated Learn (and had drifted from it) and buried the high-value paths. This trims it to a fast, accurate quickstart and routes depth to Learn.

Key changes

  • Usage organized by capability -- Create/read/update/delete, Query records, Define and evolve schema, Work in bulk, Async client, Handle errors -- ordered by how often each is reached for (queries and metadata reads dominate production usage).
  • Concept taught inline + contextual pointers -- each section explains its concept where the code shows it, then deep-links the matching Learn article and runnable sample.
  • Removed duplication -- dropped the flat Learn link list that mirrored the inline pointers (kept only orientation links: Overview / Quick guide / Getting started); the intro no longer re-lists Key features; Key features tightened to scannable fragments; the async section no longer re-instructs the [async] install.
  • Verified against source -- single create returns a GUID str; retrieve returns None on 404; tables.create takes a typed-column dict; create_lookup_field; the error hierarchy has 5 classes including SQLParseError (the live error-handling Learn page lists only 3 -- the README follows the code).
  • PyPI-safe links -- all repo links are absolute https://; ASCII-only; no relative links.
  • Single client construction -- shown once, as a context manager (Authenticate builds only the credential).
  • Contributing / CLA / Trademarks preserved verbatim from main (only the operations/ link was made absolute for PyPI).

Reviewer action

  • Confirm the capability coverage and ordering match how you want the SDK presented.
  • Run the six Usage code blocks against a live org (CRUD, Query, Schema, Bulk, Async, Errors) to confirm they execute as written before merge.
  • Decide on the two API Design Guidelines points that assume the old comprehensive-README model ("add a README example per public method" and "keep README and SKILL in sync") -- left verbatim; they may want revisiting under the lean-README approach.

Verification done

  • All links checked: repo paths exist on main; the Learn / Microsoft URLs resolve to the correct topic and match the section that links them; PyPI page and badges resolve.
  • Exception import validated against src/.../core/errors.py (all 5 classes exported).
  • ASCII-clean, balanced code fences, no leftover template placeholders.
  • Mandatory Contributing / CLA / Trademarks byte-identical to origin/main.

Note: the "preview" banner on the current PyPI page is a stale-snapshot artifact from the 1.0.0 publish; it is already removed on main, and publishing 1.0.1 clears it. Out of scope here.

Replace the ~1150-line comprehensive README with a ~240-line quickstart
organized by capability, deferring exhaustive depth to Microsoft Learn and
examples/.

- Usage organized by capability (CRUD, Query, Schema, Bulk, Async, Errors),
  ordered by production operation usage (queries and metadata reads dominate).
- Each section teaches its concept inline and deep-links the matching Learn
  article plus runnable sample; removed the flat Learn mirror that duplicated
  those inline links.
- Example code verified against source (single create -> str, retrieve -> None
  on 404, tables.create typed-column dict, create_lookup_field, 5-class error
  hierarchy incl. SQLParseError).
- Absolute https links throughout for PyPI safety; ASCII-only.
- Client constructed once, as a context manager.
- Contributing / CLA / Trademarks preserved verbatim.
Copilot AI lite review requested due to automatic review settings September 4, 2026 06:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A couple of README examples are misleading/unsafe as written (BulkDelete async job semantics and async credential lifecycle) and should be corrected before merge.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR rewrites README.md into a shorter, capability-organized quickstart intended for PyPI and agent in-context usage, with deeper documentation routed to Microsoft Learn and examples/.

Changes:

  • Restructures usage guidance by capability (CRUD, querying, schema, bulk, async, errors) with shorter runnable snippets.
  • Replaces the long table-of-contents style README with a leaner quickstart and curated deep links to Learn + samples.
  • Updates contributing section link(s) to be PyPI-safe (absolute GitHub URLs).
File summaries
File Description
README.md Replaces the comprehensive README with a lean quickstart organized by common SDK capabilities and pointers to Learn/examples.
Review details

Suppressed comments (1)

README.md:142

  • client.records.delete("account", ids) returns the BulkDelete async job id by default. The snippet currently discards that value and reads like the records are deleted synchronously, which isn't accurate for BulkDelete.
# Apply the same change to every record, then delete them all
client.records.update("account", ids, {"industrycode": 1})
client.records.delete("account", ids)
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md
Abel Milash added 5 commits September 4, 2026 15:31
- Remove SQLParseError from the error example; it is exported but never raised (0 raise sites in the shipped package). Unsupported SQL surfaces as ValidationError.
- Add HTTP 502 to the is_transient list; TRANSIENT_STATUS is {429, 502, 503, 504}.
- Add a usage section for files.upload and client.batch, both listed under Key features but previously unexemplified.
- Convert prose -- to em dashes, matching the existing README style. Code blocks left ASCII.
- Drop new_Name from tables.create: the primary name column is created automatically as <prefix>_Name, so listing it submits a duplicate attribute in the same CreateEntities request. No example or test in the repo declares one.
- Create new_Task before the lookup that references it, and note that relationship methods take lowercase logical names.
- Note that upsert requires an existing alternate key whose index has reached Active, per examples/advanced/alternate_keys_upsert.py.
- Close the async credential. AsyncDataverseClient.aclose() releases only its own
  session and caches, never the caller's credential, and every async example in the
  repo closes it explicitly. Use a single 'async with' for both.
- Correct BulkDelete docs. delete() takes use_bulk_delete=True by default with no size
  threshold, so 'for large sets' was wrong; it also returns a job ID and completes in
  the background. Capture the ID in the snippet, matching the SDK docstring.
- Restore a table of contents, nested under Usage so the capability sections read in
  context. PyPI offers no outline of its own and rewrites in-page anchors so they
  resolve; all 13 verified against GitHub's markdown renderer.
Cut 27 lines to 15. Drops the changeset code sample and the inline comments; the transactional behaviour is stated in prose and batch.py covers the detail.
@vrathee-msft
Vikas Rathee (vrathee-msft) merged commit b3a7d66 into main Sep 5, 2026
9 checks passed
@vrathee-msft
Vikas Rathee (vrathee-msft) deleted the users/suyask/lean-readme branch September 5, 2026 20:36
abelmilash-msft added a commit that referenced this pull request Sep 8, 2026
Release changelog for v1.0.1.

Adds the `[1.0.1]` section covering the single user-facing change since
v1.0.0: the preview notice removed in #190.

Context on the entry:

- v1.0.0 was published as a GA release (`prerelease=false`), but the
README shipped inside it still carried an `[!IMPORTANT]` notice saying
the library was "currently in **preview**" and "may contain breaking
changes". Because README.md is the PyPI long description, that notice is
still visible on the package page today.
- Nothing about the library's support status changed between 1.0.0 and
1.0.1 — only the incorrect text was removed. It is therefore filed under
**Fixed** rather than **Changed**, so the changelog does not imply GA
happened in 1.0.1.
- The README rewrite (#197) is intentionally excluded per the release
guide's "documentation-only updates" rule.

Also rebases the `[Unreleased]` compare link from `v1.0.0...HEAD` to
`v1.0.1...HEAD` and adds the `[1.0.1]` compare link.

No code changes.

Co-authored-by: Abel Milash <[email protected]>
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.

5 participants