Modernize dev tooling (uv, Ruff, Pyrefly, pydantic v2, click 8, GH Actions)#16
Open
giancarlosisasi wants to merge 9 commits into
Open
Modernize dev tooling (uv, Ruff, Pyrefly, pydantic v2, click 8, GH Actions)#16giancarlosisasi wants to merge 9 commits into
giancarlosisasi wants to merge 9 commits into
Conversation
Also consolidate tooling config by moving from setup.cfg to pyproject.toml
- README: uv/ruff/pyrefly dev workflow, GitHub Actions CI badge + static Python 3.13|3.14 badge, Python 3.13+ requirements, GHA CI-step example (replacing Travis), checkout@v4 - CHANGELOG: 0.2.0 entry documenting the toolchain modernization and BREAKING Python/pydantic/click bumps - pyproject/uv.lock: bump version 0.1.0 -> 0.2.0
Resolve the 50 pyrefly errors in tests/ that were downstream of the pydantic v2 Optional fields (closes task 4.6): - builder.py: widen build_types param list[SchemaItem] -> Sequence[SchemaItem] (covariant, read-only) to accept list[SchemaObject]/list[SchemaEnum] - fixtures/danger.py: fix **kwargs annotation (dict[str, Any] -> list[str]) - conftest.py: narrow patcher.fs; pass b'' instead of None to MockPopen stdout - test_danger/test_models/test_plugins: assert-is-not-None narrowing guards for Optional model fields - test_plugins: add explicit danger-property cache test (preserves plugins.py branch coverage) Full gate green on Python 3.13 and 3.14: ruff format/check, pyrefly (0 errors), pytest (100% coverage).
Author
|
Hi @orta , there is the MR 🚀 I have two questions:
THanks! |
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.
Summary
Follow-up to #14
This PR modernizes danger-python's development toolchain and runtime dependencies, replacing the 2019-era stack (Poetry, black, isort, flake8, pylint, mypy, Travis) with current tools. What Danger does is unchanged; the goal is just to make the project easier to build, lint, type-check and test on modern Python.
Compatibility note: the package is still pre-1.0 (this bumps it to 0.2.0), so these changes fall within what semver allows for a 0.x release. The two things worth flagging are that the minimum Python is now 3.13, and the runtime deps move to pydantic v2 and click 8. Happy to adjust the Python floor if you'd prefer a gentler baseline.
Toolchain changes
uv.lock)>=3.13setup.cfgpyproject.tomlonlyWhat is preserved
pyproject.tomlkeepsfail_under = 100under[tool.coverage.report], so the suite still fails below full coverage.tests/fixtures/are untouched. The only fixture edits are typing cleanups in the.pyhelpers (Dict[str, Any]becomeslist[str],Optional[str]becomesstr | None).CI
Adds
.github/workflows/ci.ymlwith two jobs, both installing viauv sync --frozen: aqualityjob that runsruff format --check,ruff check, andpyrefly checkon Python 3.14, and atestjob that runspytestwith the coverage gate across a 3.13 / 3.14 matrix. It also adds a newaction.yml, updates theDockerfile, and bumpsactions/checkoutto v4 in the existingdanger.yml.Notes for reviewers
Given the size, I'm happy to split this into smaller, independently reviewable PRs (uv, then Ruff, then Pyrefly, then pydantic v2, then click 8, then CI) if that's easier to review. I can also raise or lower the minimum Python version if a less aggressive baseline works better for you.