Skip to content
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

Feedstock rc branch management in do-nothing script #5515

Merged
merged 5 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions docs/src/whatsnew/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand All @@ -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`)
Expand Down Expand Up @@ -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,
Expand Down
58 changes: 57 additions & 1 deletion tools/release_do_nothing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down