Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 57 additions & 43 deletions .github/workflows/mf6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,54 +23,65 @@ jobs:

- name: Checkout flopy repo
uses: actions/checkout@v4

- name: Setup Python
uses: astral-sh/setup-uv@v6
with:
cache-dependency-glob: "**/pyproject.toml"

- name: Install FloPy
run: uv sync --all-extras
path: flopy

- name: Install other dependencies from GitHub
run: uv pip install -r etc/requirements.mf6.txt
- name: Checkout MODFLOW 6
uses: actions/checkout@v4
with:
repository: MODFLOW-ORG/modflow6
path: modflow6

- name: Setup GNU Fortran
uses: fortran-lang/setup-fortran@v1
with:
compiler: gcc
version: 13

- name: Checkout MODFLOW 6
uses: actions/checkout@v4
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.8.8
with:
repository: MODFLOW-ORG/modflow6
path: modflow6
pixi-version: v0.41.4
manifest-path: modflow6/pixi.toml

- name: Build and install MF6
- name: Install dependencies
working-directory: modflow6
run: |
uv run meson setup builddir --buildtype=debugoptimized --prefix=$(pwd) --libdir=bin
uv run meson install -C builddir
uv run meson test --verbose --no-rebuild -C builddir
pixi run install
pixi run pip install coverage pytest-cov

- name: Update package classes
working-directory: modflow6/autotest
run: uv run update_flopy.py
- name: Install FloPy
working-directory: flopy
run: |
pixi run --manifest-path=../modflow6/pixi.toml pip install --no-deps -e .
pixi run --manifest-path=../modflow6/pixi.toml python -m flopy.mf6.utils.generate_classes --dfnpath ../modflow6/doc/mf6io/mf6ivar/dfn

- name: Build MF6
working-directory: modflow6
run: |
pixi run meson setup builddir --buildtype=debugoptimized --prefix=$(pwd) --libdir=bin
pixi run meson install -C builddir
pixi run meson test --verbose --no-rebuild -C builddir

- name: Build mf5to6 converter
working-directory: modflow6/utils/mf5to6
run: |
pixi run meson setup builddir --prefix=$(pwd)/../../ --libdir=bin
pixi run meson install -C builddir

- name: Install executables
working-directory: modflow6/autotest
env:
GITHUB_TOKEN: ${{ github.token }}
run: uv run pytest -v --durations=0 get_exes.py
run: pixi run pytest -v --durations=0 get_exes.py

- name: Run tests
working-directory: modflow6/autotest
run: uv run pytest -v --cov=flopy --cov-report=xml --cov-append --durations=0 -n auto -m "not repo and not regression"
run: pixi run pytest -v --cov=flopy --cov-report=xml --cov-append --durations=0 -n auto -m "not repo and not regression"

- name: Print coverage report before upload
working-directory: ./modflow6/autotest
run: uv run coverage report
run: pixi run coverage report

- name: Upload coverage to Codecov
if:
Expand All @@ -86,9 +97,11 @@ jobs:
run:
shell: bash
steps:

- name: Checkout flopy repo
uses: actions/checkout@v4
with:
path: flopy

- name: Checkout MODFLOW 6
uses: actions/checkout@v4
Expand All @@ -102,38 +115,39 @@ jobs:
repository: MODFLOW-ORG/modflow6-examples
path: modflow6-examples

- name: Setup Python
uses: astral-sh/setup-uv@v6
with:
cache-dependency-glob: "**/pyproject.toml"

- name: Install FloPy
run: uv sync --all-extras

- name: Install other dependencies from modflow6-examples and GitHub
run: uv pip install -r etc/requirements.mf6.txt -r modflow6-examples/etc/requirements.pip.txt

- name: Setup GNU Fortran
uses: fortran-lang/setup-fortran@v1
with:
compiler: gcc
version: 13

- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.8.8
with:
pixi-version: v0.41.4
manifest-path: modflow6/pixi.toml

- name: Install dependencies
working-directory: modflow6
run: pixi run install

- name: Install FloPy
working-directory: flopy
run: |
pixi run --manifest-path=../modflow6/pixi.toml pip install --no-deps -e .
pixi run --manifest-path=../modflow6/pixi.toml python -m flopy.mf6.utils.generate_classes --dfnpath ../modflow6/doc/mf6io/mf6ivar/dfn

- name: Install executables
uses: modflowpy/install-modflow-action@v1

- name: Build and install MF6
working-directory: modflow6
run: |
uv run meson setup builddir --buildtype=debugoptimized --prefix=$(pwd) --libdir=bin
uv run meson install -C builddir
uv run meson test --verbose --no-rebuild -C builddir
pixi run meson setup builddir --buildtype=debugoptimized --prefix=$(pwd) --libdir=bin
pixi run meson install -C builddir
pixi run meson test --verbose --no-rebuild -C builddir
cp bin/* ~/.local/bin/modflow/

- name: Update package classes
working-directory: modflow6/autotest
run: uv run update_flopy.py

- name: Test MF6 examples
working-directory: modflow6-examples/autotest
run: uv run pytest -v -n=auto --durations=0 test_scripts.py
run: pixi run --manifest-path=../../modflow6/pixi.toml pytest -v -n=auto --durations=0 test_scripts.py
8 changes: 7 additions & 1 deletion .github/workflows/rtd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,13 @@ jobs:

- name: Run tutorial and example notebooks
working-directory: autotest
run: pytest -v -n auto test_notebooks.py
run: |
filters=""
if [[ ${{ runner.os }} == "Windows" ]]; then
# TODO figure out VTK error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, and 1.00 ES
filters="not vtk_pathlines"
fi
pytest -v -n auto test_notebooks.py -k "$filters"

- name: Upload notebooks artifact for ReadtheDocs
if: |
Expand Down
4 changes: 0 additions & 4 deletions etc/requirements.mf6.txt

This file was deleted.