Skip to content

fix(deps): support common-grants-sdk 0.9 - #3

Merged
SnowboardTechie merged 4 commits into
mainfrom
bryan/sdk-0.9
Oct 28, 2026
Merged

SnowboardTechie merged 4 commits into
mainfrom
bryan/sdk-0.9

Conversation

@SnowboardTechie

@SnowboardTechie SnowboardTechie commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The template now ships common-grants-sdk 0.9, so readers following the website guides get the current SDK without upgrading it themselves.

Changes proposed

  • Raise common-grants-sdk to ^0.9.0 and lock 0.9.0 (from 0.8.1).
  • Pass snake_case constructor arguments where 0.9 requires them: SearchSorting(sort_by=...) for the default search sorting, and PaginatedBodyParams(page_size=...) in three test fixtures. sortOrder= stays because the template's SearchSorting declares that alias itself.
  • Update the supported SDK range in the README to 0.9.0 up to, but not including, 0.10.0.
  • Show common-grants-sdk 0.9.0 in the bug report template's example versions.
  • Separate commits clear advisories that fail make audit on main:

Context for reviewers

make install, make ci and make audit all exit 0 in a clean Python 3.11 environment, and the sdk-range job's steps pass locally (0.9.0 is the newest release in range). Under make dev, the README's list, search and /openapi.json requests and /docs all return 200.

Additional information

API responses, including the default search order and page size, are unchanged.

@SnowboardTechie
SnowboardTechie marked this pull request as ready for review October 27, 2026 16:55
@SnowboardTechie
SnowboardTechie merged commit 37e797e into main Oct 28, 2026
2 checks passed
@SnowboardTechie
SnowboardTechie deleted the bryan/sdk-0.9 branch October 28, 2026 16:48
SnowboardTechie added a commit to HHS/simpler-grants-protocol that referenced this pull request Oct 28, 2026
…itory (#1340)

### Summary

- Part of #1184
- Builds on #1348, now merged; rebased onto `main`.
- Depends on common-grants/cg-api-template-fastapi#3 (SDK 0.9 in the
template) and on the CLI 0.5.0 release (#1346) for the spec-check step.
- Time to review: 10 minutes

The Python guide now starts from the [FastAPI template
repository](https://github.com/common-grants/cg-api-template-fastapi)
instead of `cg init`, which ADR 0029 retires. A reader goes from "Use
this template" to a working first request.

### Changes proposed

On top of #1348:

- Getting started: "Use this template" and `git clone` replace `mkdir`
and `cg init`. Adds the template's `make ci` check and three `curl`
requests. The project tree matches the template.
- Corrections for the template: `schemas/opportunity.py`, the
`OpportunityRepository` interface and `create_app()` replace file and
class names the template doesn't have. The custom-fields plugin goes in
`opportunity.py`, so the Pyright workaround is no longer needed.
- "Upgrade the SDK" becomes "Upgrading from an earlier SDK", after the
getting-started flow, for projects on SDK 0.8. It uses `^0.9.0` and
names the template's real renames: `SearchSorting(sort_by=...,
sortOrder=...)` and `PaginatedBodyParams(page_size=...)` in tests.
- The spec check runs in synchronized pnpm, npm, and bun tabs. Removes
`make check-spec`, which the template doesn't have.
- Title: "Using Python".
- Removes this page from the `cg init` checklist in
`lib/cli/DEVELOPMENT.md`.

Kept from #1348: the page structure, the SDK module table and awards
note, the snake_case explanation, spec validation, data validation, and
the plugin example.

### Context for reviewers

Each change is its own commit, so the diff can be read commit by commit.

### Additional information

Every documented command ran on a fresh clone of template PR 3
(`3a5cc86`), including the custom-fields plugin. `make ci` passed (109
tests), and the spec check passed through pnpm, npm, and bun with the
CLI packed from #1346 (3 award-route warnings). Following the upgrade
section on template `main` (`c5e11ca`, SDK 0.8.1) gives a passing `make
ci` on SDK 0.9. The website build, lint, format, and spell checks pass.
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.

1 participant