diff --git a/docs/src/whatsnew/latest.rst b/docs/src/whatsnew/latest.rst index 4c6f06e13f..884bfd376a 100644 --- a/docs/src/whatsnew/latest.rst +++ b/docs/src/whatsnew/latest.rst @@ -39,7 +39,7 @@ This document explains the changes made to Iris for this release #. `@rcomer`_ rewrote :func:`~iris.util.broadcast_to_shape` so it now handles lazy data. (:pull:`5307`) - + #. `@trexfeathers`_ and `@HGWright`_ (reviewer) sub-categorised all Iris' :class:`UserWarning`\s for richer filtering. The full index of sub-categories can be seen here: :mod:`iris.exceptions` . (:pull:`5498`) @@ -54,7 +54,7 @@ This document explains the changes made to Iris for this release Winter - December to February) will be assigned to the preceding year (e.g. the year of December) instead of the following year (the default behaviour). (:pull:`5573`) - + #. `@HGWright`_ added :attr:`~iris.coords.Coord.ignore_axis` to allow manual intervention preventing :func:`~iris.util.guess_coord_axis` from acting on a coordinate. (:pull:`5551`) @@ -161,6 +161,11 @@ This document explains the changes made to Iris for this release #. `@rcomer`_ reduced the size of the conda environment used for testing. (:pull:`5606`) +#. `@trexfeathers`_ and `@pp-mo`_ improved how the conda-forge feedstock + release candidate branch is managed, via: + :doc:`../developers_guide/release_do_nothing`. + (:pull:`5515`) + .. comment Whatsnew author names (@github name) in alphabetical order. Note that, diff --git a/tools/release_do_nothing.py b/tools/release_do_nothing.py index bd38f0f733..94f2d96829 100755 --- a/tools/release_do_nothing.py +++ b/tools/release_do_nothing.py @@ -530,7 +530,63 @@ def update_conda_forge( _wait_for_done(message) if is_release_candidate: - upstream_branch = "release-candidate" + message = ( + "Visit the conda-forge feedstock branches page:\n" + "https://github.com/conda-forge/iris-feedstock/branches" + ) + _wait_for_done(message) + + message = ( + "Find the release candidate branch - " + "`rc`/`release-candidate`/similar.\n" + ) + rc_branch = _get_input( + message, + "Input the name of the release candidate branch" + ) + + message = ( + f"Is the latest commit on {rc_branch} over 1 month ago?" + ) + archive_rc = None + while archive_rc is None: + age_check = _get_input(message, "y / n") + if age_check.casefold() == "y".casefold(): + archive_rc = True + elif age_check.casefold() == "n".casefold(): + archive_rc = False + else: + _report_problem("Invalid entry. Please try again ...") + + if archive_rc: + # We chose this odd handling of release candidate branches because + # a persistent branch will gradually diverge as `main` receives + # automatic and manual maintenance (where recreating these on + # another branch is often beyond Iris dev expertise). Advised + # practice from conda-forge is also liable to evolve over time. + # Since there is no benefit to a continuous Git history on the + # release candidate branch, the simplest way to keep it aligned + # with best practice is to regularly create a fresh branch from + # `main`. + + date_string = datetime.today().strftime("%Y%m%d") + message = ( + f"Archive the {rc_branch} branch by appending _{date_string} " + "to its name.\n" + f"e.g. rc_{date_string}\n\n" + f"({__file__} includes an explanation of this in the comments)." + ) + _wait_for_done(message) + + 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" + "Config file(s) should point to the `rc_iris` label.\n" + ) + rc_branch = _get_input(message, "Input the name of your new branch") + + upstream_branch = rc_branch else: upstream_branch = "main"