Adopt bblocks-projects template standard#36
Merged
Conversation
Bring the repo to parity with the bblocks-projects package template and make it a managed project (doctor green; future `bblocks-projects update` works). - Add .copier-answers.yml (project_type=package, python 3.11) + py.typed - pyproject: unify Python floor to 3.11; add ruff ANN/ERA/PERF + pydocstyle; add ty config (pandas/numpy suppressed); add coverage config; bump uv_build - pre-commit: refresh ruff/hooks; add ty, codespell, actionlint, mdformat - CI: tests.yml -> ci.yml with a lint+type-check job; keep OS-matrix tests; add coverage + codecov upload - release.yml: migrate to PyPI trusted publishing (OIDC) - Add full public-API type annotations and fix all ty diagnostics (incl. genuine fixes in query_builder, xml_tools read_mapping, aiddata) - README: document development setup and the trusted-publishing release flow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the repo up to parity with the
bblocks-projectspackage template and makes it a managed project —bblocks-projects doctoris green and future template changes can be pulled withbblocks-projects update.Managed-project setup
.copier-answers.yml(new) pinned to template@22c0aa6—project_type: package,python_version: "3.11",github_username: ONEcampaign.src/oda_reader/py.typed(new) — type info now ships in the wheel.Tooling & config
ANN/ERA/PERF+ google pydocstyle; addedtyconfig (pandas/numpy suppressed to keep diagnostics genuine),[tool.coverage]; build backend bumped touv_build>=0.11.8; dropped deprecated PEP 639 license classifier.ruff-check) + pre-commit-hooksv6.0.0; addedty,codespell,actionlint,mdformat.CI/CD
tests.yml→ci.yml: new lint + type-check job (ruff check, ruff format --check, ty); kept the OS-matrix / integration / cache test design; added coverage + codecov upload.release.yml: migrated to PyPI trusted publishing (OIDC, no secrets). PyPI trusted publisher + GitHubpypienvironment (restricted tov*tags) configured; oldPYPI_API_TOKENremoved.Type enforcement
Added full public-API type annotations and fixed all
tydiagnostics. Genuine bugs caught:query_builder.py— filter builders typedintbut"+".join()-ed them → latentTypeErroron integer codes.xml_tools.py—read_mapping(mapping_path: str, …, update: callable)→str | Path+collections.abc.Callable(called withPatheverywhere;callableis not a valid annotation).aiddata.py—start_year/end_year: int = None→int | None.ci.yml— actionlint caughtcodecov-actionfile→files.Docs
Verification
ruff check✓ ·ruff format --check✓ ·ty check✓ ·pytest -m "not integration"→ 149 passed ·pre-commit run --all-files✓ ·bblocks-projects doctor→ Healthy ·uv build✓ (py.typed in wheel).