Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: install mf6 development build for CI tests #1970

Closed
wants to merge 2 commits into from
Closed
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
12 changes: 8 additions & 4 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ jobs:
- name: Install Modflow executables
uses: modflowpy/install-modflow-action@v1

- name: Install Modflow dev build executables
if: github.ref_name != 'master' && !startsWith(github.ref_name, 'v')
uses: modflowpy/install-modflow-action@v1
with:
repo: modflow6-nightly-build

- name: Run benchmarks
if: runner.os != 'Windows'
working-directory: ./autotest
Expand All @@ -88,15 +94,13 @@ jobs:
if: failure()
with:
name: failed-benchmark-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.run_id }}
path: |
./autotest/.failed/**
path: ./autotest/.failed/**

- name: Upload benchmark result artifact
uses: actions/upload-artifact@v3
with:
name: benchmarks-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.run_id }}
path: |
./autotest/.benchmarks/**/*.json
path: ./autotest/.benchmarks/**/*.json

post_benchmark:
needs:
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ jobs:
- name: Install Modflow executables
uses: modflowpy/install-modflow-action@v1

- name: Install Modflow dev build executables
if: github.ref_name != 'master' && !startsWith(github.ref_name, 'v')
uses: modflowpy/install-modflow-action@v1
with:
repo: modflow6-nightly-build

- name: Smoke test
working-directory: autotest
run: pytest -v -n=auto --smoke --cov=flopy --cov-report=xml --durations=0 --keep-failed=.failed
Expand Down Expand Up @@ -209,19 +215,11 @@ jobs:
uses: modflowpy/install-modflow-action@v1

- name: Install Modflow dev build executables
if: github.ref_name != 'master' && !startsWith(github.ref_name, 'v')
uses: modflowpy/install-modflow-action@v1
with:
repo: modflow6-nightly-build

- name: Update FloPy packages
if: runner.os != 'Windows'
run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup

- name: Update FloPy packages
if: runner.os == 'Windows'
shell: bash -l {0}
run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup

- name: Run tests
if: runner.os != 'Windows'
working-directory: ./autotest
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,33 +80,23 @@ jobs:
uses: modflowpy/install-modflow-action@v1

- name: Install Modflow dev build executables
if: github.ref_name != 'master' && !startsWith(github.ref_name, 'v')
uses: modflowpy/install-modflow-action@v1
with:
repo: modflow6-nightly-build

- name: Update FloPy packages
if: runner.os != 'Windows'
run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup

- name: Update FloPy packages
if: runner.os == 'Windows'
shell: bash -l {0}
run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup

- name: Run example tests
if: runner.os != 'Windows'
working-directory: ./autotest
run: |
pytest -v -m="example" -n=auto -s --durations=0 --keep-failed=.failed
run: pytest -v -m="example" -n=auto -s --durations=0 --keep-failed=.failed
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run example tests
if: runner.os == 'Windows'
shell: bash -l {0}
working-directory: ./autotest
run: |
pytest -v -m="example" -n=auto -s --durations=0 --keep-failed=.failed
run: pytest -v -m="example" -n=auto -s --durations=0 --keep-failed=.failed
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -115,5 +105,4 @@ jobs:
if: failure()
with:
name: failed-example-${{ matrix.os }}-${{ matrix.python-version }}
path: |
./autotest/.failed/**
path: ./autotest/.failed/**
1 change: 1 addition & 0 deletions .github/workflows/mf6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
with:
repository: MODFLOW-USGS/modflow6
path: modflow6
ref: ${{ (github.ref_name == 'master' || startsWith(github.ref_name, 'v')) && 'master' || 'develop' }}

- name: Update flopy MODFLOW 6 classes
working-directory: modflow6/autotest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/optional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ jobs:
- name: Install Modflow executables
uses: modflowpy/install-modflow-action@v1

- name: Install Modflow dev build executables
if: github.ref_name != 'master' && !startsWith(github.ref_name, 'v')
uses: modflowpy/install-modflow-action@v1
with:
repo: modflow6-nightly-build

- name: Smoke test (${{ matrix.optdeps }})
working-directory: autotest
run: pytest -v -n=auto --smoke --cov=flopy --cov-report=xml --durations=0 --keep-failed=.failed
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,11 @@ jobs:
uses: modflowpy/install-modflow-action@v1

- name: Install Modflow dev build executables
if: github.ref_name != 'master' && !startsWith(github.ref_name, 'v')
uses: modflowpy/install-modflow-action@v1
with:
repo: modflow6-nightly-build

- name: Update FloPy packages
if: runner.os != 'Windows'
run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup

- name: Update FloPy packages
if: runner.os == 'Windows'
shell: bash -l {0}
run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup

- name: Run regression tests
if: runner.os != 'Windows'
working-directory: ./autotest
Expand All @@ -97,5 +89,4 @@ jobs:
if: failure()
with:
name: failed-regression-${{ matrix.os }}-${{ matrix.python-version }}
path: |
./autotest/.failed/**
path: ./autotest/.failed/**
6 changes: 6 additions & 0 deletions .github/workflows/rtd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ jobs:
- name: Install MODFLOW executables
uses: modflowpy/install-modflow-action@v1

- name: Install Modflow dev build executables
if: github.ref_name != 'master' && !startsWith(github.ref_name, 'v')
uses: modflowpy/install-modflow-action@v1
with:
repo: modflow6-nightly-build

- name: Run tutorial and example notebooks
working-directory: autotest
run: pytest -v -n auto test_notebooks.py
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Before you submit your Pull Request (PR) consider the following guidelines:
git checkout -b my-fix-branch develop
```

**Note**: it's advised not to begin bugfix or feature branch names with the letter "v". This condition is used in Github Actions CI to determine whether a branch is a release candidate. Branches intended for release are tested against the latest official release of MODFLOW 6, while the FloPy `develop` branch tests against the `develop` branch of MODFLOW 6.

4. Create your patch, **including appropriate test cases**. See [DEVELOPER,md](DEVELOPER.md#running-tests) for guidelines for constructing autotests.
5. Run the [isort import sorter](https://github.com/PyCQA/isort) and [black formatter](https://github.com/psf/black). There is a utility script to do this in the `scripts` directory:

Expand Down
2 changes: 1 addition & 1 deletion DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ By default, `pytest-benchmark` will only print profiling results to `stdout`. If

## Branching model

This project follows the [git flow](https://nvie.com/posts/a-successful-git-branching-model/): development occurs on the `develop` branch, while `main` is reserved for the state of the latest release. Development PRs are typically squashed to `develop`, to avoid merge commits. At release time, release branches are merged to `main`, and then `main` is merged back into `develop`.
This project follows the [git flow](https://nvie.com/posts/a-successful-git-branching-model/): development occurs on the `develop` branch, while the mainline is reserved for the state of the latest release. Development PRs are typically squashed to `develop`, to avoid merge commits. At release time, release branches named e.g. `vx.y.z` are merged to main, then main is merged back into `develop`.

## Deprecation policy

Expand Down