Skip to content

Make public names consistent before the public release - #16

Merged
jayqi merged 3 commits into
mainfrom
prepare-for-public-release
Nov 19, 2026
Merged

jayqi merged 3 commits into
mainfrom
prepare-for-public-release

Conversation

@chrisjkuch

Copy link
Copy Markdown
Collaborator

Renames functions, arguments and errors so the API matches PDC's endpoints and follows one convention. Also brings the README in line with the code and tidies the tests and tooling.

Changes

  • Function renames: get_basefields → get_base_fields, create_changemaker_proposal → create_proposal, create_changemaker_proposal_version → create_proposal_version, register_file_upload → create_file.
  • Argument renames:
    • get_application_form takes application_form_id.
    • list_permission_grants filters by changemaker_id, funder_short_code and proposal_id.
    • The grant create and update functions take grant instead of spec.
  • Errors: the four resource not-found errors subclass PDCNotFoundError and name the missing record. ChangemakerFieldValueBatchNotFoundError and TokenRequestError can be imported from pdc_api_client.
  • Seeding:
    • ensure_*_for_kc_org is now ensure_*_for_keycloak_org.
    • The seeding copy of link_changemaker_to_proposal is gone in favor of the client function.
    • The proposal seeders share one helper.
  • README fixes: /sources coverage, the get_base_fields return type, the "other writes" list, and the retry behavior now match the code.
  • Tests: one Test<Subject> class per function, with methods named test_<behavior>. AGENTS.md now records this. Shared integration fixtures moved into conftest.py.
  • Tooling:
    • test and integration share one private just recipe, and so do the type checkers.
    • Every CI step has a name, and the test job is now unit-tests-and-type-checks.
    • Only just pdc up refetches the stack files.

Bonus:

  • Removed a comment that named Render as PDC's host.
  • Made error message wording consistent.
  • Fixed the misleading comment in integration_tests/pytest.ini.

Notes

Risks: The renames break callers of 0.3.0. They are reversible with effort, and pdc-exchange needs about 110 call sites updated when it upgrades. The CHANGELOG lists every rename under Unreleased.

The version stays at 0.3.0. The release PR should bump it to 0.4.0.

🤖 Generated with Claude Code

chrisjkuch and others added 2 commits November 18, 2026 17:49
`test` and `integration` share a private `_pytest` recipe, and the type
checkers share `_typecheck`. Every CI step has a name, and the `test`
job is now `unit-tests-and-type-checks`. Only `just pdc up` refetches
the stack files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rename functions and arguments to match the endpoints and the rest of
the client, make every not-found error a PDCNotFoundError, and fix the
README where it disagreed with the code. Tests use one Test<Subject>
class per function, and shared integration fixtures live in conftest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chrisjkuch
chrisjkuch marked this pull request as ready for review November 18, 2026 19:37
@chrisjkuch
chrisjkuch requested a review from jayqi November 18, 2026 19:37
@chrisjkuch

Copy link
Copy Markdown
Collaborator Author

@jayqi mostly just trying to tidy things up, let me know after this if there's anything you'd like to do before we make it public.

…lease

# Conflicts:
#	.github/workflows/ci.yml

@jayqi jayqi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. I fixed a minor merge conflict.

@jayqi
jayqi merged commit 7242ce7 into main Nov 19, 2026
7 checks passed
@jayqi
jayqi deleted the prepare-for-public-release branch November 19, 2026 02:43
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.

2 participants