Skip to content

Adopt bblocks-projects template standard#36

Merged
jm-rivera merged 1 commit into
mainfrom
chore/bblocks-parity
Jun 15, 2026
Merged

Adopt bblocks-projects template standard#36
jm-rivera merged 1 commit into
mainfrom
chore/bblocks-parity

Conversation

@jm-rivera

Copy link
Copy Markdown
Collaborator

Brings the repo up to parity with the bblocks-projects package template and makes it a managed project — bblocks-projects doctor is green and future template changes can be pulled with bblocks-projects update.

Managed-project setup

  • .copier-answers.yml (new) pinned to template @22c0aa6project_type: package, python_version: "3.11", github_username: ONEcampaign.
  • src/oda_reader/py.typed (new) — type info now ships in the wheel.

Tooling & config

  • pyproject: Python floor unified to 3.11; ruff gains ANN/ERA/PERF + google pydocstyle; added ty config (pandas/numpy suppressed to keep diagnostics genuine), [tool.coverage]; build backend bumped to uv_build>=0.11.8; dropped deprecated PEP 639 license classifier.
  • pre-commit: refreshed ruff (ruff-check) + pre-commit-hooks v6.0.0; added ty, codespell, actionlint, mdformat.

CI/CD

  • tests.ymlci.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 + GitHub pypi environment (restricted to v* tags) configured; old PYPI_API_TOKEN removed.

Type enforcement

Added full public-API type annotations and fixed all ty diagnostics. Genuine bugs caught:

  • query_builder.py — filter builders typed int but "+".join()-ed them → latent TypeError on integer codes.
  • xml_tools.pyread_mapping(mapping_path: str, …, update: callable)str | Path + collections.abc.Callable (called with Path everywhere; callable is not a valid annotation).
  • aiddata.pystart_year/end_year: int = Noneint | None.
  • ci.yml — actionlint caught codecov-action filefiles.

Docs

  • README: added Development setup + Releasing (trusted-publishing) sections.

Verification

ruff check ✓ · ruff format --check ✓ · ty check ✓ · pytest -m "not integration"149 passed · pre-commit run --all-files ✓ · bblocks-projects doctorHealthy · uv build ✓ (py.typed in wheel).

Note: most of the markdown diff is mdformat reformatting (cosmetic).

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
@jm-rivera jm-rivera merged commit 825b597 into main Jun 15, 2026
10 checks passed
@jm-rivera jm-rivera deleted the chore/bblocks-parity branch June 15, 2026 09:41
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