Uh oh!
There was an error while loading. Please reload this page.
Modernize dev tooling (uv, Ruff, Pyrefly, pydantic v2, click 8, GH Actions) - #16
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).
Hi @orta , there is the MR 🚀 I have two questions:
THanks! |
orta
commented
Jul 27, 2026
Well, you do have a comprehensive test suite to work from in danger-js (which is how I made risk) Part of what made it easy to make other dangers in the past is that all the complexity with git/github/gitlab/etc gets stored in danger-js, which is what you'd be taking on. I think if you went with a much more minimal 'GitHub/GitLab' only approach then it could be reasonable? |
Uh oh!
There was an error while loading. Please reload this page.
orta
commented
Jul 27, 2026
The baselines all seem fine to me, I'd treat this like it was a new project, to my knowledge no-one is using it |
giancarlosisasi
commented
Jul 28, 2026
mmm thanks for the info |
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.