Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a813eee
Update to v2.0.0-alpha.1
xylar Mar 21, 2026
d568e90
Switch to pyproject.toml
xylar Mar 21, 2026
980b100
Move deployment to `deploy.py` using `mache.deploy`
xylar Mar 21, 2026
1ad22c4
Update dependencies
xylar Mar 21, 2026
57f15c3
Remove compass.load and use mache.deploy instead
xylar Mar 21, 2026
6ae5414
Update provenance to use pixi
xylar Mar 21, 2026
f2fad23
Add ignores related to mache.deploy
xylar Mar 21, 2026
36c7ac7
Update CI for mache.deploy
xylar Mar 21, 2026
d26ef77
Update the docs following move to mache.deploy
xylar Mar 21, 2026
261dc9a
Fix machine name detection in setup.py
xylar Mar 21, 2026
f5ff5a4
Remove configs for unsupported machines
xylar Mar 21, 2026
0a8c5da
TEMP: use add-target-software-cli-flags mache branch in CI
xylar Mar 21, 2026
421a4df
Update the docs for recent code changes
xylar Mar 21, 2026
cb8d803
Check the docs with a strict build
xylar Mar 21, 2026
c7a587c
Require cmake >=3.27 for Trilinos
xylar Mar 21, 2026
209ae3e
Opt out of system hdf5 and netcdf based on config option
xylar Mar 21, 2026
59f5e75
Remove unneed Anvil clause
xylar Mar 21, 2026
6f99725
Exclude system CMake on Chrysalis
xylar Mar 21, 2026
2c69db0
Add a post_spack() hook that deletes ESMF includes
xylar Mar 21, 2026
f005dda
Add spack libs to LD_LIBRARY_PATH in post_spack() hook
xylar Mar 21, 2026
66bc06d
Update to albany tag compass-2026-03-21
xylar Mar 21, 2026
a5f311f
Update to mache 3.2.0
xylar Mar 31, 2026
303d629
Update to mache 3.3.0rc2
xylar Mar 31, 2026
7c944c1
Remove `+uvm` from trilinos and albany spack variants
xylar Mar 31, 2026
bfb1a5b
update to mache 3.3.0
xylar Apr 3, 2026
db88f5a
Fix post_spack to only run with --deploy-spack
xylar Apr 3, 2026
9a36462
Switch to separate software and lib spack environments
xylar Apr 4, 2026
657bc9f
Don't remove ESMF libraries in post_spack hook
xylar Apr 4, 2026
131f670
Add groups for updating permissions
xylar Apr 4, 2026
d121b6b
Update to mache 3.6.1
xylar Apr 24, 2026
0c4998c
Update to mpas_tools 1.5.1 and geometric_features 1.6.3
xylar May 5, 2026
7c793d9
Require python >=3.11
xylar May 5, 2026
6c6ee81
Only checkout MALI-Dev submodule in GIS test
xylar May 5, 2026
716ca42
Disable MALI Exodus output by default
matthewhoffman May 5, 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
16 changes: 16 additions & 0 deletions .flake8.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[flake8]
# https://pep8.readthedocs.io/en/latest/intro.html#error-codes
ignore =
# line break after operator
W504
# Max width of GitHub code review is 79 characters
max-line-length = 79
max-complexity = 18
per-file-ignores =
*/__init__.py: F401
exclude =
.git,
docs,
.idea,
.mypy_cache,
.pytest_cache,
57 changes: 35 additions & 22 deletions .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
env:
CANCEL_OTHERS: false
PATHS_IGNORE: '["**/README.md", "**/docs/**"]'
PYTHON_VERSION: "3.13"
PYTHON_VERSION: "3.14"

jobs:
pre-commit-hooks:
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.11", "3.12", "3.13", "3.14"]
fail-fast: false
steps:
- id: skip_check
Expand All @@ -73,43 +73,56 @@ jobs:
uses: actions/checkout@v6

- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
name: Set up Conda Environment
uses: mamba-org/setup-micromamba@v3
name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
name: Cache pixi packages
uses: actions/cache@v5
env:
# Increase this value to reset cache if deploy inputs have not changed in the workflow
CACHE_NUMBER: 0
with:
environment-name: compass_test
init-shell: bash
condarc: |
channel_priority: strict
channels:
- conda-forge
- e3sm/label/compass
create-args: >-
python=${{ matrix.python-version }}
path: |
~/.cache/rattler/cache
~/.pixi/bin
key: ${{ runner.os }}-${{ matrix.python-version }}-pixi-${{ env.CACHE_NUMBER }}-${{ hashFiles('deploy.py', 'deploy/**', 'pyproject.toml') }}

- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
name: Install compass
run: |
git config --global url."https://github.com/".insteadOf "git@github.com:"
./conda/configure_compass_env.py \
--env_name compass_test \
--python=${{ matrix.python-version }} \
--mpi=mpich \
--verbose
source load_compass_test_mpich.sh
./deploy.py \
--mache-fork xylar/mache --mache-branch add-target-software-cli-flags \
--no-spack \
--python ${{ matrix.python-version }} \
--recreate
load_script=$(find . -maxdepth 1 -type f -name 'load_compass*.sh' | sort | tail -n 1)
if [ -z "$load_script" ]; then
echo "ERROR: no generated Compass load script found" >&2
exit 1
fi
source "$load_script"
python -c "import compass; import compass.version; print(compass.version.__version__)"
compass --help

- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
name: Build Sphinx Docs
run: |
source load_compass_test_mpich.sh
load_script=$(find . -maxdepth 1 -type f -name 'load_compass*.sh' | sort | tail -n 1)
source "$load_script"
cd docs
make html
make html-strict

- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
name: Run Tests
env:
CHECK_IMAGES: False
run: |
source load_compass_test_mpich.sh
load_script=$(find . -maxdepth 1 -type f -name 'load_compass*.sh' | sort | tail -n 1)
source "$load_script"
python -c "import compass"
compass list
compass list --machines
Expand Down
66 changes: 32 additions & 34 deletions .github/workflows/docs_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,63 +8,61 @@ on:
types: [published]

env:
PYTHON_VERSION: "3.13"
PYTHON_VERSION: "3.14"

jobs:
publish-docs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
env:
docs_version: "latest"
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
fetch-depth: 0

- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
name: Set up Conda Environment
uses: mamba-org/setup-micromamba@v3
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v6
with:
environment-name: compass_test
init-shell: bash
condarc: |
channel_priority: strict
channels:
- conda-forge
- e3sm/label/compass
create-args: >-
python=${{ env.PYTHON_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}

- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
name: Install compass
- name: Cache pixi packages
uses: actions/cache@v5
env:
# Increase this value to reset cache if deploy inputs have not changed in the workflow
CACHE_NUMBER: 0
with:
path: |
~/.cache/rattler/cache
~/.pixi/bin
key: ${{ runner.os }}-${{ env.PYTHON_VERSION }}-pixi-${{ env.CACHE_NUMBER }}-${{ hashFiles('deploy.py', 'deploy/**', 'pyproject.toml') }}

- name: Install compass
run: |
git config --global url."https://github.com/".insteadOf "git@github.com:"
./conda/configure_compass_env.py \
--env_only \
--env_name compass_test \
--python=${{ env.PYTHON_VERSION }} \
--verbose
source load_compass_test.sh
./deploy.py \
--no-spack \
--python ${{ env.PYTHON_VERSION }} \
--recreate
load_script=$(find . -maxdepth 1 -type f -name 'load_compass*.sh' | sort | tail -n 1)
if [ -z "$load_script" ]; then
echo "ERROR: no generated Compass load script found" >&2
exit 1
fi
source "$load_script"

- name: Build Sphinx Docs
run: |
source load_compass_test.sh
load_script=$(find . -maxdepth 1 -type f -name 'load_compass*.sh' | sort | tail -n 1)
source "$load_script"
cd docs
if [[ $GITHUB_REF_NAME == "main" ]]; then
export DOCS_VERSION="latest"
else
export DOCS_VERSION=${GITHUB_REF_NAME}
fi
echo "Docs version: $DOCS_VERSION"
echo "docs_version=$DOCS_VERSION" >> $GITHUB_ENV
make html
- name: Copy Docs and Commit
run: |
source load_compass_test.sh
load_script=$(find . -maxdepth 1 -type f -name 'load_compass*.sh' | sort | tail -n 1)
source "$load_script"
cd docs
# gh-pages branch must already exist
git clone https://github.com/MPAS-Dev/compass.git --branch gh-pages --single-branch gh-pages
Expand All @@ -74,8 +72,8 @@ jobs:
touch .nojekyll
# Add `index.html` to point to the `main` branch automatically.
printf '<meta http-equiv="refresh" content="0; url=./main/index.html" />' > index.html
# Only replace `main` docs with latest changes. Docs for releases should be untouched.
export DOCS_VERSION="${{ env.docs_version }}"
# Replace the docs for the current branch or tag with the latest build.
export DOCS_VERSION="${GITHUB_REF_NAME}"
rm -rf ${DOCS_VERSION}
mkdir ${DOCS_VERSION}
cp -r ../_build/html/* ${DOCS_VERSION}
Expand Down
53 changes: 40 additions & 13 deletions .github/workflows/gis_coarse_meshgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,52 @@ jobs:
gis-coarse-meshgen:
name: GIS Coarse Mesh Generation
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v6

- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
submodules: recursive
path: compass
- name: setup_and_run_step
run: |
# create top level working directory
root=$PWD
pushd compass
python-version: "3.14"

# create the compass environment
./conda/configure_compass_env.py --conda $root/mambaForge --env_name compass_test --mpi mpich
- name: Cache pixi packages
uses: actions/cache@v5
env:
# Increase this value to reset cache if deploy inputs have not changed in the workflow
CACHE_NUMBER: 0
with:
path: |
~/.cache/rattler/cache
~/.pixi/bin
key: ${{ runner.os }}-3.14-pixi-${{ env.CACHE_NUMBER }}-${{ hashFiles('deploy.py', 'deploy/**', 'pyproject.toml') }}

# enable the compass environment
source load_compass_test_mpich.sh
- name: Install compass
run: |
git config --global url."https://github.com/".insteadOf "git@github.com:"
./deploy.py \
--mache-fork xylar/mache --mache-branch add-target-software-cli-flags \
--no-spack \
--python 3.14 \
--recreate
load_script=$(find . -maxdepth 1 -type f -name 'load_compass*.sh' | sort | tail -n 1)
if [ -z "$load_script" ]; then
echo "ERROR: no generated Compass load script found" >&2
exit 1
fi
source "$load_script"
# only update the MALI-Dev submodule, not others
git submodule update --init MALI-Dev

popd
- name: Setup and run step
run: |
load_script=$(find . -maxdepth 1 -type f -name 'load_compass*.sh' | sort | tail -n 1)
source "$load_script"

# create top level working directory
root=$PWD

# download the input GIS coarse mesh
tarball=gis4kmSubSampled_01302025.tgz
Expand Down Expand Up @@ -71,4 +99,3 @@ jobs:
# run the test case
cd $testDir
compass run

18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,21 @@ ENV/

# activation scripts
/load_*.sh

# pixi
.pixi/
pixi.lock
pixi-env/

# vs code
.vscode/

# mypy
.mypy_cache/

# ruff
.ruff_cache/

# mache
.mache_cache/
deploy_tmp
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
rev: 7.3.0
hooks:
- id: flake8
args: ["--config=setup.cfg"]
args: ["--config=.flake8.cfg"]
additional_dependencies: [flake8-isort]

# https://pre-commit.ci/#configuration
Expand Down
2 changes: 1 addition & 1 deletion compass/landice/tests/dome/albany_input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ANONYMOUS:

# Discretization Description
Discretization:
Exodus Output File Name: albany_output.exo
# Exodus Output File Name: albany_output.exo

Piro:
# Nonlinear Solver Information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import netCDF4

import compass.namelist
from compass.io import symlink
from compass.job import write_job_script
from compass.load_script import symlink_load_script
from compass.model import run_model
from compass.step import Step

Expand Down Expand Up @@ -166,14 +166,7 @@ def setup(self):
pre_run_commands=pre_run_cmd,
post_run_commands=post_run_cmd)

# COMPASS does not create symlinks for the load script in step dirs,
# so use the standard approach for creating that symlink in each
# step dir.
if 'LOAD_COMPASS_ENV' in os.environ:
script_filename = os.environ['LOAD_COMPASS_ENV']
# make a symlink to the script for loading the compass conda env.
symlink(script_filename, os.path.join(self.work_dir,
'load_compass_env.sh'))
symlink_load_script(self.work_dir)

def run(self):
"""
Expand Down
11 changes: 2 additions & 9 deletions compass/landice/tests/ensemble_generator/ensemble_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import netCDF4
import yaml

from compass.io import symlink
from compass.job import write_job_script
from compass.landice.extrapolate import extrapolate_variable
from compass.load_script import symlink_load_script
from compass.model import make_graph_file, run_model
from compass.step import Step

Expand Down Expand Up @@ -262,14 +262,7 @@ def setup(self):
target_cores=self.ntasks, min_cores=self.min_tasks,
work_dir=self.work_dir)

# COMPASS does not create symlinks for the load script in step dirs,
# so use the standard approach for creating that symlink in each
# step dir.
if 'LOAD_COMPASS_ENV' in os.environ:
script_filename = os.environ['LOAD_COMPASS_ENV']
# make a symlink to the script for loading the compass conda env.
symlink(script_filename, os.path.join(self.work_dir,
'load_compass_env.sh'))
symlink_load_script(self.work_dir)

# save run info for analysis/viz
with open(os.path.join(self.work_dir, 'run_info.cfg'), 'w') \
Expand Down
2 changes: 1 addition & 1 deletion compass/landice/tests/greenland/albany_input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ANONYMOUS:
# Discretization Description
Discretization:
Exodus Output File Name: albany_output.exo
# Exodus Output File Name: albany_output.exo

Problem:
Cubature Degree: 4
Expand Down
Loading
Loading