Skip to content

Commit 32a8a46

Browse files
authored
Merge pull request #1030 from MPAS-Dev/develop
Merge develop to main for 1.12.0 release
2 parents ab83cbc + ef79d29 commit 32a8a46

Some content is hidden

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

49 files changed

+1654
-518
lines changed

.github/dependabot.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
3+
updates:
4+
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "weekly"
9+
assignees:
10+
- "xylar"
11+
- "altheaden"
12+
reviewers:
13+
- "xylar"
14+
- "altheaden"
15+

.github/pull_request_template.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!--
2+
Thank you for your pull request.
3+
Please add a description of what is accomplished in the PR here at the top:
4+
-->
5+
6+
<!--
7+
Below are a few things we ask you or your reviewers to kindly check.
8+
***Remove checks that are not relevant by deleting the line(s) below.***
9+
-->
10+
Checklist
11+
* [ ] User's Guide has been updated
12+
* [ ] If this PR adds a new analysis task, it has also been added to the user's guide
13+
* [ ] Developer's Guide has been updated
14+
* [ ] API documentation in the Developer's Guide (`api.rst`) has any new or modified class, method and/or functions listed
15+
* [ ] Documentation has been [built locally](https://mpas-dev.github.io/MPAS-Analysis/latest/users_guide/quick_start.html#generating-documentation) and changes look as expected
16+
* [ ] `Testing` comment in the PR documents testing used to verify the changes
17+
18+
<!--
19+
Please note any issues this fixes using closing keywords: https://help.github.com/articles/closing-issues-using-keywords
20+
-->
21+

.github/workflows/build_workflow.yml

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: CI/CD Build Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
9+
pull_request:
10+
branches:
11+
- main
12+
- develop
13+
14+
workflow_dispatch:
15+
16+
env:
17+
CANCEL_OTHERS: false
18+
PATHS_IGNORE: '["**/README.md", "**/docs/**"]'
19+
20+
jobs:
21+
build:
22+
name: test mpas_analysis - python ${{ matrix.python-version }}
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 20
25+
defaults:
26+
run:
27+
shell: bash -l {0}
28+
strategy:
29+
matrix:
30+
python-version: ["3.10", "3.11", "3.12"]
31+
steps:
32+
- id: skip_check
33+
uses: fkirc/skip-duplicate-actions@master
34+
with:
35+
cancel_others: ${{ env.CANCEL_OTHERS }}
36+
paths_ignore: ${{ env.PATHS_IGNORE }}
37+
38+
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
39+
uses: actions/checkout@v4
40+
41+
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
42+
name: Cache Conda
43+
uses: actions/cache@v4
44+
env:
45+
# Increase this value to reset cache if conda-dev-spec.template has not changed in the workflow
46+
CACHE_NUMBER: 0
47+
with:
48+
path: ~/conda_pkgs_dir
49+
key:
50+
${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{
51+
hashFiles('dev-spec.txt,setup.py') }}
52+
53+
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
54+
name: Set up Conda Environment
55+
uses: conda-incubator/setup-miniconda@v3
56+
with:
57+
activate-environment: "mpas_analysis_ci"
58+
miniforge-version: latest
59+
channels: conda-forge
60+
channel-priority: strict
61+
auto-update-conda: true
62+
python-version: ${{ matrix.python-version }}
63+
64+
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
65+
name: Install mpas_analysis
66+
run: |
67+
conda create -n mpas_analysis_dev --file dev-spec.txt \
68+
python=${{ matrix.python-version }}
69+
conda activate mpas_analysis_dev
70+
python -m pip install --no-deps --no-build-isolation -vv -e .
71+
72+
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
73+
name: Run Tests
74+
env:
75+
CHECK_IMAGES: False
76+
run: |
77+
set -e
78+
conda activate mpas_analysis_dev
79+
pip check
80+
pytest --pyargs mpas_analysis
81+
mpas_analysis --help
82+
download_analysis_data --help
83+
84+
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
85+
name: Build Sphinx Docs
86+
run: |
87+
conda activate mpas_analysis_dev
88+
# sphinx-multiversion expects at least a "main" branch
89+
git branch main || echo "branch main already exists."
90+
cd docs
91+
sphinx-multiversion . _build/html
92+

.github/workflows/docs_workflow.yml

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: CI/CD Release Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
9+
release:
10+
types: [published]
11+
12+
jobs:
13+
publish-docs:
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
shell: bash -l {0}
18+
timeout-minutes: 20
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
23+
fetch-depth: 0
24+
25+
- name: Cache Conda
26+
uses: actions/cache@v4
27+
env:
28+
# Increase this value to reset cache if deploy/conda-dev-spec.template has not changed in the workflow
29+
CACHE_NUMBER: 0
30+
with:
31+
path: ~/conda_pkgs_dir
32+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
33+
hashFiles('dev-spec.txt') }}
34+
35+
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
36+
name: Set up Conda Environment
37+
uses: conda-incubator/setup-miniconda@v3
38+
with:
39+
activate-environment: "mpas_analysis_ci"
40+
miniforge-version: latest
41+
channels: conda-forge
42+
channel-priority: strict
43+
auto-update-conda: true
44+
python-version: ${{ matrix.python-version }}
45+
46+
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
47+
name: Install mpas_analysis
48+
run: |
49+
git config --global url."https://github.com/".insteadOf "[email protected]:"
50+
conda create -n mpas_analysis_dev --file dev-spec.txt \
51+
python=${{ matrix.python-version }}
52+
conda activate mpas_analysis_dev
53+
python -m pip install -vv --no-deps --no-build-isolation -e .
54+
55+
- name: Build Sphinx Docs
56+
run: |
57+
set -e
58+
conda activate mpas_analysis_dev
59+
pip check
60+
mpas_analysis sync diags --help
61+
cd docs
62+
sphinx-multiversion . _build/html
63+
- name: Copy Docs and Commit
64+
run: |
65+
set -e
66+
conda activate mpas_analysis_dev
67+
pip check
68+
mpas_analysis sync diags --help
69+
cd docs
70+
# gh-pages branch must already exist
71+
git clone https://github.com/MPAS-Dev/MPAS-Analysis.git --branch gh-pages --single-branch gh-pages
72+
# Make sure we're in the gh-pages directory.
73+
cd gh-pages
74+
# Create `.nojekyll` (if it doesn't already exist) for proper GH Pages configuration.
75+
touch .nojekyll
76+
# Add `index.html` to point to the `develop` branch automatically.
77+
printf '<meta http-equiv="refresh" content="0; url=./develop/index.html" />' > index.html
78+
# Only replace docs in a directory with the destination branch name with latest changes. Docs for
79+
# releases should be untouched.
80+
rm -rf ${{ github.head_ref || github.ref_name }}
81+
# don't clobber existing release versions (in case we retroactively fixed them)
82+
cp -r -n ../_build/html/* .
83+
# Configure git using GitHub Actions credentials.
84+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
85+
git config --local user.name "github-actions[bot]"
86+
# The second command will fail if no changes were present, so we ignore it
87+
git add .
88+
git commit -m "Update documentation" -a || true
89+
- name: Push Changes
90+
uses: ad-m/github-push-action@master
91+
with:
92+
branch: gh-pages
93+
directory: docs/gh-pages
94+
github_token: ${{ secrets.GITHUB_TOKEN }}
95+
force: true
96+

.travis.yml

-48
This file was deleted.

README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# MPAS-Analysis
2-
[![Build Status](https://dev.azure.com/MPAS-Dev/MPAS-Analysis%20testing/_apis/build/status/MPAS-Dev.MPAS-Analysis?branchName=develop)](https://dev.azure.com/MPAS-Dev/MPAS-Analysis%20testing/_build/latest?definitionId=2&branchName=develop)
32

43
Analysis for simulations produced with Model for Prediction Across Scales
54
(MPAS) components and the Energy Exascale Earth System Model (E3SM), which
@@ -28,7 +27,7 @@ used those components.
2827

2928
## Documentation
3029

31-
[https://mpas-dev.github.io/MPAS-Analysis/latest/](https://mpas-dev.github.io/MPAS-Analysis/latest/)
30+
[https://mpas-dev.github.io/MPAS-Analysis/develop/](https://mpas-dev.github.io/MPAS-Analysis/develop/)
3231

3332
## Installation for users
3433

@@ -57,7 +56,7 @@ conda config --add channels conda-forge
5756
conda config --set channel_priority strict
5857
conda create -y -n mpas_dev --file dev-spec.txt
5958
conda activate mpas_dev
60-
python -m pip install -e .
59+
python -m pip install --no-deps --no-build-isolation -e .
6160
```
6261

6362
If you are developing another conda package at the same time (this is common
@@ -69,9 +68,9 @@ conda create -y -n mpas_dev --file tools/MPAS-Tools/conda_package/dev-spec.txt \
6968
--file analysis/MPAS-Analysis/dev-spec.txt
7069
conda activate mpas_dev
7170
cd tools/MPAS-Tools/conda_package
72-
python -m pip install -e .
71+
python -m pip install --no-deps --no-build-isolation -e .
7372
cd ../../../analysis/MPAS-Analysis
74-
python -m pip install -e .
73+
python -m pip install --no-deps --no-build-isolation -e .
7574
```
7675
Obviously, the paths to the repos may be different in your local clones. With
7776
the `mpas_dev` environment as defined above, you can make changes to both
@@ -290,7 +289,7 @@ to be generated and is set up properly.
290289

291290
## Generating Documentation
292291

293-
Create a development environment as described above in "Installation for
292+
Create a development environment as described above in "Installation for
294293
developers". Then run:
295294
To generate the `sphinx` documentation, run:
296295
```
@@ -301,4 +300,4 @@ make html
301300
The results can be viewed in your web browser by opening:
302301
```
303302
_build/html/index.html
304-
```
303+
```

0 commit comments

Comments
 (0)