Release do-nothing script: correct handling of patch releases#6675
Release do-nothing script: correct handling of patch releases#6675trexfeathers wants to merge 9 commits intoSciTools:mainfrom
Conversation
| cls.get_github_user, | ||
| cls.get_release_type, | ||
| cls.analyse_remotes, | ||
| # cls.parse_tags, |
| for parts in remotes_split | ||
| ] | ||
|
|
||
| scitools_regex = re.compile(r"github\.com[:/]SciTools/iris\.git") |
There was a problem hiding this comment.
Remotes do not have to end with .git. Would it still be unambiguous enough without?
| self.wait_for_done(message) | ||
|
|
||
| message = f"Set {self.strings.branch} to Active, Hidden." | ||
| message = f"Set {self.version.branch} to Active, Hidden." |
There was a problem hiding this comment.
New RTD interface: we believe that branches never built before now have to be added using the Add version button.
| @@ -608,7 +858,7 @@ def validate(sha256_string: str) -> str: | |||
| "Confirm that pip install works as expected:\n" | |||
| "conda create -y -n tmp_iris pip cf-units;\n" | |||
There was a problem hiding this comment.
This Conda environment will obviously be the latest version of Python. Sometimes Iris is incompatible with the latest version while we work on updating it; if we have added a Python max pin into pyproject.toml then Pip will detect this and refuse to install Iris into this environment.
So a note needs to be included that the developer should potentially include the appropriate Python pin when creating the Conda environment.
There was a problem hiding this comment.
Potential extra work! Attempt to install with the latest version of Python to prove that the pin works, then attempt to install with the correct version.
| @@ -795,33 +1051,45 @@ def update_conda_forge(self): | |||
| "sometimes take minutes, or up to an hour.\n" | |||
There was a problem hiding this comment.
Should consider moving some steps to fill the conda-forge wait. Definitely RTD. Possibly some other post-release steps (although I'm cautious about things like posting an announcement until conda has finished).
| return self.Strings( | ||
| series=series, | ||
| branch=series + ".x", # v1.2.x | ||
| release=self.git_tag[1:], # 1.2.3rc0 |
There was a problem hiding this comment.
This needs to still be a thing - can't use self.release.public like I have tried to do (that includes the v).
There was a problem hiding this comment.
Places this is a problem:
conda searchconda create- ...?
| ) | ||
| self.wait_for_done(message) | ||
|
|
||
| if self.first_in_series: |
There was a problem hiding this comment.
This logic is fine, but first_in_series is flawed - it is written assuming that the release hasn't been cut yet, and the merge-back step happens post-release. Since the list of releases is refreshed every time, first_in_series will return False as soon as the first release has been cut, preventing this block from being entered.
| f"git add {self.whats_news.index.absolute()};\n" | ||
| 'git commit -m "Restore latest Whats New files.";\n' | ||
| f"git push -u origin {working_branch};" | ||
| f"git add {self.whats_news.index_.absolute()};\n" |
There was a problem hiding this comment.
The git add for latest.rst is too early - the script suggests subsequent edits, without adding again.
| f'git commit -m "Recipe updates for {self.version} .";\n' | ||
| f"git push -u origin {self.version};" |
There was a problem hiding this comment.
We would benefit from a warning about what happens if you push directly to upstream - it prompts an immediate release without any pull request.
There was a problem hiding this comment.
Perhaps we could get the user to explicitly input the name of their fork remote, at the same time as warning them.
| "The first release in a series is expected to be a " | ||
| "release candidate, but this is not. Are you sure you " | ||
| "want to continue?" | ||
| "The patch change(s) are on the ideal branch to avoid later" |
There was a problem hiding this comment.
| "The patch change(s) are on the ideal branch to avoid later" | |
| "The patch change(s) are on the ideal branch to avoid later " |
| f'git commit -m "Recipe updates for {self.git_tag} .";\n' | ||
| f"git push -u origin {self.git_tag};" | ||
| f'git commit -m "Recipe updates for {self.version} .";\n' | ||
| f"git push -u origin {self.version};" |
There was a problem hiding this comment.
Perhaps pre-empt the thing about resetting the build number (could copy the text straight from conda-forge). Would make the process smoother - it's important to get conda-forge merged ASAP given the post-merge automation takes so long.
| f"Visit the below and click `view details` for the Source Distribution" | ||
| f"(`.tar.gz`):\n" | ||
| f"https://pypi.org/project/scitools-iris/{self.strings.release}#files\n" | ||
| f"https://pypi.org/project/scitools-iris/{self.version.public}#files\n" |
There was a problem hiding this comment.
|
|
||
| if self.is_release_candidate: | ||
| readme_url = f"https://github.com/{self.github_user}/iris-feedstock/blob/{self.git_tag}/README.md" | ||
| readme_url = f"https://github.com/{self.github_user}/iris-feedstock/blob/{self.version}/README.md" |
There was a problem hiding this comment.
Note that this step only applies after re-rendering has happened.
| f"https://anaconda.org/conda-forge/iris?version={self.strings.release}\n" | ||
| f"https://scitools-iris.readthedocs.io/en/{self.version}/\n" | ||
| f"https://pypi.org/project/scitools-iris/{self.version.public}/\n" | ||
| f"https://anaconda.org/conda-forge/iris?version={self.version.public}\n" |
There was a problem hiding this comment.
No longer possible to filter anaconda.org using the URL (new UI)
There was a problem hiding this comment.
There was a problem hiding this comment.
Templating
This PR includes changes that may be worth sharing via templating. For each file listed below, please either:
- Action the suggestion via a pull request editing/adding the relevant file in the SciTools/.github
templates/directory. 1 - Raise an issue against the SciTools/.github repo for the above action if you really don't have 10mins spare right now. Include an assignee, to avoid it being forgotten.
- Dismiss the suggestion if the changes are not suitable for templating.
You will need to dismiss this review before this PR can be merged. Recommend the reviewer does this as their final action before merging, as this text will continually update as commits come in.
Templated files
The following changed files are templated:
Footnotes
-
Include this text in the PR body to avoid any notifications about applying the template changes back to the source repo!
@scitools-templating: please no update notification on: iris↩
🚀 Pull Request
Description
To-do
nothingfor testing the do-nothing scriptiris/tools/release_do_nothing.py
Lines 22 to 29 in bb248bc
series, which is meaningful to everyone while not being ambiguousConsult Iris pull request check list
Add any of the below labels to trigger actions on this PR: