-
-
Notifications
You must be signed in to change notification settings - Fork 22
Optimise Python tooling infrastructure #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Removes `setup.cfg` and `tests` directory from distribution - Added missing `.gitignore` entry for `mypy`
- Matches gherkin repository implementation
- Explicit trusted publishing for uv - Run pre-commit through uv backend
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #324 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 200 200
=========================================
Hits 200 200 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Run mypy through pre-commit - Run Python test workflow through uv - Use Python dependency groups standard
0e2731b
to
570d4da
Compare
a6238d7
to
e4da46b
Compare
157bbba
to
578f166
Compare
- Drop redundant ruff pre-commit files specification
392ca8b
to
f390853
Compare
0e77823
to
74134d2
Compare
74134d2
to
81568c3
Compare
- No affect on workflow duration as job will remain faster than Windows
571d0e1
to
aa297d0
Compare
Cheers! Again, much appreciated!
Is this a breaking change? If so, please put it in the
I'll have a look.
Not opposed in principle. The biggest limitation to using any sort of pre-commit is that the tools triggered by pre-commit must be installed on a developers machine. This is a problem in a polyglot repo because not everyone will have all tools installed. At a glance it looks like pre-commit.ci avoids that problem. Updating dependencies should preferably be done through Renovate. Just so we have one obvious way of doing things. 😉 |
Welcome Rien... was pleasantly surprised by how much performance optimisation was available over a significant proportion of the pipeline. 🙌
Added. Early legacy Python distribution metadata; low impact probability though worth a shout.
Thank you! Based on the unrelated #334 - where some jobs succeeded where as others subsequently hit rate limits in the initial workflow; and all failed in subsequent workflows; it may be the case that we need to split coverage reporting into its own job with a dependency on collecting the coverage artefacts from the test jobs - to limit how often it runs. So potentially one to circle back on as a separate issue should you concur issue is pre-existing - possibly requiring deeper exploration with codecov.
Yeah very fair. Right now its scoped to the Python directory, so wouldn't impact other implementations; though it might be worth experimenting with approaches to evaluate whether it could be used as a standardised polyglot trigger for linting - which would be powerful. The below should work as a simplified way to install and run - installing and running the specified tools without additional prerequisites or installation's on the developer's machine (to the best of my understanding) - for what we use right now that is - though other options would be worth exploring to understand impact on the contributing experience in any case. $ curl -LsSf https://astral.sh/uv/install.sh | sh
$ uv tool install pre-commit --with pre-commit-uv --force-reinstall
$ pre-commit run --all-files
Standardisation would be ideal... was working off assumption that Renovate is without pre-commit support... though appears partial Renovate pre-commit support is in "beta" testing! Might be worth evaluating (#335). Assume would be without support for frozen hashes (introduced by this pull request) over tag names - though would happily revert that change to enable the capability. Unlikely to be as integrated, however would certainly preference a working standardised polyglot alternative (Renovate). Edit: See your other comment now on hashes - sweet! Ya veramos... let's see how goes. |
🤔 What's changed?
pyproject.toml
configuration over bothpyproject.toml
andpytest.ini
⚡️ What's your motivation?
Improve CI performance
(1435s)
(1007s)
(-428s)
(589s)
(178s)
(-411s)
(119s)
(-79s)
(66s)
(avg. 23s)
(avg. 2.6s)
(-3m 10s)
Improve maintainability
pyproject.toml
, pre-commit and toxdistshare
tox configuration that reapplies defaultImprove developer experience
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist: