Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
133614e
Note about merging directly to release branch.
trexfeathers Aug 22, 2025
905130e
Large updates to release-do-nothing for correct handling of patch rel…
trexfeathers Aug 22, 2025
41ee980
Pre-commit compliance.
trexfeathers Aug 28, 2025
604effd
test_release_do_nothing.
trexfeathers Aug 28, 2025
f794bb6
Correct use of WhatsNewRsts.index_ .
trexfeathers Aug 28, 2025
c08b945
Correct phrasing for PyPI SHA256.
trexfeathers Aug 28, 2025
bb248bc
Series to-do.
trexfeathers Aug 28, 2025
e51ec42
Progress on test_release_do_nothing.
trexfeathers Jan 30, 2026
35ce398
Finished most tests.
trexfeathers Mar 28, 2026
a36ee15
Support regex in tests.
trexfeathers Apr 15, 2026
5b1b2c9
Finish do-nothing tests.
trexfeathers Apr 23, 2026
2b49110
Merge remote-tracking branch 'upstream/main' into do-nothing-patch
trexfeathers Apr 23, 2026
6df3f2a
Linting.
trexfeathers Apr 23, 2026
5ad71a2
Rename series to minor_series.
trexfeathers Apr 23, 2026
874c69e
Nox install nothing.
trexfeathers Apr 23, 2026
03aa650
Commented code.
trexfeathers Apr 23, 2026
b408302
Update RTD instructions.
trexfeathers Apr 23, 2026
4144953
Python pin advice.
trexfeathers Apr 23, 2026
688b002
Change order of git add whats new.
trexfeathers Apr 23, 2026
6f2ad33
conda-forge upstream warning.
trexfeathers Apr 23, 2026
687ed1c
Missing space.
trexfeathers Apr 23, 2026
ec88648
conda-forge build number handling.
trexfeathers Apr 23, 2026
9ed0cef
Better SHA256 url.
trexfeathers Apr 23, 2026
ce36804
Check README after re-render.
trexfeathers Apr 23, 2026
0b03181
New Conda URL.
trexfeathers Apr 23, 2026
bcc3485
Don't require upstream URLs to end in .git.
trexfeathers Apr 23, 2026
891eb6e
Fix test.
trexfeathers Apr 23, 2026
1081b97
Use getstate.
trexfeathers Apr 23, 2026
da1c008
generate_std_names pre-commit compliance.
trexfeathers Apr 23, 2026
795f76a
Fill the conda-forge wait period.
trexfeathers Apr 23, 2026
aa8d097
Invalid escape sequences.
trexfeathers Apr 23, 2026
3963bb7
Create IrisVersion.short.
trexfeathers Apr 24, 2026
1d2b3cd
Start highlights earlier.
trexfeathers Apr 24, 2026
c625ae9
Allow first_in_series to handle post-release steps.
trexfeathers Apr 24, 2026
974f222
update_lockfiles pre-commit compliance.
trexfeathers Apr 24, 2026
c2e0b9e
Ruff compliance.
trexfeathers Apr 24, 2026
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
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ files: |
setup\.py|
docs\/.+\.py|
lib\/.+\.py|
benchmarks\/.+\.py
benchmarks\/.+\.py|
tools\/.+\.py
)
minimum_pre_commit_version: 1.21.0

Expand Down
9 changes: 9 additions & 0 deletions docs/src/developers_guide/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ New features shall not be included in a patch release, these are for bug fixes.
A patch release does not require a release candidate, but the rest of the
release process is to be followed.

As mentioned in :ref:`release_branch`: branch/commit management is much simpler
if the patch changes are **first merged into the release branch** -
e.g. ``v1.9.x`` - and are only added to ``main`` during :ref:`merge_back` (post
release).


Before Release
--------------
Expand All @@ -111,6 +116,8 @@ from the `latest CF standard names`_.
The Release
-----------

.. _release_branch:

Release Branch
~~~~~~~~~~~~~~

Expand Down Expand Up @@ -193,6 +200,8 @@ of the new release. Ideally this would be updated before the release, but
the DOI for the new version is only available once the release has been
created in GitHub.

.. _merge_back:

Merge Back
~~~~~~~~~~

Expand Down
2 changes: 2 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,14 @@ def tests(session: nox.sessions.Session):
"""
prepare_venv(session)
session.install("--no-deps", "--editable", ".")
session.install("git+https://github.com/SciTools-incubator/nothing.git")
session.env.update(ENV)
run_args = [
"pytest",
"-n",
"auto",
"lib/iris/tests",
"tools",
]
if "-c" in session.posargs or "--coverage" in session.posargs:
run_args[-1:-1] = ["--cov=lib/iris", "--cov-report=xml"]
Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ extend-exclude = [
"_ff_cross_references.py",
"um_cf_map.py",
"docs/src/sphinxext/api_rst_formatting.py",
"tools",
]
line-length = 88
src = [
"benchmarks",
"lib",
"docs/src",
"tools",
]

[tool.ruff.format]
Expand Down Expand Up @@ -108,9 +108,16 @@ known-first-party = ["iris"]
"lib/iris/tests/*.py" = [
# https://docs.astral.sh/ruff/rules/undocumented-public-module/
"D100", # Missing docstring in public module
"D106", # Missing docstring in public nested class
"D205", # 1 blank line required between summary line and description
"D401", # 1 First line of docstring should be in imperative mood
]
"tools/test_*.py" = [
"D100",
"D106",
"D205",
"D401",
]

# Deprecated unittest tests

Expand Down
52 changes: 29 additions & 23 deletions tools/generate_std_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
#
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.
"""
A script to convert the standard names information from the provided XML
file into a Python dictionary format.
"""Script converting standard names information from provided XML file to a Python dict.

Takes two arguments: the first is the XML file to process and the second
is the name of the file to write the Python dictionary file into.
Expand All @@ -19,10 +17,10 @@
"""

import argparse
from pathlib import Path
import pprint
import xml.etree.ElementTree as ET


STD_VALUES_FILE_TEMPLATE = '''
# Copyright Iris contributors
#
Expand Down Expand Up @@ -61,7 +59,8 @@


def process_name_table(tree, element_name, *child_elements):
"""
"""Yield id->mapping dictionaries for each entry in the standard name table.

Yields a series of dictionaries with the key being the id of the entry element and the value containing
another dictionary mapping other attributes of the standard name to their values, e.g. units, description, grib value etc.
"""
Expand All @@ -70,9 +69,11 @@ def process_name_table(tree, element_name, *child_elements):

for child_elem in child_elements:
found_elem = elem.find(child_elem)
sub_section[child_elem] = found_elem.text if found_elem is not None else None
sub_section[child_elem] = (
found_elem.text if found_elem is not None else None
)

yield {elem.get("id") : sub_section}
yield {elem.get("id"): sub_section}


def to_dict(infile, outfile):
Expand All @@ -81,36 +82,41 @@ def to_dict(infile, outfile):

tree = ET.parse(infile)

cf_table_version_string = tree.find('version_number').text
cf_table_version_string = tree.find("version_number").text

for section in process_name_table(tree, 'entry', 'canonical_units'):
for section in process_name_table(tree, "entry", "canonical_units"):
values.update(section)

for section in process_name_table(tree, 'alias', 'entry_id'):
for section in process_name_table(tree, "alias", "entry_id"):
aliases.update(section)

for key, valued in aliases.items():
values.update({
key : {'canonical_units' : values.get(valued['entry_id']).get('canonical_units')}
})
values.update(
{
key: {
"canonical_units": values.get(valued["entry_id"]).get(
"canonical_units"
)
}
}
)

text = STD_VALUES_FILE_TEMPLATE.format(table_version=cf_table_version_string)
text += pprint.pformat(values)
text += f'\n\nCF_STANDARD_NAMES_TABLE_VERSION = {cf_table_version_string}\n'
text += f"\n\nCF_STANDARD_NAMES_TABLE_VERSION = {cf_table_version_string}\n"
outfile.write(text)


if __name__ == "__main__":
parser = argparse.ArgumentParser(
description='Create Python code from CF standard name XML.')
parser.add_argument('input', metavar='INPUT',
help='Path to CF standard name XML')
parser.add_argument('output', metavar='OUTPUT',
help='Path to resulting Python code')
description="Create Python code from CF standard name XML."
)
parser.add_argument("input", metavar="INPUT", help="Path to CF standard name XML")
parser.add_argument(
"output", metavar="OUTPUT", help="Path to resulting Python code"
)
args = parser.parse_args()

encoding = {'encoding': 'utf-8'}

with open(args.input, 'r', **encoding) as in_fh:
with open(args.output, 'w', **encoding) as out_fh:
with open(args.input, "r", encoding="utf-8") as in_fh:
with open(args.output, "w", encoding="utf-8") as out_fh:
to_dict(in_fh, out_fh)
Loading
Loading