Skip to content
Closed
17 changes: 10 additions & 7 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# TODO: Revert tests back to NOAA-GFDL version (not jjuyeonkim) after
# NDSL/issues#64's PRs close and are all merged. These PRs include:
# https://github.com/NOAA-GFDL/NDSL/pull/218
# https://github.com/NOAA-GFDL/PyFV3/pull/83
# https://github.com/NOAA-GFDL/PySHiELD/pull/58
# https://github.com/NOAA-GFDL/pace/pull/145
#
name: "Lint"

# Run these these whenever ...
Expand All @@ -7,6 +14,7 @@ on:
push:
branches:
- main # ... when merging into the main branch
- 20250908_namelist_2

jobs:
lint:
Expand All @@ -15,20 +23,15 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5
with:
repository: jjuyeonkim/pyshield
submodules: 'recursive'
ref: 20250908_namelist_2

- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'

# Only restore (don't save) caches on PRs. New caches created from PRs won't be
# accessible from other PRs, see workflows/create_cache.yaml.
- uses: actions/cache/restore@v4
with:
path: ~/.cache/pre-commit
key: pre-commit_${{ env.pythonLocation }}_${{ hashFiles('.pre-commit-config.yaml') }}

- name: Install pre-commit
run: pip install pre-commit

Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/pace_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# TODO: Revert tests back to NOAA-GFDL version (not jjuyeonkim) after
# NDSL/issues#64's PRs close and are all merged. These PRs include:
# https://github.com/NOAA-GFDL/NDSL/pull/218
# https://github.com/NOAA-GFDL/PyFV3/pull/83
# https://github.com/NOAA-GFDL/PySHiELD/pull/58
# https://github.com/NOAA-GFDL/pace/pull/145
#
name: "pace main tests"

# Run these these whenever ...
Expand All @@ -7,10 +14,11 @@ on:
push:
branches:
- main # ... when merging into the main branch
- 20250908_namelist_2

jobs:
pace_unit_tests:
uses: NOAA-GFDL/pace/.github/workflows/main_unit_tests.yaml@develop
uses: jjuyeonkim/pace/.github/workflows/main_unit_tests.yaml@20250908_namelist_2
with:
component_trigger: true
component_name: pySHiELD
52 changes: 31 additions & 21 deletions .github/workflows/translate.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# TODO: Revert tests back to NOAA-GFDL version (not jjuyeonkim) after
# NDSL/issues#64's PRs close and are all merged. These PRs include:
# https://github.com/NOAA-GFDL/NDSL/pull/218
# https://github.com/NOAA-GFDL/PyFV3/pull/83
# https://github.com/NOAA-GFDL/PySHiELD/pull/58
# https://github.com/NOAA-GFDL/pace/pull/145
#
name: "PySHiELD translate tests"

# Run these these whenever ...
Expand All @@ -17,6 +24,7 @@ on:
push:
branches:
- main # ... when merging into the main branch
- 20250908_namelist_2

# cancel running jobs if theres a newer push
concurrency:
Expand All @@ -34,15 +42,6 @@ jobs:
TEST_DATA_URL: "https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6ranks_baroclinic.physics.tar.gz"

steps:
- name: External trigger Checkout pySHiELD
if: ${{inputs.component_trigger}}
uses: actions/checkout@v5
with:
submodules: 'recursive'
repository: NOAA-GFDL/PySHiELD
path: pySHiELD
ref: develop

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
Expand All @@ -54,36 +53,47 @@ jobs:
- name: Install mpi (MPICH flavor)
run: pip install mpich

- name: External trigger remove existing component in pySHiELD/develop
if: ${{ inputs.component_trigger }}
run: rm -rf ${GITHUB_WORKSPACE}/pySHiELD/${{inputs.component_name}}
- name: Checkout pySHiELD
uses: actions/checkout@v5
with:
submodules: 'recursive'
repository: jjuyeonkim/pyshield
path: pySHiELD
ref: 20250908_namelist_2

- name: Checkout hash that triggered CI
- name: Checkout pyFV3
uses: actions/checkout@v5
with:
submodules: 'recursive'
path: pySHiELD/${{inputs.component_name}}
repository: jjuyeonkim/pyfv3
path: pySHiELD/pyFV3
ref: 20250908_namelist_2

- name: external trigger Install packages for FV3 component
if: ${{contains(inputs.component_name, 'FV3')}}
- name: Install packages for FV3 component
run: |
cd ${GITHUB_WORKSPACE}/pySHiELD
pip3 install --upgrade pip setuptools wheel
cd ${{inputs.component_name}} && pip3 install .[test] && cd ..
cd pyFV3 && pip3 install .[test] && cd ..
pip3 install .[ndsl,test]
pip install numpy==1.26.4

- name: external trigger Install packages for NDSL component
if: ${{contains(inputs.component_name, 'NDSL')}}
- name: Checkout NDSL
uses: actions/checkout@v5
with:
submodules: 'recursive'
repository: jjuyeonkim/ndsl
path: pySHiELD/NDSL
ref: 20250908_namelist_2

- name: Install packages for NDSL component
run: |
cd ${GITHUB_WORKSPACE}/pySHiELD
pip3 install --upgrade pip setuptools wheel
cd ${{inputs.component_name}} && pip3 install .[test] && cd ..
cd NDSL && pip3 install .[test] && cd ..
pip3 install .[pyfv3,test]
pip install numpy==1.26.4

- name: Install pySHiELD packages
if: ${{ !inputs.component_trigger}}
run: |
cd ${GITHUB_WORKSPACE}/pySHiELD
pip install --upgrade pip setuptools wheel
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ extras = [
"pyshield[pyfv3]",
"pyshield[dev]"
]
ndsl = ["ndsl @ git+https://github.com/NOAA-GFDL/NDSL.git@develop"]
pyfv3 = ["pyfv3 @ git+https://github.com/NOAA-GFDL/PyFV3.git@develop"]
# TODO: Revert ndsl, pyfv3 back to GFDL develop (not jjuyeonkim) after merging https://github.com/NOAA-GFDL/NDSL/issues/64
ndsl = ["ndsl @ git+https://github.com/jjuyeonkim/NDSL.git@20250908_namelist_2"]
pyfv3 = ["pyfv3 @ git+https://github.com/jjuyeonkim/PyFV3.git@20250908_namelist_2"]
test = [
"pytest",
"pytest-subtests",
Expand All @@ -49,7 +50,8 @@ test = [
]

[project.urls]
Repository = "https://github.com/NOAA-GFDL/PySHiELD"
# TODO: Revert repo back to GFDL develop (not jjuyeonkim) after merging https://github.com/NOAA-GFDL/NDSL/issues/64
Repository = "https://github.com/jjuyeonkim/PySHiELD"

[tool.aliases]

Expand Down
Loading
Loading