Skip to content

fix(py-sdk): ship PEP 561 py.typed marker#1002

Merged
SnowboardTechie merged 2 commits into
HOLD-filtersfrom
bryan/infallible-tereshkova-68b04b
Jul 13, 2026
Merged

fix(py-sdk): ship PEP 561 py.typed marker#1002
SnowboardTechie merged 2 commits into
HOLD-filtersfrom
bryan/infallible-tereshkova-68b04b

Conversation

@SnowboardTechie

@SnowboardTechie SnowboardTechie commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Ships a PEP 561 py.typed marker for common-grants-sdk so downstream type checkers use the SDK's inline annotations instead of treating every import as untyped.
  • Fixes the version CI job so it handles more than one Python changeset per release (surfaced by adding this changeset alongside the filters one).
  • Time to review: 3 minutes

Changes proposed

  • Add empty lib/python-sdk/common_grants_sdk/py.typed marker + a common-grants-sdk patch changeset.
  • ci-bump-version.yml: write the (possibly multiline) py_changelog to $GITHUB_OUTPUT via the heredoc form instead of key=value.

Context for reviewers

py.typed — the package is fully type-annotated but shipped no marker, so mypy reported import-untyped on every common_grants_sdk import and consumers got no type-checking from the SDK. Brings the Python SDK to parity with the TypeScript SDK (which ships its .d.ts). Verified the marker lands in the built wheel — Poetry includes it via the existing packages config, no pyproject change:

$ poetry build -f wheel && unzip -l dist/*.whl | grep py.typed
        0  ...  common_grants_sdk/py.typed

CI fix — the version job greps all changesets for "common-grants-sdk": and wrote the result to $GITHUB_OUTPUT as key=value. Once two changesets bump the package (the filters minor already on HOLD-filters + this patch), the grep result is multiline and GitHub Actions rejects the key=value write. The heredoc form handles any number of changesets. This job also runs on push to main, so the bug would otherwise have blocked the Python version bump/tag when HOLD-filters merges to main with both changesets present.

Targets HOLD-filters so py.typed ships in the same coordinated common-grants-sdk release as the filters API.

Additional information

Empty marker file; the CI change is workflow-only. No runtime or API change.

The package is fully type-annotated but shipped no py.typed marker, so
downstream type checkers treated every common_grants_sdk import as
untyped. Adding the marker lets consumers pick up the SDK's inline
annotations, matching the TypeScript SDK which already ships its .d.ts.
@github-actions github-actions Bot added python Issue or PR related to Python tooling sdk Issue or PR related to our SDKs py-sdk Related to Python SDK labels Jul 10, 2026
The version job greps all changesets for "common-grants-sdk" and wrote
the result to $GITHUB_OUTPUT as key=value. When more than one changeset
bumps the package (a feature + this py.typed patch), the grep result is
multiline and GitHub Actions rejects the key=value form. Use the heredoc
delimiter form so any number of changesets is handled.
@SnowboardTechie SnowboardTechie marked this pull request as ready for review July 13, 2026 22:20
@SnowboardTechie SnowboardTechie merged commit 20795f0 into HOLD-filters Jul 13, 2026
4 checks passed
@SnowboardTechie SnowboardTechie deleted the bryan/infallible-tereshkova-68b04b branch July 13, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

py-sdk Related to Python SDK python Issue or PR related to Python tooling sdk Issue or PR related to our SDKs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant