-
Notifications
You must be signed in to change notification settings - Fork 283
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
Use the new re-entrant do-nothing script #6062
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6062 +/- ##
=======================================
Coverage 89.77% 89.77%
=======================================
Files 88 88
Lines 23026 23026
Branches 5036 5036
=======================================
Hits 20672 20672
Misses 1623 1623
Partials 731 731 ☔ View full report in Codecov by Sentry. |
tools/release_do_nothing.py
Outdated
f"{self.whats_news.latest.absolute()}\n" | ||
f"{self.whats_news.template.absolute()}\n" |
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.
There will be Git commands that can get hold of these files.
Perhaps explicitly make the process:
- Restore template
- Create
latest.rst
from the template - Specifically mention bits that need changing/removing?
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.
tools/release_do_nothing.py
Outdated
# pip install git+https://github.com/SciTools-incubator/nothing.git | ||
from nothing import Progress |
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.
This would be better off as a try-except. If the import fails, provide instructions about WHY, then HOW to install nothing
.
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.
tools/release_do_nothing.py
Outdated
message = ( | ||
"Update the file ``etc/cf-standard-name-table.xml`` to the " | ||
"latest CF standard names, via a new Pull Request.\n" | ||
"(This is used during build to automatically generate the " | ||
"sourcefile ``lib/iris/std_names.py``).\n" | ||
"Latest standard names:\n" | ||
'wget "https://cfconventions.org/Data/cf-standard-names' | ||
'/current/src/cf-standard-name-table.xml";' | ||
) | ||
self.wait_for_done(message) |
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.
This wget
command could easily put the new table into the correct place, too.
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.
whatsnew_title = ( | ||
f"{self.strings.series} ({datetime.today().strftime('%d %b %Y')}" | ||
) | ||
if self.is_release_candidate: | ||
whatsnew_title += " [release candidate]" |
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 title needs a bracket at the end
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.
tools/release_do_nothing.py
Outdated
f"Review {self.whats_news.release.name} to ensure it is a good " | ||
f"reflection of what is new in {self.strings.series}." |
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.
Useful to have example(s) here. E.g. something big that we definitely want people to know about like a NumPy pin.
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.
tools/release_do_nothing.py
Outdated
f"conda create -n tmp_iris{channel_command}iris=" | ||
f"{self.strings.release};\n" | ||
f"conda remove -n tmp_iris --all;" |
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.
Include an import iris
step.
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.
tools/release_do_nothing.py
Outdated
"Update the release page in GitHub discussions, with the above " | ||
"links " | ||
"and anything else appropriate.\n" | ||
"https://github.com/SciTools/iris/discussions" |
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.
Encourage copying from a previous example.
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.
"and anything else appropriate.\n" | ||
"https://github.com/SciTools/iris/discussions" | ||
) | ||
self.wait_for_done(message) |
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.
Another step? Comment on the discussion in case anyone is following 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.
tools/release_do_nothing.py
Outdated
message = ( | ||
"Announce the release via https://twitter.com/scitools_iris, " | ||
"and any " | ||
"other appropriate message boards (e.g. Yammer).\n" |
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.
"other appropriate message boards (e.g. Yammer).\n" | |
"other appropriate message boards (e.g. Viva Engage).\n" |
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.
tools/release_do_nothing.py
Outdated
_wait_for_done(message) | ||
def validate(sha256_string: str) -> str: | ||
try: | ||
sha_len = int(sha256_string, 16).bit_length() + 1 |
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.
This doesn't actually work - the bit_length()
of the string can be anywhere from 253
to 256
. The correct two things to check are:
- That the string can be validly parsed as a 16-bit number (
int(sha256_string, 16)
) - That the string is 64 characters long
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.
"conda activate tmp_iris;\n" | ||
f"pip install scitools-iris=={self.strings.release};\n" | ||
'python -c "import iris; print(iris.__version__)";\n' | ||
"conda remove -n tmp_iris --all;\n" |
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.
This requires a "conda deactivate"
to work
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.
tools/release_do_nothing.py
Outdated
f"git push -u origin {working_branch};" | ||
"After the PR is merged, wait for the CI to complete, after which " | ||
"the new version of Iris will be on conda-forge's servers.\n" | ||
"https://github.com/conda-forge/iris-feedstock/actions" |
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.
"https://github.com/conda-forge/iris-feedstock/actions" | |
"https://dev.azure.com/conda-forge/feedstock-builds/_build?definitionId=464" |
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.
tools/release_do_nothing.py
Outdated
) | ||
message = ( | ||
f"Comment on {discussion_url} to notify anyone watching that " | ||
f"{self.strings.tag} has been released." |
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.
f"{self.strings.tag} has been released." | |
f"{self.git_tag} has been released." |
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.
tools/release_do_nothing.py
Outdated
message = ( | ||
"Follow the latest conda-forge guidance for creating a new " | ||
"release candidate branch from the `main` branch:\n" | ||
"https://conda-forge.org/docs/maintainer/knowledge_base.html#pre-release-builds\n\n" | ||
"DEVIATION FROM GUIDANCE: config file(s) should point to " | ||
"the `rc_iris` label (this is not the name that " | ||
"conda-forge suggest).\n" | ||
) | ||
rc_branch = self.get_input(message, "Input the name of your new branch") |
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 changes are best made within the same PR that proposes the new release.
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.
Tested this in use + it was handy |
Thanks @pp-mo these are great suggestions! I don't consider them a blocker to this PR, which I know @HGWright is looking at today. |
🚀 Pull Request
Description
Just a draft so we can trial it in the upcoming release.
https://github.com/SciTools-incubator/nothing
Consult Iris pull request check list
Add any of the below labels to trigger actions on this PR: