Skip to content

Commit 9d3dc6b

Browse files
committed
Merged develop into update/workflow
2 parents 0f45171 + 838e92c commit 9d3dc6b

File tree

6 files changed

+131
-39
lines changed

6 files changed

+131
-39
lines changed

.github/workflows/lint.yml .github/workflows/lint.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: "Lint"
22
on:
33
pull_request:
4-
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
54

65
jobs:
76
lint:
@@ -11,10 +10,10 @@ jobs:
1110
uses: actions/[email protected]
1211
with:
1312
submodules: 'recursive'
14-
- name: Step Python 3.8.12
13+
- name: Step Python 3.11.7
1514
uses: actions/[email protected]
1615
with:
17-
python-version: '3.8.12'
16+
python-version: '3.11.7'
1817
- name: Install OpenMPI for gt4py
1918
run: |
2019
sudo apt-get install libopenmpi-dev

.github/workflows/pace_tests.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: "pace main tests"
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
pace_main_tests:
7+
uses: NOAA-GFDL/pace/.github/workflows/main_unit_tests.yaml@develop
8+
with:
9+
component_trigger: true
10+
component_name: pyFV3

.github/workflows/pyshield_tests.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: "pySHiELD translate tests"
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
pyshield_translate_tests:
7+
uses: NOAA-GFDL/PySHiELD/.github/workflows/translate.yaml@develop
8+
with:
9+
component_trigger: true
10+
component_name: pyFV3

.github/workflows/translate.yaml

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: "pyFV3 translate tests (subset)"
2+
on:
3+
workflow_call:
4+
inputs:
5+
component_trigger:
6+
type: boolean
7+
default: false
8+
required: false
9+
component_name:
10+
type: string
11+
default: ''
12+
required: false
13+
pull_request:
14+
15+
# cancel running jobs if theres a newer push
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
pyFV3_translate_tests:
22+
runs-on: ubuntu-latest
23+
container:
24+
image: ghcr.io/noaa-gfdl/miniforge:mpich
25+
steps:
26+
27+
- name: External trigger Checkout pyFV3
28+
if: ${{inputs.component_trigger}}
29+
uses: actions/checkout@v4
30+
with:
31+
submodules: 'recursive'
32+
repository: noaa-gfdl/pyFV3
33+
path: pyFV3
34+
35+
- name: Checkout hash that triggered CI
36+
uses: actions/checkout@v4
37+
with:
38+
submodules: 'recursive'
39+
path: pyFV3/${{inputs.component_name}}
40+
41+
- name: External trigger install NDSL packages
42+
if: ${{inputs.component_trigger}}
43+
run: |
44+
cd ${GITHUB_WORKSPACE}/pyFV3
45+
cd NDSL && pip3 install .[test] && cd ../
46+
pip3 install .[test]
47+
48+
- name: Install pyFV3 packages
49+
if: ${{ ! inputs.component_trigger }}
50+
run : |
51+
cd ${GITHUB_WORKSPACE}/pyFV3
52+
pip install .[ndsl,test]
53+
54+
- name: Prepare test_data
55+
run: |
56+
cd ${GITHUB_WORKSPACE}/pyFV3
57+
mkdir -p test_data && cd test_data
58+
wget https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6ranks_standard.tar.gz
59+
tar -xzvf 8.1.3_c12_6ranks_standard.tar.gz --no-same-owner
60+
cd ..
61+
62+
- name: NumPy FvTp2d
63+
run: |
64+
cd ${GITHUB_WORKSPACE}/pyFV3
65+
coverage run --rcfile=setup.cfg -m pytest \
66+
-v -s --data_path=./test_data/8.1.3/c12_6ranks_standard/dycore \
67+
--backend=numpy \
68+
--which_modules=FvTp2d \
69+
--threshold_overrides_file=./tests/savepoint/translate/overrides/standard.yaml \
70+
./tests/savepoint
71+
72+
- name: Numpy D_SW
73+
run: |
74+
cd ${GITHUB_WORKSPACE}/pyFV3
75+
coverage run --rcfile=setup.cfg -m pytest \
76+
-v -s --data_path=./test_data/8.1.3/c12_6ranks_standard/dycore \
77+
--backend=numpy \
78+
--which_modules=D_SW \
79+
--threshold_overrides_file=./tests/savepoint/translate/overrides/standard.yaml \
80+
./tests/savepoint
81+
82+
- name: Numpy Remapping
83+
run: |
84+
cd ${GITHUB_WORKSPACE}/pyFV3
85+
coverage run --rcfile=setup.cfg -m pytest \
86+
-v -s --data_path=./test_data/8.1.3/c12_6ranks_standard/dycore \
87+
--backend=numpy \
88+
--which_modules=Remapping \
89+
--threshold_overrides_file=./tests/savepoint/translate/overrides/standard.yaml \
90+
./tests/savepoint
91+
92+
- name: Orchestrated dace-cpu Acoustics
93+
run: |
94+
cd ${GITHUB_WORKSPACE}/pyFV3
95+
export FV3_DACEMODE=BuildAndRun
96+
export PACE_FLOAT_PRECISION=64
97+
export PACE_TEST_N_THRESHOLD_SAMPLES=0
98+
export OMP_NUM_THREADS=1
99+
export PACE_LOGLEVEL=Debug
100+
mpiexec -mca orte_abort_on_non_zero_status 1 -np 6 --oversubscribe coverage run --rcfile=setup.cfg -m mpi4py -m pytest \
101+
-v -s --data_path=./test_data/8.1.3/c12_6ranks_standard/dycore \
102+
--backend=dace:cpu \
103+
-m parallel \
104+
--which_rank=0 \
105+
--which_modules=DynCore \
106+
--threshold_overrides_file=./tests/savepoint/translate/overrides/standard.yaml \
107+
./tests/savepoint

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
requirements = [
1313
"f90nml>=1.1.0",
14-
"numpy",
14+
"numpy==1.26.4",
1515
"xarray",
1616
]
1717

1818
test_requirements = ["pytest", "pytest-subtests", "serialbox", "coverage"]
19-
ndsl_requirements = ["ndsl @ git+https://github.com/NOAA-GFDL/NDSL.git@2024.04.00"]
19+
ndsl_requirements = ["ndsl @ git+https://github.com/NOAA-GFDL/NDSL.git@develop"]
2020
develop_requirements = test_requirements + ndsl_requirements + ["pre-commit"]
2121

2222
extras_requires = {

tests/conftest.py

-34
This file was deleted.

0 commit comments

Comments
 (0)