Skip to content
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
8 changes: 6 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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'
11 changes: 11 additions & 0 deletions conda_package/docs/authors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 14 additions & 2 deletions conda_package/docs/releasing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://semver.org/>`_.
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**

Expand Down
2 changes: 1 addition & 1 deletion conda_package/mpas_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version_info__ = (2, 0, 0)
__version_info__ = (2, 1, 0)
__version__ = '.'.join(str(vi) for vi in __version_info__)
2 changes: 1 addition & 1 deletion conda_package/recipe/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ schema_version: 1

context:
name: mpas_tools
version: 2.0.0
version: 2.1.0

package:
name: ${{ name | lower }}
Expand Down
20 changes: 12 additions & 8 deletions update_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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,
)
Expand Down Expand Up @@ -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.")
Expand Down
Loading