chore: align project conventions (ruff, CI, pre-commit, Pydantic v2)#4
Merged
Conversation
Mirror the labelfirst gold standard: select E/F/I/B/UP/SIM/PL at line-length 100, same PL ignores (PLR0913/PLR0915/PLR0912/PLR2004/ PLR0124/PLC0415), per-file ignores for tests. Ran ruff check --fix + ruff format across src and tests. Kept the full ruleset (B/PL leave 0 unfixable errors). Residual non-auto-fixable E501 (long string/comment lines), two PLR1704 loop-var shadows, and one E712 are confined per-file rather than hand-edited, to avoid logic-adjacent changes; flagged for later cleanup. Config lives in a new pyproject.toml [tool.ruff] block (repo had no build/lint config); no packaging backend added.
Mirror labelfirst's minimal CI: a lint job (ruff check + ruff format --check on src/tests) and a test job (pytest) across Python 3.11-3.13. Installs runtime deps from requirements.txt via uv (repo has no packaging metadata). Also adds .pre-commit-config.yaml with ruff + ruff-format pinned to v0.15.14 to match CI.
Keep-a-Changelog CHANGELOG.md reconstructed from git history and the README. Documents the 1.0.0 initial release, 1.0.1, and 1.1.0, plus the Unreleased tooling work (test suite, ruff, CI, pre-commit).
class-based `class Config` is deprecated in Pydantic v2 (warned at import, removed in v3). Replace with `model_config = ConfigDict(arbitrary_types_allowed=True)`. No behaviour change; clears the deprecation warning.
f0a6355 to
d72c907
Compare
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 harpia in line with common Python project conventions:
ruff formatacross the codebaseruff check,ruff format --check, andpytestsrc/model/config.pyfrom class-basedConfigtomodel_config = ConfigDict(...), removing the v2 deprecation warningMost of the diff is mechanical reformatting. Behavior is unchanged; the existing 18-test suite passes.
AI (Claude) supported my development of this PR.