Skip to content

Commit 7e90e55

Browse files
authored
Merge pull request #220 from MODFLOW-ORG/v1.7.0
Release 1.7.0
2 parents ffdab49 + 2d54f16 commit 7e90e55

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+43724
-860
lines changed

.flake8

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 40 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
- '**.md'
1414
- '.github/workflows/release.yml'
1515
- '.gitignore'
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
1619
jobs:
1720
lint:
1821
name: Lint
@@ -22,19 +25,26 @@ jobs:
2225
- name: Checkout repo
2326
uses: actions/checkout@v4
2427

25-
- name: Setup Python
26-
uses: actions/setup-python@v4
28+
- name: Setup uv
29+
uses: astral-sh/setup-uv@v5
2730
with:
28-
python-version: 3.8
29-
cache: 'pip'
30-
cache-dependency-path: pyproject.toml
31+
cache-dependency-glob: "**/pyproject.toml"
3132

32-
- name: Install Python packages
33-
run: pip install ".[lint]"
33+
- name: Install
34+
run: uv sync --group lint
35+
36+
- name: Lint
37+
run: uvx ruff check
38+
39+
- name: Format
40+
run: uvx ruff format --check
41+
42+
- name: Spelling
43+
run: uvx codespell
44+
45+
- name: Typing
46+
run: uv run mypy modflow_devtools
3447

35-
- name: Run ruff
36-
run: ruff check .
37-
3848
build:
3949
name: Build
4050
runs-on: ubuntu-latest
@@ -43,25 +53,22 @@ jobs:
4353
- name: Checkout repo
4454
uses: actions/checkout@v3
4555

46-
- name: Setup Python
47-
uses: actions/setup-python@v4
56+
- name: Setup uv
57+
uses: astral-sh/setup-uv@v5
4858
with:
49-
python-version: 3.8
59+
cache-dependency-glob: "**/pyproject.toml"
5060

51-
- name: Install Python packages
52-
run: |
53-
pip install --upgrade pip
54-
pip install build twine
55-
pip --verbose install .
61+
- name: Install project
62+
run: uv sync --group build
5663

5764
- name: Print package version
58-
run: python -c "import modflow_devtools; print(modflow_devtools.__version__)"
65+
run: uv run python -c "import modflow_devtools; print(modflow_devtools.__version__)"
5966

6067
- name: Build package
61-
run: python -m build
68+
run: uv build
6269

6370
- name: Check distribution
64-
run: twine check --strict dist/*
71+
run: uvx twine check --strict dist/*
6572

6673
test:
6774
name: Test
@@ -72,8 +79,8 @@ jobs:
7279
strategy:
7380
fail-fast: false
7481
matrix:
75-
os: [ ubuntu-22.04, macos-12, windows-2022 ]
76-
python: [ 3.8, 3.9, "3.10", "3.11", "3.12" ]
82+
os: [ ubuntu-22.04, macos-13, windows-2022 ]
83+
python: [ "3.10", "3.11", "3.12", "3.13" ]
7784
env:
7885
GCC_V: 11
7986
steps:
@@ -82,101 +89,40 @@ jobs:
8289
uses: actions/checkout@v4
8390
with:
8491
path: modflow-devtools
85-
86-
- name: Checkout modflow6
87-
uses: actions/checkout@v4
88-
with:
89-
repository: MODFLOW-USGS/modflow6
90-
path: modflow6
91-
92-
- name: Checkout modflow6 examples
93-
uses: actions/checkout@v4
94-
with:
95-
repository: MODFLOW-USGS/modflow6-examples
96-
path: modflow6-examples
97-
98-
- name: Checkout modflow6 test models
99-
uses: actions/checkout@v3
100-
with:
101-
repository: MODFLOW-USGS/modflow6-testmodels
102-
path: modflow6-testmodels
103-
104-
- name: Checkout modflow6 large test models
105-
uses: actions/checkout@v3
106-
with:
107-
repository: MODFLOW-USGS/modflow6-largetestmodels
108-
path: modflow6-largetestmodels
109-
110-
- name: Install executables
111-
uses: modflowpy/install-modflow-action@v1
112-
113-
- name: Install nightly build
114-
uses: modflowpy/install-modflow-action@v1
115-
with:
116-
repo: modflow6-nightly-build
117-
118-
- name: Setup GNU Fortran ${{ env.GCC_V }}
119-
uses: awvwgk/setup-fortran@main
120-
with:
121-
compiler: gcc
122-
version: ${{ env.GCC_V }}
123-
124-
- name: Setup Python
125-
uses: actions/setup-python@v4
92+
93+
- name: Setup uv
94+
uses: astral-sh/setup-uv@v5
12695
with:
96+
cache-dependency-glob: "**/pyproject.toml"
12797
python-version: ${{ matrix.python }}
12898

129-
- name: Install Python packages
99+
- name: Install project
130100
working-directory: modflow-devtools
131-
run: pip install ".[test]"
132-
133-
- name: Cache modflow6 examples
134-
if: matrix.python != 3.8
135-
id: cache-examples
136-
uses: actions/cache@v3
137-
with:
138-
path: modflow6-examples/examples
139-
key: modflow6-examples-${{ hashFiles('modflow6-examples/data/**') }}
140-
141-
- name: Install extra Python packages
142-
if: matrix.python != 3.8
143-
working-directory: modflow6-examples/etc
144-
run: |
145-
pip install -r requirements.pip.txt
146-
pip install -r requirements.usgs.txt
147-
148-
- name: Update FloPy packages
149-
if: matrix.python != 3.8
150-
run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup
151-
152-
- name: Build modflow6 example models
153-
if: matrix.python != 3.8 && steps.cache-examples.outputs.cache-hit != 'true'
154-
working-directory: modflow6-examples/autotest
155-
run: pytest -v -n auto test_scripts.py --init
101+
run: uv sync --all-extras
156102

157103
- name: Run local tests
158104
working-directory: modflow-devtools/autotest
159105
env:
160106
REPOS_PATH: ${{ github.workspace }}
161107
# use --dist loadfile to so tests requiring pytest-virtualenv run on the same worker
162-
run: pytest -v -n auto --dist loadfile --durations 0 --ignore test_download.py
108+
run: uv run pytest -v -n auto --dist loadfile --durations 0 --ignore test_download.py
163109

164110
- name: Run network-dependent tests
165111
# only invoke the GH API on one OS and Python version
166112
# to avoid rate limits (1000 rqs / hour / repository)
167113
# https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits
168-
if: runner.os == 'Linux' && matrix.python == '3.8'
114+
if: runner.os == 'Linux' && matrix.python == '3.10'
169115
working-directory: modflow-devtools/autotest
170116
env:
171117
REPOS_PATH: ${{ github.workspace }}
172118
GITHUB_TOKEN: ${{ github.token }}
173-
run: pytest -v -n auto --durations 0 test_download.py
119+
run: uv run pytest -v -n auto --durations 0 test_download.py
174120

175121
rtd:
176122
name: Docs
177123
needs: test
178124
runs-on: ubuntu-22.04
179-
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push'
125+
if: github.repository_owner == 'MODFLOW-ORG' && github.event_name == 'push'
180126
steps:
181127
- name: Trigger RTD
182128
uses: dfm/rtds-action@v1

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Setup Python
2929
uses: actions/setup-python@v4
3030
with:
31-
python-version: 3.8
31+
python-version: 3.x
3232
cache: 'pip'
3333
cache-dependency-path: pyproject.toml
3434

@@ -85,7 +85,7 @@ jobs:
8585
cat HISTORY.md
8686
8787
- name: Upload changelog
88-
uses: actions/upload-artifact@v3
88+
uses: actions/upload-artifact@v4
8989
with:
9090
name: changelog
9191
path: ${{ steps.update-changelog.outputs.changelog }}
@@ -177,7 +177,7 @@ jobs:
177177
- name: Setup Python
178178
uses: actions/setup-python@v4
179179
with:
180-
python-version: 3.8
180+
python-version: 3.x
181181

182182
- name: Install Python dependencies
183183
run: |
@@ -192,7 +192,7 @@ jobs:
192192
run: twine check --strict dist/*
193193

194194
- name: Upload package
195-
uses: actions/upload-artifact@v3
195+
uses: actions/upload-artifact@v4
196196
with:
197197
name: dist
198198
path: dist

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,12 @@ app
143143
bin
144144

145145
**.DS_Store
146-
data_backup
146+
data_backup
147+
148+
autotest/temp/
149+
150+
# uv lockfile
151+
uv.lock
152+
153+
# filelock files
154+
**/*.lock

.readthedocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: 2
22
build:
3-
os: "ubuntu-22.04"
3+
os: "ubuntu-24.04"
44
tools:
5-
python: "3.8"
5+
python: "3.13"
66
sphinx:
77
configuration: docs/conf.py
88
formats:

DEVELOPER.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This document provides guidance to set up a development environment and discusse
1919

2020
## Requirements
2121

22-
Python3.8+ is currently required. This project supports several recent versions of Python, loosely following [NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html#implementation) and aiming to stay synchronized with [FloPy](https://github.com/modflowpy/flopy).
22+
Python3.10+ is currently required. This project has historically aimed to support several recent versions of Python, loosely following [NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html#implementation). In current and future development this window may narrow to follow [SPEC 0](https://scientific-python.org/specs/spec-0000/#support-window) instead.
2323

2424
## Installation
2525

@@ -74,7 +74,7 @@ The `modflow-devtools` release procedure is automated with GitHub Actions in [`.
7474
2. Reinitialize the `develop` branch
7575
3. Publish the package to PyPI
7676

77-
To begin an automated release, create a release branch from `develop`. The release branch name should be the version number of with a `v`a prefix (e.g., `v0.0.6`). Pushing the release branch to the `MODFLOW-USGS/modflow-devtools` repository will trigger the release workflow, which begins with the following steps:
77+
To begin an automated release, create a release branch from `develop`. The release branch name should be the version number of with a `v`a prefix (e.g., `v0.0.6`). Pushing the release branch to the `MODFLOW-ORG/modflow-devtools` repository will trigger the release workflow, which begins with the following steps:
7878

7979
- update version strings to match the version number in the release branch name
8080
- generate a changelog since the last release and update `HISTORY.md`

0 commit comments

Comments
 (0)