-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add release tool #3974
Add release tool #3974
Conversation
- Add tool for release managers to use to generate commits - I'm trying to only use stdlib so we have no depdencies ... - Default is to change date strings in hard coded documentation files + CHANGES.md - I write directly to files cause we have SCM to fix any screw ups ... - We hackily convert calver to ints to sort (all for better ideas here) - If we hit a ValueError we just set to 0 for sorting - This is alhpa + beta release we can safely ignore these days - Add new CI to only run release unittests in 3.12 only on all platforms - Update release docs - Checked with `mypy --strict` + ensure we are `black --preview` formatted :D Tests: - Run it to generate template PR - `python3.12 release.py --debug --add-changes-template` - Run it to cleanup CHANGE.md + change version in specified doc files ``` crl-m1:black cooper$ python3.12 release.py -d [2023-10-23 23:39:38,414] INFO: Current version detected to be 23.10.1 (release.py:221) [2023-10-23 23:39:38,414] INFO: Next version will be 23.10.2 (release.py:222) [2023-10-23 23:39:38,414] INFO: Cleaning up /Users/cooper/repos/black/CHANGES.md (release.py:127) [2023-10-23 23:39:38,416] DEBUG: Finished Cleaning up /Users/cooper/repos/black/CHANGES.md (release.py:147) [2023-10-23 23:39:38,416] INFO: Updating black version to 23.10.2 in /Users/cooper/repos/black/docs/integrations/source_version_control.md (release.py:173) [2023-10-23 23:39:38,416] DEBUG: Finished updating black version to 23.10.2 in /Users/cooper/repos/black/docs/integrations/source_version_control.md (release.py:185) [2023-10-23 23:39:38,416] INFO: Updating black version to 23.10.2 in /Users/cooper/repos/black/docs/usage_and_configuration/the_basics.md (release.py:173) [2023-10-23 23:39:38,417] DEBUG: Finished updating black version to 23.10.2 in /Users/cooper/repos/black/docs/usage_and_configuration/the_basics.md (release.py:185) ``` - Add tests around some key logic
for more information, see https://pre-commit.ci
Damn, I suck. I'll fix all CI in the morning ... |
- Remove black + mypy as linting already runs it ... - Ignore delete param to TemporaryDirectory as we can't set mypy to 3.12 :D
Wow - this has been my worst CI experience with GitHub ever ... Am I right assuming Anyone got tips here at what I'm doing wrong? I'm at a loss as I seem to be getting a retuirn 0, but no
|
…lan to but I can't get it working on GitHub actions
not sure, but by default If not, you might be interested in act which can be used to run actions locally (hopefully reproducing the issue). Otherwise your only option appears to be debug printing, which doesn't have a great feedback loop. |
Many thanks for the shallow pointer - Trying it now!
I tried using this but couldn't get it to run with python3.12 for some reason |
- Also add fix to not double run when we push directly to psf/black
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.
Thanks! A few comments
- Fix bug missing lines ending with --> in CHANGES.md to delete ... - Update ci to run out of scripts dir too - Update test_tuple_calver
Add tool for release managers to use to generate commits
Default is to change date strings in hard coded documentation files + CHANGES.md
We hackily convert calver to ints to sort (all for better ideas here)
Add new CI to only run release unittests in 3.12 only on all platforms
Update release docs
Checked with
mypy --strict
+ ensure we areblack --preview
formatted :DTests:
python3.12 release.py --debug --add-changes-template
Addresses most of #3970