Skip to content

Commit 048465d

Browse files
committed
ci: run ndsl-checks on PRs
- change workflow to run on pull requests - change paths to include changes to the workflow - change python version to 3.12 (as on the HPC) - fix `mkdocs build` - fix data url - make wget less verbose - fix `pytest` invocation - add NDSL to dependencies - non-verbose `tar` extract - pick a (random) experiment (why is this needed?!) - fix `test_constants` by adding more excludes
1 parent 81fad3d commit 048465d

39 files changed

Lines changed: 78 additions & 63 deletions

.github/workflows/ndsl-checks.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: NDSL Lint & Translate Tests
22

33
on:
4-
push:
5-
paths: "./GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/**"
4+
pull_request:
5+
paths:
6+
- '.github/workflows/ndsl-checks.yml'
7+
- 'GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/**'
68
workflow_dispatch:
79

810
# cancel running jobs if theres a newer push
@@ -14,30 +16,29 @@ jobs:
1416
main:
1517
env:
1618
DATA_PATH: ./test_data/11.5.2/TBC_C24_L72/moist
17-
DATA_URL: "https://portal.nccs.nasa.gov/datashare/astg/smt/geos-fp/translate/11.5.2/x86_GNU/Moist/TBC_C24L72.tar.gz"
19+
DATA_URL: "https://portal.nccs.nasa.gov/datashare/astg/smt/geos-fp/translate/11.5.2/x86_GNU/Moist/TBC_C24L72_20251208.tar.gz"
1820
runs-on: ubuntu-latest
1921
steps:
20-
- name: Step Python 3.11
22+
- name: Step Python 3.12
2123
uses: actions/setup-python@v6
2224
with:
23-
python-version: '3.11'
25+
python-version: '3.12'
2426

2527
- name: Install MPI
2628
run: pip install mpich
2729

2830
- name: Checkout repository
2931
uses: actions/checkout@v6
30-
with:
31-
submodules: 'recursive'
3232

3333
- name: Install Python packages
3434
run: |
35-
pip install ./GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist[develop]
35+
cd GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist
36+
pip install .
3637
3738
- name: Run lint via pre-commit
3839
run: |
3940
cd GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist
40-
pre-commit run --all-files
41+
pre-commit run --all-files --show-diff-on-failure
4142
4243
- name: Build Documentation
4344
run: |
@@ -48,15 +49,19 @@ jobs:
4849
run: |
4950
cd GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist
5051
mkdir -p ${{ env.DATA_PATH }} && cd ${{ env.DATA_PATH }}
51-
wget ${{ env.DATA_URL }}
52-
tar -xzvf TBC_C24L72.tar.gz
52+
wget --no-verbose ${{ env.DATA_URL }}
53+
tar -xzf TBC_C24L72_20251208.tar.gz
5354
5455
- name: Run regular unit tests
56+
env:
57+
EXP_NAME: 'gcm-fp'
5558
run : |
5659
cd GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist
57-
pytests ./tests/numerical
60+
pytest ./tests/numerical
5861
5962
- name: Run translate tests
63+
env:
64+
EXP_NAME: 'gcm-fp'
6065
run: |
6166
cd GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/pyMoist/tests/scripts/
6267
./run_all.sh ../../${{ env.DATA_PATH }} st:dace:cpu:KIJ
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# air_density
22

3-
::: pyMoist.convection.GF_2020.air_density
3+
::: pyMoist.convection.GF_2020.cumulus_parameterization.air_density
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# buoyancy
22

3-
::: pyMoist.convection.GF_2020.buoyancy
3+
::: pyMoist.convection.GF_2020.cumulus_parameterization.buoyancy
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# check_config
22

3-
::: pyMoist.convection.GF_2020.check_config
3+
::: pyMoist.convection.GF_2020.cumulus_parameterization.check_config
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# config
22

3-
::: pyMoist.convection.GF_2020.config
3+
::: pyMoist.convection.GF_2020.cumulus_parameterization.config
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# constants
22

3-
::: pyMoist.convection.GF_2020.constants
3+
::: pyMoist.convection.GF_2020.cumulus_parameterization.constants
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# convective_tracers
22

3-
::: pyMoist.convection.GF_2020.convective_tracers
3+
::: pyMoist.convection.GF_2020.cumulus_parameterization.convective_tracers
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# cumulus_parameterization
22

3-
::: pyMoist.convection.GF_2020.cumulus_parameterization
3+
::: pyMoist.convection.GF_2020.cumulus_parameterization.cumulus_parameterization
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# diurnal_cycle
22

3-
::: pyMoist.convection.GF_2020.diurnal_cycle
3+
::: pyMoist.convection.GF_2020.cumulus_parameterization.diurnal_cycle
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# downdraft
22

3-
::: pyMoist.convection.GF_2020.downdraft
3+
::: pyMoist.convection.GF_2020.cumulus_parameterization.downdraft

0 commit comments

Comments
 (0)