Skip to content

Commit 97bf205

Browse files
authored
Merge pull request #1149 from MPAS-Dev/develop
Merge develop into main
2 parents 49625e0 + f8f8a5c commit 97bf205

47 files changed

Lines changed: 975 additions & 747 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build_workflow.yml

Lines changed: 69 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,24 @@ jobs:
2222
name: test mpas_analysis - python ${{ matrix.python-version }}
2323
runs-on: ubuntu-latest
2424
timeout-minutes: 20
25-
defaults:
26-
run:
27-
shell: bash -l {0}
2825
strategy:
2926
matrix:
30-
python-version: ["3.10", "3.11", "3.12", "3.13"]
27+
include:
28+
- python-version: "3.10"
29+
pixi-environment: py310
30+
variant-file: ci/python3.10.yaml
31+
- python-version: "3.11"
32+
pixi-environment: py311
33+
variant-file: ci/python3.11.yaml
34+
- python-version: "3.12"
35+
pixi-environment: py312
36+
variant-file: ci/python3.12.yaml
37+
- python-version: "3.13"
38+
pixi-environment: py313
39+
variant-file: ci/python3.13.yaml
40+
- python-version: "3.14"
41+
pixi-environment: py314
42+
variant-file: ci/python3.14.yaml
3143
fail-fast: false
3244
steps:
3345
- id: skip_check
@@ -37,53 +49,68 @@ jobs:
3749
paths_ignore: ${{ env.PATHS_IGNORE }}
3850

3951
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
40-
uses: actions/checkout@v5
52+
uses: actions/checkout@v6
4153

4254
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
43-
name: Cache Conda
44-
uses: actions/cache@v4
45-
env:
46-
# Increase this value to reset cache if conda-dev-spec.template has not changed in the workflow
47-
CACHE_NUMBER: 0
55+
name: Set up Pixi
56+
uses: prefix-dev/setup-pixi@v0.9.5
4857
with:
49-
path: ~/conda_pkgs_dir_py${{ matrix.python-version }}
50-
key:
51-
${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{
52-
hashFiles('dev-spec.txt,pyproject.toml') }}
53-
54-
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
55-
name: Set up Conda Environment
56-
uses: mamba-org/setup-micromamba@v2
57-
with:
58-
environment-name: mpas_analysis_dev
59-
init-shell: bash
60-
condarc: |
61-
channel_priority: strict
62-
channels:
63-
- conda-forge
64-
create-args: >-
65-
python=${{ matrix.python-version }}
66-
67-
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
68-
name: Install mpas_analysis
69-
run: |
70-
conda install -y --file dev-spec.txt \
71-
python=${{ matrix.python-version }}
72-
python -m pip install --no-deps --no-build-isolation -vv -e .
58+
environments: ${{ matrix.pixi-environment }}
7359

7460
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
7561
name: Run Tests
7662
env:
77-
CHECK_IMAGES: False
63+
CHECK_IMAGES: "False"
7864
run: |
7965
set -e
80-
pip check
81-
pytest --pyargs mpas_analysis
82-
mpas_analysis --help
83-
download_analysis_data --help
66+
pixi run -e ${{ matrix.pixi-environment }} python -m pip check
67+
pixi run -e ${{ matrix.pixi-environment }} pytest --pyargs mpas_analysis
68+
pixi run -e ${{ matrix.pixi-environment }} mpas_analysis --help
69+
pixi run -e ${{ matrix.pixi-environment }} download_analysis_data --help
8470
85-
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
71+
- if: ${{ steps.skip_check.outputs.should_skip != 'true' && matrix.python-version == '3.14' }}
8672
name: Build Sphinx Docs
8773
run: |
88-
cd docs
89-
DOCS_VERSION=test make versioned-html
74+
pixi run -e ${{ matrix.pixi-environment }} bash -lc '
75+
cd docs
76+
DOCS_VERSION=test make versioned-html
77+
'
78+
79+
package:
80+
name: build package - python ${{ matrix.python-version }}
81+
runs-on: ubuntu-latest
82+
timeout-minutes: 30
83+
strategy:
84+
matrix:
85+
include:
86+
- python-version: "3.10"
87+
pixi-environment: py310
88+
variant-file: ci/python3.10.yaml
89+
- python-version: "3.11"
90+
pixi-environment: py311
91+
variant-file: ci/python3.11.yaml
92+
- python-version: "3.12"
93+
pixi-environment: py312
94+
variant-file: ci/python3.12.yaml
95+
- python-version: "3.13"
96+
pixi-environment: py313
97+
variant-file: ci/python3.13.yaml
98+
- python-version: "3.14"
99+
pixi-environment: py314
100+
variant-file: ci/python3.14.yaml
101+
fail-fast: false
102+
steps:
103+
- uses: actions/checkout@v6
104+
105+
- name: Set up Pixi
106+
uses: prefix-dev/setup-pixi@v0.9.5
107+
with:
108+
environments: ${{ matrix.pixi-environment }}
109+
110+
- name: Build Conda Package with rattler-build
111+
run: |
112+
pixi run -e ${{ matrix.pixi-environment }} \
113+
rattler-build build \
114+
-m ${{ matrix.variant-file }} \
115+
-r ci/recipe/recipe.yaml \
116+
--output-dir rattler-build-output

.github/workflows/docs_workflow.yml

Lines changed: 35 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -10,98 +10,68 @@ on:
1010
types: [published]
1111

1212
env:
13-
PYTHON_VERSION: "3.13"
13+
PYTHON_VERSION: "3.14"
1414

1515
jobs:
1616
publish-docs:
1717
runs-on: ubuntu-latest
18-
defaults:
19-
run:
20-
shell: bash -l {0}
2118
timeout-minutes: 20
2219
steps:
23-
- uses: actions/checkout@v5
20+
- uses: actions/checkout@v6
2421
with:
2522
persist-credentials: false
2623
fetch-depth: 0
2724

28-
- name: Cache Conda
29-
uses: actions/cache@v4
30-
env:
31-
# Increase this value to reset cache if deploy/conda-dev-spec.template has not changed in the workflow
32-
CACHE_NUMBER: 0
25+
- name: Set up Pixi
26+
uses: prefix-dev/setup-pixi@v0.9.5
3327
with:
34-
path: ~/conda_pkgs_dir
35-
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
36-
hashFiles('dev-spec.txt') }}
37-
38-
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
39-
name: Set up Conda Environment
40-
uses: mamba-org/setup-micromamba@v2
41-
with:
42-
environment-name: mpas_analysis_dev
43-
init-shell: bash
44-
condarc: |
45-
channel_priority: strict
46-
channels:
47-
- conda-forge
48-
create-args: >-
49-
python=${{ env.PYTHON_VERSION }}
50-
51-
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
52-
name: Install mpas_analysis
53-
run: |
54-
git config --global url."https://github.com/".insteadOf "git@github.com:"
55-
conda install -y --file dev-spec.txt \
56-
python=${{ env.PYTHON_VERSION }}
57-
python -m pip install -vv --no-deps --no-build-isolation -e .
28+
environments: py314
5829

5930
- name: Build Sphinx Docs
6031
run: |
6132
set -e
62-
pip check
63-
mpas_analysis sync diags --help
64-
cd docs
65-
DOCS_VERSION=${{ github.ref_name }} make versioned-html
33+
git config --global url."https://github.com/".insteadOf "git@github.com:"
34+
pixi run -e py314 python -m pip check
35+
pixi run -e py314 mpas_analysis sync diags --help
36+
pixi run -e py314 bash -lc '
37+
cd docs
38+
DOCS_VERSION=${{ github.ref_name }} make versioned-html
39+
'
40+
6641
- name: Copy Docs and Commit
6742
run: |
6843
set -e
69-
pip check
70-
mpas_analysis sync diags --help
71-
cd docs
72-
# gh-pages branch must already exist
73-
git clone https://github.com/MPAS-Dev/MPAS-Analysis.git --branch gh-pages --single-branch gh-pages
44+
pixi run -e py314 bash -lc '
45+
cd docs
46+
# gh-pages branch must already exist
47+
git clone https://github.com/MPAS-Dev/MPAS-Analysis.git --branch gh-pages --single-branch gh-pages
7448
75-
# Only replace docs in a directory with the destination branch name with latest changes. Docs for
76-
# releases should be untouched.
77-
rm -rf gh-pages/${{ github.ref_name }}
49+
# Only replace docs in a directory with the destination branch name with latest changes. Docs for
50+
# releases should be untouched.
51+
rm -rf gh-pages/${{ github.ref_name }}
7852
79-
# don't clobber existing release versions (in case we retroactively fixed them)
80-
cp -r _build/html/${{ github.ref_name }} gh-pages/
53+
# do not clobber existing release versions if they were updated manually
54+
cp -r _build/html/${{ github.ref_name }} gh-pages/
8155
82-
mkdir -p gh-pages/shared
83-
cp shared/version-switcher.js gh-pages/shared/version-switcher.js
56+
mkdir -p gh-pages/shared
57+
cp shared/version-switcher.js gh-pages/shared/version-switcher.js
8458
85-
# Update the list of versions with all versions in the gh-pages directory.
86-
python generate_versions_json.py
59+
# Update the list of versions with all versions in the gh-pages directory.
60+
python generate_versions_json.py
61+
62+
cd gh-pages
63+
touch .nojekyll
64+
printf "<meta http-equiv=\"refresh\" content=\"0; url=./develop/index.html\" />" > index.html
65+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
66+
git config --local user.name "github-actions[bot]"
67+
git add .
68+
git commit -m "Update documentation" -a || true
69+
'
8770
88-
# Make sure we're in the gh-pages directory.
89-
cd gh-pages
90-
# Create `.nojekyll` (if it doesn't already exist) for proper GH Pages configuration.
91-
touch .nojekyll
92-
# Add `index.html` to point to the `develop` branch automatically.
93-
printf '<meta http-equiv="refresh" content="0; url=./develop/index.html" />' > index.html
94-
# Configure git using GitHub Actions credentials.
95-
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
96-
git config --local user.name "github-actions[bot]"
97-
# The second command will fail if no changes were present, so we ignore it
98-
git add .
99-
git commit -m "Update documentation" -a || true
10071
- name: Push Changes
10172
uses: ad-m/github-push-action@master
10273
with:
10374
branch: gh-pages
10475
directory: docs/gh-pages
10576
github_token: ${{ secrets.GITHUB_TOKEN }}
10677
force: true
107-

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ ENV/
9393
.ropeproject
9494

9595
.DS_Store
96+
.pixi/
97+
pixi.lock
9698

9799
# test suites
98100
/anvil_test_suite/
@@ -101,4 +103,7 @@ ENV/
101103
/compy_test_suite/
102104

103105
# vscode settings
104-
.vscode/
106+
.vscode/
107+
108+
# codex
109+
.codex

ci/python3.10.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
channel_sources:
2-
- conda-forge,defaults
2+
- conda-forge
33
pin_run_as_build:
44
python:
55
min_pin: x.x

ci/python3.11.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
channel_sources:
2-
- conda-forge,defaults
2+
- conda-forge
33
pin_run_as_build:
44
python:
55
min_pin: x.x

ci/python3.12.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
channel_sources:
2-
- conda-forge,defaults
2+
- conda-forge
33
pin_run_as_build:
44
python:
55
min_pin: x.x

ci/python3.13.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
channel_sources:
2-
- conda-forge,defaults
2+
- conda-forge
33
pin_run_as_build:
44
python:
55
min_pin: x.x

ci/python3.14.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
channel_sources:
2+
- conda-forge
3+
pin_run_as_build:
4+
python:
5+
min_pin: x.x
6+
max_pin: x.x
7+
python:
8+
- 3.14.* *_cp314

0 commit comments

Comments
 (0)