Skip to content

Commit

Permalink
Merge pull request #50 from NOAA-GFDL/develop
Browse files Browse the repository at this point in the history
For release 2024.09.00
  • Loading branch information
fmalatino authored Sep 30, 2024
2 parents bf23761 + a667d29 commit bf6e3d3
Show file tree
Hide file tree
Showing 37 changed files with 3,738 additions and 332 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/fv3_translate_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "FV3 translate tests"
on:
pull_request:

jobs:
fv3_translate_tests:
uses: NOAA-GFDL/pyFV3/.github/workflows/translate.yaml@develop
with:
component_trigger: true
component_name: NDSL
8 changes: 6 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: "Lint"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

# cancel running jobs if theres a newer push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
Expand All @@ -14,7 +18,7 @@ jobs:
- name: Step Python
uses: actions/[email protected]
with:
python-version: '3.8.12'
python-version: '3.11.7'
- name: Install OpenMPI for gt4py
run: |
sudo apt-get install libopenmpi-dev
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/pace_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "pace main tests"
on:
pull_request:

jobs:
pace_main_tests:
uses: NOAA-GFDL/pace/.github/workflows/main_unit_tests.yaml@develop
with:
component_trigger: true
component_name: NDSL
10 changes: 10 additions & 0 deletions .github/workflows/shield_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "SHiELD Translate tests"
on:
pull_request:

jobs:
shield_translate_tests:
uses: NOAA-GFDL/pySHiELD/.github/workflows/translate.yaml@develop
with:
component_trigger: true
component_name: NDSL
43 changes: 24 additions & 19 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
name: "Unit tests"
name: "NDSL unit tests"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

# cancel running jobs if theres a newer push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
all:
ndsl_unit_tests:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.8.12, 3.11.7]
container:
image: ghcr.io/noaa-gfdl/miniforge:mpich
steps:

- name: Checkout repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python }}
- name: Install OpenMPI & Boost for gt4py
run: |
sudo apt-get install libopenmpi-dev libboost1.74-dev

- name: Install Python packages
run: pip3 install .[test]

- name: prepare input eta files
run: |
python -m pip install --upgrade pip setuptools wheel
pip install .[test]
python tests/grid/generate_eta_files.py
- name: Run serial-cpu tests
run: |
pytest -x tests
run: coverage run --rcfile=setup.cfg -m pytest -x tests

- name: Run parallel-cpu tests
run: mpiexec -np 6 --oversubscribe coverage run --rcfile=setup.cfg -m mpi4py -m pytest -x tests/mpi

- name: Output code coverage
run: |
mpirun -np 6 --oversubscribe pytest -x tests/mpi
coverage combine
coverage report
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ repos:
args: ["--profile", "black"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
rev: v1.4.1
hooks:
- id: mypy
name: mypy-ndsl
args: [--config-file, setup.cfg]
additional_dependencies: [types-PyYAML]
files: ndsl
exclude: |
(?x)^(
Expand Down
Loading

0 comments on commit bf6e3d3

Please sign in to comment.