Skip to content

Commit

Permalink
[telemac] added telemac support
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsail committed Mar 20, 2024
1 parent 9cfd3bb commit 7ca8a99
Show file tree
Hide file tree
Showing 35 changed files with 17,760 additions and 6 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/conda_pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ jobs:
SCHISM_ENV: "SCHISM_ENV"
DELFT3D_ENV: "DELFT3D_ENV"
PYPOSEIDON_ENV: "PYPOSEIDON_ENV"
PYPOS_TEL_ENV: "PYPOS_TEL_ENV"
#
SCHISM_LOCK: locks/conda-${{ matrix.os }}-schism_${{ matrix.mpi }}.lock
DELFT3D_LOCK: locks/conda-${{ matrix.os }}-delft3d_${{ matrix.mpi }}.lock
PYPOSEIDON_LOCK: locks/conda-${{ matrix.os }}-binary-p${{ matrix.python }}.lock
PYPOS_TEL_LOCK: locks/conda-${{ matrix.os }}-binary-p${{ matrix.python }}_tel.lock
REQUIREMENTS_CI: locks/requirements-ci.txt
REQUIREMENTS_VIZ: locks/requirements-viz.txt

Expand Down Expand Up @@ -96,6 +98,7 @@ jobs:
channel_priority: strict
channels:
- gbrey
- tomsail
- conda-forge
EOF
- run: cat ~/.condarc
Expand Down Expand Up @@ -128,6 +131,16 @@ jobs:
${{ matrix.os }}-${{ matrix.python }}-${{ env.PYPOSEIDON_ENV }}-${{ hashFiles( env.PYPOSEIDON_LOCK )}}
${{ matrix.os }}-${{ matrix.python }}-${{ env.PYPOSEIDON_ENV }}-
- name: "Cache ${{ env.PYPOS_TEL_ENV }}"
uses: actions/cache@v3
id: cache-PYPOS_TEL_ENV
with:
path: ~/micromamba/envs/${{ env.PYPOS_TEL_ENV }}
key: ${{ matrix.os }}-${{ matrix.python }}-${{ env.PYPOS_TEL_ENV }}-${{ hashFiles( env.PYPOS_TEL_LOCK )}}-${{ hashFiles( env.REQUIREMENTS_CI )}}
restore-keys: |
${{ matrix.os }}-${{ matrix.python }}-${{ env.PYPOS_TEL_ENV }}-${{ hashFiles( env.PYPOS_TEL_LOCK )}}
${{ matrix.os }}-${{ matrix.python }}-${{ env.PYPOS_TEL_ENV }}-
- name: Cache tests/data/
uses: actions/cache@v3
env:
Expand All @@ -149,6 +162,10 @@ jobs:
if: steps.cache-PYPOSEIDON_ENV.outputs.cache-hit != 'true'
run: micromamba create --yes --name ${PYPOSEIDON_ENV} -f ${PYPOSEIDON_LOCK}

- name: "Create ${{ env.PYPOS_TEL_ENV }}"
if: steps.cache-PYPOS_TEL_ENV.outputs.cache-hit != 'true'
run: micromamba create --yes --name ${PYPOS_TEL_ENV} -f ${PYPOS_TEL_LOCK}

- name: "Install python dependencies"
run: |
eval "$(micromamba shell hook)"
Expand All @@ -157,6 +174,15 @@ jobs:
python -mpip install -r "${REQUIREMENTS_CI}"
python -mpip install ./
- name: "Install python dependencies for pyposeidon + telemac"
run: |
eval "$(micromamba shell hook)"
micromamba activate --stack "${PYPOS_TEL_ENV}"
python -mpip install -U pip
python -mpip install -r "${REQUIREMENTS_CI}"
python -mpip install ./
python -mpip install mpi4py
- name: "Run tests: Basic"
run: |
eval "$(micromamba shell hook)"
Expand Down Expand Up @@ -188,3 +214,9 @@ jobs:
micromamba activate --stack "${DELFT3D_ENV}"
micromamba activate --stack "${PYPOSEIDON_ENV}"
make test_delft
- name: "Run tests: TELEMAC"
run: |
eval "$(micromamba shell hook)"
micromamba activate "${PYPOS_TEL_ENV}"
make test_telemac
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ init:
poetry install -E viz --with dev --with docs --with test

test:
pytest -vl --durations=10 -m 'not (schism or delft or viz or slow)' -n auto
pytest -vl --durations=10 -m 'not (schism or delft or telemac or viz or slow)' -n auto

test_fail:
pytest -vl --lf --runschism --rundelft --runviz
pytest -vl --lf --runschism --rundelft --runtelemac --runviz

test_viz:
pytest -vl --durations=10 --runviz -m viz
Expand All @@ -20,8 +20,11 @@ test_schism:
test_delft:
pytest -vl --durations=10 --rundelft -m delft

test_telemac:
pytest -vl --durations=10 --runtelemac -m telemac

test_full:
pytest -vl --durations=20 --runschism --rundelft --runviz
pytest -vl --durations=20 --runschism --rundelft --runtelemac --runviz

conda_lock:
./scripts/generate_envs.sh
Expand Down
Loading

0 comments on commit 7ca8a99

Please sign in to comment.