diff --git a/CITATION.cff b/CITATION.cff index c42df2c57..d633d964c 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -77,7 +77,11 @@ authors: orcid: 'https://orcid.org/0000-0003-2962-1049' - given-names: Cameron family-names: Smith + - given-names: Amrapalli + family-names: Garanaik + - given-names: Divya + family-names: Jaganathan repository-code: 'https://github.com/MPAS-Dev/MPAS-Tools' url: 'https://mpas-dev.github.io/MPAS-Tools/master/' -version: 2.0.0 -date-released: '2026-07-01' +version: 2.1.0 +date-released: '2026-08-20' diff --git a/conda_package/docs/authors.rst b/conda_package/docs/authors.rst index 3bb818ec6..43c66c2d2 100644 --- a/conda_package/docs/authors.rst +++ b/conda_package/docs/authors.rst @@ -7,19 +7,30 @@ Main Authors Contributors ============ +* Carolyn Begeman * Riley X. Brady * Miles Curry +* Althea Denlinger +* Darren Engwirda * Amrapalli Garanaik +* Alex Hager +* Holly Han * Dom Heinzeller * Trevor Hillebrand +* Divya Jaganathan * Joseph Kennedy * William Lipscomb +* Andrew Nolan * Mark Petersen * Stephen Price * Todd Ringler * Juan Saenz +* Courtney Shafer +* William Skamarock +* Cameron Smith * Adrian Turner * Luke Van Roekel +* Maciej Waruszewski * Phillip J. Wolfram * Tong Zhang diff --git a/conda_package/docs/releasing.rst b/conda_package/docs/releasing.rst index 80a5be486..84885bfde 100644 --- a/conda_package/docs/releasing.rst +++ b/conda_package/docs/releasing.rst @@ -12,14 +12,26 @@ Version Bump and Dependency Updates 1. **Update the Version Number** - - Open a pull request (PR) to update the version number in the following - two files: + - Run the helper script from the root of the repo: + + :: + + ./update_version.py -v 1.3.0 + + This updates the version in all three places that need it: + + - ``CITATION.cff`` (both ``version`` and ``date-released``, which is set + to today's date) - ``conda_package/mpas_tools/__init__.py`` - ``conda_package/recipe/recipe.yaml`` - Make sure the version follows `semantic versioning `_. For release candidates, use versions like ``1.3.0rc1`` (no ``v`` prefix). + The script only accepts ``X.Y.Z``, so update the files by hand for a + release candidate. + + - Open a pull request (PR) with these changes. 2. **Check and Update Dependencies** diff --git a/conda_package/mpas_tools/__init__.py b/conda_package/mpas_tools/__init__.py index 09b6d0b04..d4e5c7ff8 100644 --- a/conda_package/mpas_tools/__init__.py +++ b/conda_package/mpas_tools/__init__.py @@ -1,2 +1,2 @@ -__version_info__ = (2, 0, 0) +__version_info__ = (2, 1, 0) __version__ = '.'.join(str(vi) for vi in __version_info__) diff --git a/conda_package/recipe/recipe.yaml b/conda_package/recipe/recipe.yaml index 14d8453a5..3c15cf73d 100644 --- a/conda_package/recipe/recipe.yaml +++ b/conda_package/recipe/recipe.yaml @@ -2,7 +2,7 @@ schema_version: 1 context: name: mpas_tools - version: 2.0.0 + version: 2.1.0 package: name: ${{ name | lower }} diff --git a/update_version.py b/update_version.py index af4cd77af..a054ae957 100755 --- a/update_version.py +++ b/update_version.py @@ -9,7 +9,8 @@ def parse_args(): parser = argparse.ArgumentParser( description=( - "Bump version across files (CITATION.cff, __init__.py, meta.yaml)." + "Bump version across files (CITATION.cff, __init__.py, " + "recipe.yaml)." ) ) parser.add_argument( @@ -54,7 +55,10 @@ def bump_citation(root: Path, version: str, today: str) -> bool: # version: 1.2.1 -> version: 1.2.2 content_new = re.sub( - r"(?m)^(version:\s*)(.+)\s*$", rf"\g<1>{version}", content, count=1 + r"(?m)^(version:[^\S\n]*)[^\n]*$", + rf"\g<1>{version}", + content, + count=1, ) # date-released: '2025-06-12' -> date-released: 'YYYY-MM-DD' content_new = re.sub( @@ -98,17 +102,17 @@ def bump_init(pkg_dir: Path, version_tuple) -> bool: return changed -def bump_meta(recipe_dir: Path, version: str) -> bool: - path = recipe_dir / "meta.yaml" +def bump_recipe(recipe_dir: Path, version: str) -> bool: + path = recipe_dir / "recipe.yaml" content = read_text(path) if content is None: print(f"Skip (not found): {path}") return False - # {% set version = "1.2.1" %} -> {% set version = "1.2.2" %} + # In the "context" block: version: 1.2.1 -> version: 1.2.2 content_new = re.sub( - r'(?m)^\{\%\s*set\s+version\s*=\s*["\']([^"\']+)["\']\s*\%\}', - f'{{% set version = "{version}" %}}', + r'(?m)^( version:[^\S\n]*)[^\n]*$', + rf"\g<1>{version}", content, count=1, ) @@ -136,7 +140,7 @@ def main(): changed = [] changed.append(bump_citation(repo_root, version, today)) changed.append(bump_init(pkg_dir, version_tuple)) - changed.append(bump_meta(recipe_dir, version)) + changed.append(bump_recipe(recipe_dir, version)) if not any(changed): print("No files modified.")