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.
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 a script for automating releases #647
Add a script for automating releases #647
Changes from 3 commits
e67ee84
9673e59
9bc40ca
de3f765
37b2935
ad86f2a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
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.
Hmm, how would we do a patch release or release a preview version (which we've done a few times in the past)?
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.
My idea of this script was to cover the common workflow rather than all possible workflows. I can add a CLI flag for this if you want, but I worry that the complexity it will add to the script won't be worth the time it will save us
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 problem I see is that this PR removes the documentation on how to do a release manually when not using the script. To me, that means it's now the only way of doing a release.
That's why I think we should either revert the documentation changes or extend the script. I'm worried about reverting the documentation because it probably will get outdated with future changes to this script which then is even worse: You end up with incomplete/incorrect instructions
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.
I see. Okay, I'll add the CLI flags.
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.
I added more flags in 37b2935, and tested them using
uv run --python=3.7 scripts/release.py --new-version=2024.600.0 --new-ruff=0.6.0
. It did everything I expected it to.Also, it didn't end up being much more code at all, so I think it was worth it -- thanks for persuading me!
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 for adding it and thanks for automating the steps!
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.
Why do you need the
\
.Isn't it nice how Ruff wraps the multiline string? :)
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.
It's a very common practice when using
textwrap.dedent()
in combination with triple-quoted strings, or it's easy to end up with a dedented string where the first line has odd indentation https://grep.app/search?q=textwrap.dedent%28%22%22%22%5C&filter[lang][0]=PythonI'm... actually not a massive fan of that formatting choice 🙈 but I don't care enough to argue about it 😆
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.
I brought it up because it's a ruff specific style :)