diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e72415c424..ce8e33d9ec 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -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 @@ -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: diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index 5e5163f5ce..02f0c7eb99 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -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 @@ -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 diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index fe9b014b3b..a3686ed60f 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -80,24 +80,15 @@ 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 }} @@ -105,8 +96,7 @@ jobs: 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 }} @@ -115,5 +105,4 @@ jobs: if: failure() with: name: failed-example-${{ matrix.os }}-${{ matrix.python-version }} - path: | - ./autotest/.failed/** + path: ./autotest/.failed/** diff --git a/.github/workflows/mf6.yml b/.github/workflows/mf6.yml index e1709ba687..3eab2855a5 100644 --- a/.github/workflows/mf6.yml +++ b/.github/workflows/mf6.yml @@ -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 diff --git a/.github/workflows/optional.yml b/.github/workflows/optional.yml index ee29136542..6ed95cb57c 100644 --- a/.github/workflows/optional.yml +++ b/.github/workflows/optional.yml @@ -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 diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 972f1e1650..011c0d8ace 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -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 @@ -97,5 +89,4 @@ jobs: if: failure() with: name: failed-regression-${{ matrix.os }}-${{ matrix.python-version }} - path: | - ./autotest/.failed/** + path: ./autotest/.failed/** diff --git a/.github/workflows/rtd.yml b/.github/workflows/rtd.yml index b092e4b16e..77e4de483c 100644 --- a/.github/workflows/rtd.yml +++ b/.github/workflows/rtd.yml @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a604641b65..477568e234 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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: diff --git a/DEVELOPER.md b/DEVELOPER.md index cda40aa717..0d00429af3 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -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