chore: adopt bblocks-projects standards + enforce ty/ANN#160
Merged
Conversation
Bring the repo to parity with the bblocks-projects copier template and make it managed going forward. Tooling/config: - Add .copier-answers.yml (package type) so `bblocks-projects update`/`doctor` work - Modernize .pre-commit-config.yaml: ruff v0.15.12, hooks v6, add ty/codespell/ actionlint/mdformat - pyproject: bump uv_build, add [tool.ty] config, ruff ERA/PERF/ANN + google pydocstyle, migrate pytest.ini -> [tool.pytest.ini_options]/[tool.coverage.*] - CI: new ci.yml (lint+type+test jobs) + lightweight macOS/Windows smoke job; release.yml switched to PyPI OIDC trusted publishing - Normalize markdown/JSON via new formatters Types (ty + ANN now blocking, both clean): - Add annotations and fix ~150 src findings (79 ANN + 71 ty) - Fix latent bugs found along the way: channels.py regex (\d -> \b), indicator.py dataclass default (str -> ""), dac1/oecd.py int key lookup All 515 tests pass; ruff/ty/pre-commit all green.
oda_data keeps test deps (pytest, pytest-cov, ...) in a separate 'test' dependency-group, so 'uv sync --frozen' (dev only) left pytest uninstalled. Add --group test to the test-running jobs.
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 to parity with the bblocks-projects copier template and makes it managed going forward (
bblocks-projects update/doctornow work via.copier-answers.yml).Tooling & config
.copier-answers.yml— repo is now a managedpackage-type project.v0.15.12, hooksv6, addedty,codespell,actionlint,mdformat.uv_build; added[tool.ty]config; ruff gainedERA/PERF/ANN+ google pydocstyle; migratedpytest.ini→[tool.pytest.ini_options]/[tool.coverage.*](markers preserved).ci.ymlwith a lint+type job (previously absent) and a lightweight macOS/Windows smoke job on top of the Linux version matrix.release.ymlswitched to PyPI OIDC trusted publishing (thepypienvironment + publisher are configured).Types —
ty+ANNfully enforced (blocking)ANN+ 71ty);ruff check .andty check src/oda_dataare both clean and now block in pre-commit + CI.clean_data/channels.pyregex\devlopment→\bdevelopment(the\ddigit-class typo never matched).indicators/indicator.pydataclass defaultfield(default=str)(thestrclass!) →"".indicators/dac1/oecd.pyflow_names[flow]→flow_names[int(flow)].Notes / follow-ups
indicators/dac1/oecd.pychange anddac1/common.py::dac1_aid_flow_type_mapping()(suspectedflow_typevsflowtype_codekey bug, not fixed) are on 0%-coverage paths — worth a separate look.ci.yml.jinjausescodecov-action's oldfile:input; corrected tofiles:here.All 515 tests pass.