-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Proposal: Dev & CI workflow improvement #1354
Conversation
976aaa2
to
b304237
Compare
…try dependencies groups in ci Fix commitizen-tools#724
…Python versions using `tox`
b304237
to
6e542f0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1354 +/- ##
==========================================
+ Coverage 97.33% 97.55% +0.21%
==========================================
Files 42 55 +13
Lines 2104 2617 +513
==========================================
+ Hits 2048 2553 +505
- Misses 56 64 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I love this! Would love to know how @woile before reviewing it. Another idea I had was to migrate to uv, but looking at this awesome PR. hmmm.. we probably should stay in poetry. Will try to take a deeper look |
LGTM, I've also been interested in trying |
Great, I am going to merge this one 👌🏼 I can try submitting a new PR for switching to Migrating should be simple:
So it'really straightforward now. If you are interested, I can do a PR. However, we would lose Dependabot support until dependabot/dependabot-core#10478 is done |
Yep, we don't really need to. I mentioned it simply because Airflow is using it and I recently migrate my personal workflow to uv (still have some poetry part though).
The last time I check it was still draft and now it's final! just notice there's a PR for pep 735 support
I guess we'll just use hatch if we're to change to uv
yep, this is one major downside. I probably would say we don't really need to migrate to uv unless someone is really interested in making it happen. |
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
./scripts/publish | ||
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably could migrate to trusted publisher in the future
@@ -99,8 +99,12 @@ version_scheme = "pep440" | |||
[tool.poetry] | |||
packages = [{ include = "commitizen" }, { include = "commitizen/py.typed" }] | |||
|
|||
[tool.poetry.requires-plugins] | |||
"poethepoet" = ">=0.32.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last time I tried this when testing project template generation, it worked weirdly. I probably should try it again. maybe it's fixed
] | ||
|
||
[tool.tox] | ||
requires = ["tox>=4.22"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we make it consistent with tox = ">4"
Description
This PR is a proposal improvement on the dev & CI workflows:
poethepoet
as plugin to run taskstox
support to easily test against all supported Python versionpre-push
hooks as they already run on commitOn
poetry install
,poethepoet
is installed locally as a plugin.Tasks are exposed both as:
You can run:
Tasks accept extra parameters, so it's now possible to run tests with queries:
poetry test -k bump
So are tox tests (run in parallel)
To run the same thing as in GitHub action, run
poetry ci
You can also preview the documentation with
poetry doc
Available tasks
Checklist
./scripts/format
and./scripts/test
locally to ensure this change passes linter check and testExpected behavior
--no-verify
(pre-commit hooks are lighter and don't prevent push wip branches or in case of flapping test)Steps to Test This Pull Request
poetry install
poetry list
orpoe
(poetry run poe
if you don't have it globally installed)Additional context
Fix #724
Note
It makes possible to have the documentation screenshots easily generated on the fly in both GHA workflow and
poetry doc
command and so, not having commit them and to store them in the repo