Skip to content

Conversation

@trexfeathers
Copy link
Contributor

@trexfeathers trexfeathers commented Aug 28, 2025

🚀 Pull Request

Description

  • Significantly re-works the release do-nothing script
  • Corrects how the release do-nothing script handles patch releases
  • Additional advice for how to patch multiple releases in one 'go'
  • Automated testing for the release do-nothing script

To-do

  • Find a solution to installing nothing for testing the do-nothing script
    • Include in dependencies?
    • Install on the fly?
    • try:
      from nothing import Progress
      except ImportError:
      install_message = (
      "This script requires the `nothing` package to be installed:\n"
      "pip install git+https://github.com/SciTools-incubator/nothing.git"
      )
      raise ImportError(install_message)
  • Finish writing the automated tests
  • Action any corrections that the testing highlights
  • Find an alternative term to series, which is meaningful to everyone while not being ambiguous

Consult Iris pull request check list


Add any of the below labels to trigger actions on this PR:

  • benchmark_this Request that this pull request be benchmarked to check if it introduces performance shifts

scitools-ci[bot]
scitools-ci bot previously requested changes Aug 28, 2025
Copy link
Contributor

@scitools-ci scitools-ci bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cls.get_github_user,
cls.get_release_type,
cls.analyse_remotes,
# cls.parse_tags,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops

for parts in remotes_split
]

scitools_regex = re.compile(r"github\.com[:/]SciTools/iris\.git")
Copy link
Contributor Author

@trexfeathers trexfeathers Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New RTD interface: we believe that branches never built before now have to be added using the Add version button.


message = (
"Confirm that pip install works as expected:\n"
"conda create -y -n tmp_iris pip cf-units;\n"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

"The new release will now undergo testing and validation in the "
"cf-staging channel. Once this is complete, the release will be "
"available in the standard conda-forge channel. This can "
"sometimes take minutes, or up to an hour.\n"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor Author

@trexfeathers trexfeathers Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to still be a thing - can't use self.release.public like I have tried to do (that includes the v).

)
self.wait_for_done(message)

if self.first_in_series:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The git add for latest.rst is too early - the script suggests subsequent edits, without adding again.

Comment on lines +990 to +991
f'git commit -m "Recipe updates for {self.version} .";\n'
f"git push -u origin {self.version};"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would benefit from a warning about what happens if you push directly to upstream - it prompts an immediate release without any pull request.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could get the user to explicitly input the name of their fork remote, at the same time as warning them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant