From 387e11ed299224bbae71f55f0a032416e0b9e8fd Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sat, 1 Aug 2026 09:16:10 +0200 Subject: [PATCH 1/4] Replace m2r2 with sphinx-mdinclude m2r2 is unmaintained and requires mistune <2, which forces that constraint on any environment that builds the docs. sphinx-mdinclude is a maintained fork of m2r2 that works with mistune >=3,<4, so the explicit mistune constraint can be dropped entirely (mistune is only ever an indirect dependency). Its `convert()` is a drop-in replacement for the m2r2 function of the same name. There is no equivalent of `m2r2.parse_from_file()`, so the design docs are read in `docs/conf.py` and passed to `convert()`. Co-Authored-By: Claude Opus 5 --- dev-spec.txt | 3 +-- docs/conf.py | 5 +++-- mpas_analysis/docs/parse_quick_start.py | 2 +- pixi.toml | 3 +-- pyproject.toml | 3 +-- suite/run_suite.bash | 5 +++-- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/dev-spec.txt b/dev-spec.txt index b6fda53a5..ab74f6dfd 100644 --- a/dev-spec.txt +++ b/dev-spec.txt @@ -38,8 +38,7 @@ setuptools >=60 # Documentation mock -m2r2 >=0.3.3 -mistune <2 sphinx +sphinx-mdinclude >=0.6.2 sphinx_rtd_theme tabulate diff --git a/docs/conf.py b/docs/conf.py index 607ca70ed..7047035b3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,7 +13,7 @@ # serve to show the default. import os -import m2r2 +from sphinx_mdinclude import convert from glob import glob import mpas_analysis.version on_rtd = os.environ.get('READTHEDOCS', None) == 'True' @@ -209,7 +209,8 @@ for mdFileName in glob('design_docs/*.md'): if os.path.basename(mdFileName) == 'template.md': continue - output = m2r2.parse_from_file(mdFileName) + with open(mdFileName, 'r') as inFile: + output = convert(inFile.read()) rstFileName = os.path.splitext(mdFileName)[0]+'.rst' with open(rstFileName, 'w') as outFile: outFile.write(output) diff --git a/mpas_analysis/docs/parse_quick_start.py b/mpas_analysis/docs/parse_quick_start.py index f0691dda9..ae26b7283 100644 --- a/mpas_analysis/docs/parse_quick_start.py +++ b/mpas_analysis/docs/parse_quick_start.py @@ -4,7 +4,7 @@ in the documentation """ -from m2r2 import convert +from sphinx_mdinclude import convert def build_quick_start(): diff --git a/pixi.toml b/pixi.toml index 738e6fd0d..e7e5f50e0 100644 --- a/pixi.toml +++ b/pixi.toml @@ -41,10 +41,9 @@ pytest = "*" setuptools = ">=60" [feature.docs.dependencies] -m2r2 = ">=0.3.3" -mistune = "<2" mock = "*" sphinx = "*" +sphinx-mdinclude = ">=0.6.2" sphinx_rtd_theme = "*" tabulate = "*" diff --git a/pyproject.toml b/pyproject.toml index ffab97d4f..b2567804d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,9 +69,8 @@ dependencies = [ docs = [ # building documentation "mock", - "m2r2>=0.3.3", - "mistune<2", "sphinx", + "sphinx-mdinclude>=0.6.2", "sphinx_rtd_theme", "tabulate", ] diff --git a/suite/run_suite.bash b/suite/run_suite.bash index 4030c8259..b42119284 100755 --- a/suite/run_suite.bash +++ b/suite/run_suite.bash @@ -146,8 +146,9 @@ conda build ci/recipe for py in "${main_py}" "${alt_py}"; do env="test_mpas_analysis_py${py}" conda create -y -n "${env}" --use-local python="${py}" mpas-analysis \ - sphinx mock sphinx_rtd_theme "tabulate>=0.8.2" "m2r2>=0.3.3" \ - "mistune<2" pytest "mache>=1.11.0" "esmf=*=mpi_mpich_*" jinja2 + sphinx mock sphinx_rtd_theme "tabulate>=0.8.2" \ + "sphinx-mdinclude>=0.6.2" pytest "mache>=1.11.0" \ + "esmf=*=mpi_mpich_*" jinja2 conda activate "${env}" pytest conda deactivate From 0c119fc44ccad9f83daf9a28d9575fe37671205e Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sat, 1 Aug 2026 09:20:53 +0200 Subject: [PATCH 2/4] Update to mpas_tools >=2.0.0,<3.0.0 Bump the constraint in pixi.toml, dev-spec.txt and the conda recipe. All mpas_tools APIs used by MPAS-Analysis are unchanged in 2.0.0. The new ds_vert_coord argument to compute_barotropic_streamfunction() defaults to ds_mesh, so the existing keyword-only call site is unaffected. Co-Authored-By: Claude Opus 5 --- ci/recipe/recipe.yaml | 2 +- dev-spec.txt | 2 +- pixi.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/recipe/recipe.yaml b/ci/recipe/recipe.yaml index 8997328a2..5af4f5863 100644 --- a/ci/recipe/recipe.yaml +++ b/ci/recipe/recipe.yaml @@ -39,7 +39,7 @@ requirements: - lxml - mache >=1.11.0 - matplotlib-base >=3.9.0 - - mpas_tools >=1.3.0,<2.0.0 + - mpas_tools >=2.0.0,<3.0.0 - nco >=4.8.1,!=5.2.6,!=5.3.7 - netcdf4 - numpy >=2.0,<3.0 diff --git a/dev-spec.txt b/dev-spec.txt index ab74f6dfd..c9f22de4c 100644 --- a/dev-spec.txt +++ b/dev-spec.txt @@ -15,7 +15,7 @@ gsw lxml mache >=1.11.0 matplotlib-base >=3.9.0 -mpas_tools >=1.3.0,<2.0.0 +mpas_tools >=2.0.0,<3.0.0 nco >=4.8.1,!=5.2.6,!=5.3.7 netcdf4 numpy >=2.0,<3.0 diff --git a/pixi.toml b/pixi.toml index e7e5f50e0..894c521aa 100644 --- a/pixi.toml +++ b/pixi.toml @@ -16,7 +16,7 @@ gsw = "*" lxml = "*" mache = ">=1.11.0" matplotlib-base = ">=3.9.0" -mpas_tools = ">=1.3.0,<2.0.0" +mpas_tools = ">=2.0.0,<3.0.0" nco = ">=4.8.1,!=5.2.6,!=5.3.7" netcdf4 = "*" numpy = ">=2.0,<3.0" From 9e801cd6529973092e69c3220092c0fa3466741c Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sat, 1 Aug 2026 09:31:22 +0200 Subject: [PATCH 3/4] Drop support for python 3.10 mpas_tools 2.0.0 requires python >=3.11 and conda-forge has no py3.10 builds for it, so MPAS-Analysis must drop 3.10 as well. Update the constraint in pyproject.toml, dev-spec.txt, pixi.toml and the conda recipe, remove the py310 pixi environment and CI variant file, and drop 3.10 from the build workflow matrices. Co-Authored-By: Claude Opus 5 --- .github/workflows/build_workflow.yml | 6 ------ ci/python3.10.yaml | 8 -------- ci/recipe/recipe.yaml | 2 +- dev-spec.txt | 2 +- pixi.toml | 6 +----- pyproject.toml | 3 +-- 6 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 ci/python3.10.yaml diff --git a/.github/workflows/build_workflow.yml b/.github/workflows/build_workflow.yml index fb6af7f8a..7b146afff 100644 --- a/.github/workflows/build_workflow.yml +++ b/.github/workflows/build_workflow.yml @@ -25,9 +25,6 @@ jobs: strategy: matrix: include: - - python-version: "3.10" - pixi-environment: py310 - variant-file: ci/python3.10.yaml - python-version: "3.11" pixi-environment: py311 variant-file: ci/python3.11.yaml @@ -83,9 +80,6 @@ jobs: strategy: matrix: include: - - python-version: "3.10" - pixi-environment: py310 - variant-file: ci/python3.10.yaml - python-version: "3.11" pixi-environment: py311 variant-file: ci/python3.11.yaml diff --git a/ci/python3.10.yaml b/ci/python3.10.yaml deleted file mode 100644 index ba317ae3c..000000000 --- a/ci/python3.10.yaml +++ /dev/null @@ -1,8 +0,0 @@ -channel_sources: -- conda-forge -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.10.* *_cpython diff --git a/ci/recipe/recipe.yaml b/ci/recipe/recipe.yaml index 5af4f5863..380593b76 100644 --- a/ci/recipe/recipe.yaml +++ b/ci/recipe/recipe.yaml @@ -3,7 +3,7 @@ schema_version: 1 context: name: MPAS-Analysis version: "1.15.0" - python_min: "3.10" + python_min: "3.11" package: name: ${{ name|lower }} diff --git a/dev-spec.txt b/dev-spec.txt index c9f22de4c..4328f2d9d 100644 --- a/dev-spec.txt +++ b/dev-spec.txt @@ -2,7 +2,7 @@ # $ conda create --name --file # Base -python >=3.10 +python >=3.11 cartopy >=0.18.0 cartopy_offlinedata cmocean diff --git a/pixi.toml b/pixi.toml index 894c521aa..1343103b0 100644 --- a/pixi.toml +++ b/pixi.toml @@ -4,7 +4,7 @@ name = "mpas-analysis" platforms = ["linux-64"] [dependencies] -python = ">=3.10" +python = ">=3.11" cartopy = ">=0.18.0" cartopy_offlinedata = "*" cmocean = "*" @@ -50,9 +50,6 @@ tabulate = "*" [feature.build.dependencies] rattler-build = "*" -[feature.py310.dependencies] -python = "3.10.*" - [feature.py311.dependencies] python = "3.11.*" @@ -67,7 +64,6 @@ python = "3.14.*" [environments] default = ["dev", "docs", "build"] -py310 = ["py310", "dev", "docs", "build"] py311 = ["py311", "dev", "docs", "build"] py312 = ["py312", "dev", "docs", "build"] py313 = ["py313", "dev", "docs", "build"] diff --git a/pyproject.toml b/pyproject.toml index b2567804d..fd4881ef5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,10 +27,9 @@ description = """\ """ license = { file = "LICENSE" } readme = "README.md" -requires-python = ">=3.10" +requires-python = ">=3.11" classifiers = [ # these are only for searching/browsing projects on PyPI - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", From 7ac5b09a6d1ddc1829ff66af422deeb70e1dad2b Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sat, 1 Aug 2026 10:20:54 +0200 Subject: [PATCH 4/4] Restrict UCX transports in CI to work around mpich 5 default mpich 5 is built as ch4:ucx,ofi in conda-forge, making UCX the default netmod (4.x was ofi-only). Every MPI_Init() now goes through UCX, including the one inside ESMF_RegridWeightGen for serial, single-rank mapping-file generation. On Azure-hosted GitHub runners, UCX enumerates the MANA adapter and fails to open an RDMA verbs interface on it: UCX ERROR uct_iface_open(ud_verbs/mana_0:1) failed: Address not valid MPIDI_UCX_init_worker(86): ucx function returned with failed status MPI_Init(argc=(nil), argv=(nil)) failed ESMF_RegridWeightGen then aborts with exit 143, failing all the remapping tests. Runners without a verbs device are unaffected, which is why this does not reproduce on typical development machines. Set UCX_TLS at the workflow level so it covers both the test job and the rattler-build package job. This is deliberately not set in pixi.toml's activation, since forcing IB traffic over TCP would hurt real parallel regridding with mapParallelExec on HPC machines. Co-Authored-By: Claude Opus 5 --- .github/workflows/build_workflow.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build_workflow.yml b/.github/workflows/build_workflow.yml index 7b146afff..91942e69c 100644 --- a/.github/workflows/build_workflow.yml +++ b/.github/workflows/build_workflow.yml @@ -16,6 +16,11 @@ on: env: CANCEL_OTHERS: false PATHS_IGNORE: '["**/README.md", "**/docs/**"]' + # mpich >=5 is built as ch4:ucx,ofi, so UCX is the default netmod. Azure-hosted + # GitHub runners expose a MANA RDMA device that UCX tries (and fails) to open, + # so MPI_Init() aborts inside ESMF_RegridWeightGen. Restrict UCX to transports + # that actually work on the runners. + UCX_TLS: "tcp,self,sm" jobs: build: