Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
79dbfdd
ci(release): update to development version 1.7.0.dev0
wpbonelli May 30, 2024
8189dcb
Merge pull request #159 from MODFLOW-USGS/post-release-1.6.0-reset
wpbonelli May 30, 2024
90316a1
fix(fixtures): don't use square brackets in tempdir paths (#160)
wpbonelli Jun 10, 2024
1883647
docs(snapshots): mention binary snapshot portability issues (#161)
wpbonelli Jun 19, 2024
6f84edb
fix(download.py): accommodate missing gh api response item (#162)
wpbonelli Oct 2, 2024
7c5b178
chore: fix typos and add codespell check to CI (#163)
mwtoews Nov 29, 2024
4dd11ea
ci: use macos-13 image instead of macos-12 (#165)
mwtoews Dec 9, 2024
acec996
fix(test_meson_build): use requires_exe instead of requires_pkg (#164)
mwtoews Dec 9, 2024
438847c
refactor: use pathlib and subprocess; refactor other aspects (#166)
mwtoews Dec 9, 2024
05926fd
chore: drop python 3.8, support 3.13 (#168)
mwtoews Dec 10, 2024
910ab4f
feat(dfn): add dfn container, parser, toml conversion script (#167)
wpbonelli Dec 11, 2024
52e846b
refactor(dfn): move to file (#170)
wpbonelli Jan 3, 2025
7112a02
ci: use uv in commit-triggered jobs (#171)
wpbonelli Jan 14, 2025
286a77f
docs(dfn): expand dfn module docs, add to index.rst (#172)
wpbonelli Jan 14, 2025
01b95b0
feat(dfn): toml load support, switch to tomli, add tests (#173)
wpbonelli Jan 14, 2025
5074b21
refactor(dfn): use explicit table names in toml format (#174)
wpbonelli Jan 17, 2025
6957554
refactor(download): remove asset/artifact utilities (#175)
wpbonelli Jan 17, 2025
d9a4212
fix(dfn): include missing attributes (#176)
wpbonelli Jan 25, 2025
ba6fe08
refactor(dfn): minor toml format fixes/improvements
wpbonelli Jan 26, 2025
50cba8b
fix(dfn): mark transient blocks (#178)
wpbonelli Jan 26, 2025
362ecd5
refactor(dfn): use boltons remap, better comments/naming (#179)
wpbonelli Jan 26, 2025
e809295
fix(dfn): rename sub -> ref (#180)
wpbonelli Jan 31, 2025
b15a699
fix(dfn): remove some special handling for subpackages (#181)
wpbonelli Jan 31, 2025
c36f502
fix(dfn): keep block attribute for now (#182)
wpbonelli Feb 3, 2025
d543125
fix(dfn): block attribute first (#183)
wpbonelli Feb 3, 2025
931c497
fix(dfn): rename transient -> transient_block (#184)
wpbonelli Feb 4, 2025
f8b0ce8
chore: add uv lockfile to .gitignore (#185)
wpbonelli Feb 4, 2025
5aad311
ci: update uv usage (#186)
wpbonelli Feb 5, 2025
198b78b
chore: replace setuptools with hatchling (#187)
mwtoews Feb 12, 2025
f8d34f3
docs: remove bad sections from index page (#188)
wpbonelli Feb 18, 2025
835de1c
chore: rename (#189)
wpbonelli Mar 3, 2025
e64ce4c
Models API (#190)
wpbonelli Mar 5, 2025
1d787a4
feat: models api (#191)
wpbonelli Mar 6, 2025
e142df7
feat: model mapping (#192)
wpbonelli Mar 7, 2025
3858230
chore: drop py3.9, touch up readme and dev docs (#196)
wpbonelli Mar 9, 2025
ed9c4e9
chore: use mypy (#194)
wpbonelli Mar 9, 2025
aa45c48
feat(models): support example models (#197)
wpbonelli Mar 11, 2025
6a1eb74
chore: clean up todo
wpbonelli Mar 11, 2025
0ea364b
feat(models): add example scenario mapping (#198)
wpbonelli Mar 11, 2025
af441d1
refactor(models): respect model names/relpaths (#199)
wpbonelli Mar 12, 2025
642c2d1
fix: filelock when fetching zips (#200)
wpbonelli Mar 18, 2025
1ff3c0f
fix(models): include files in nested folders (#201)
wpbonelli Mar 19, 2025
8887835
refactor(models): distinguish source repo via prefix (#202)
wpbonelli Apr 1, 2025
b520bc1
docs(models): add models page to index.rst (#203)
wpbonelli Apr 3, 2025
610b9ea
docs(models): improve docs for models api (#204)
wpbonelli Apr 3, 2025
6534389
fix(models.py): add retries for transient network errors (#205)
wpbonelli Apr 7, 2025
9106727
feat(models): add mf2005 models from modflow6-testmodels repo (#206)
wpbonelli Apr 8, 2025
016190d
refactor(registry): add mf6 prefix to mf6 model names (#207)
wpbonelli Apr 18, 2025
366df8a
feat(misc): add try_get_enum_value function (#208)
wpbonelli Apr 22, 2025
7116292
docs(models): update models api docs (#209)
wpbonelli Apr 22, 2025
2370d59
refactor(models): introduce model registry classes (#210)
wpbonelli May 1, 2025
d532950
docs(models): fix docstring (#211)
wpbonelli May 1, 2025
457ace2
refactor(LocalRegistry): support multiple model directory paths (#212)
wpbonelli May 2, 2025
aa62b34
fix(LocalRegistry): fix string joining in dir not found error case (#…
wpbonelli May 2, 2025
087b063
refactor(LocalRegistry): back to the old indexing pattern (#214)
wpbonelli May 2, 2025
48cbf16
refactor(LocalRegistry): rework index method prefix parameters (#215)
wpbonelli May 3, 2025
777dd3d
docs(readme): fix table of contents (#216)
wpbonelli May 3, 2025
75e6136
docs(models): correct some stale things, misc improvements (#217)
wpbonelli May 3, 2025
9d5b2df
docs(models): improve models docs, rename script param (#218)
wpbonelli May 5, 2025
bf103be
ci: update action versions (#219)
wpbonelli May 12, 2025
134fb4c
feat(misc): add cd alias for set_dir (#221)
wpbonelli May 20, 2025
04ac4fa
refactor(make_registry.py): shortcut to create default registry (#222)
wpbonelli May 20, 2025
d169e61
refactor(dfn): rename var -> field, misc cleanup (#223)
wpbonelli May 29, 2025
9704d96
refactor(dfn): add reader attribute to Field (#224)
wpbonelli Jun 3, 2025
4d1ef32
chore(models): clean up comments/docstrings (#225)
wpbonelli Jun 9, 2025
654de85
ci(release): set version to 1.7.0, update changelog
github-actions[bot] Jun 23, 2025
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
29 changes: 0 additions & 29 deletions .flake8

This file was deleted.

134 changes: 40 additions & 94 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- '**.md'
- '.github/workflows/release.yml'
- '.gitignore'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
Expand All @@ -22,19 +25,26 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
python-version: 3.8
cache: 'pip'
cache-dependency-path: pyproject.toml
cache-dependency-glob: "**/pyproject.toml"

- name: Install Python packages
run: pip install ".[lint]"
- name: Install
run: uv sync --group lint

- name: Lint
run: uvx ruff check

- name: Format
run: uvx ruff format --check

- name: Spelling
run: uvx codespell

- name: Typing
run: uv run mypy modflow_devtools

- name: Run ruff
run: ruff check .

build:
name: Build
runs-on: ubuntu-latest
Expand All @@ -43,25 +53,22 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
python-version: 3.8
cache-dependency-glob: "**/pyproject.toml"

- name: Install Python packages
run: |
pip install --upgrade pip
pip install build twine
pip --verbose install .
- name: Install project
run: uv sync --group build

- name: Print package version
run: python -c "import modflow_devtools; print(modflow_devtools.__version__)"
run: uv run python -c "import modflow_devtools; print(modflow_devtools.__version__)"

- name: Build package
run: python -m build
run: uv build

- name: Check distribution
run: twine check --strict dist/*
run: uvx twine check --strict dist/*

test:
name: Test
Expand All @@ -72,8 +79,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-12, windows-2022 ]
python: [ 3.8, 3.9, "3.10", "3.11", "3.12" ]
os: [ ubuntu-22.04, macos-13, windows-2022 ]
python: [ "3.10", "3.11", "3.12", "3.13" ]
env:
GCC_V: 11
steps:
Expand All @@ -82,101 +89,40 @@ jobs:
uses: actions/checkout@v4
with:
path: modflow-devtools

- name: Checkout modflow6
uses: actions/checkout@v4
with:
repository: MODFLOW-USGS/modflow6
path: modflow6

- name: Checkout modflow6 examples
uses: actions/checkout@v4
with:
repository: MODFLOW-USGS/modflow6-examples
path: modflow6-examples

- name: Checkout modflow6 test models
uses: actions/checkout@v3
with:
repository: MODFLOW-USGS/modflow6-testmodels
path: modflow6-testmodels

- name: Checkout modflow6 large test models
uses: actions/checkout@v3
with:
repository: MODFLOW-USGS/modflow6-largetestmodels
path: modflow6-largetestmodels

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

- name: Install nightly build
uses: modflowpy/install-modflow-action@v1
with:
repo: modflow6-nightly-build

- name: Setup GNU Fortran ${{ env.GCC_V }}
uses: awvwgk/setup-fortran@main
with:
compiler: gcc
version: ${{ env.GCC_V }}

- name: Setup Python
uses: actions/setup-python@v4

- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
cache-dependency-glob: "**/pyproject.toml"
python-version: ${{ matrix.python }}

- name: Install Python packages
- name: Install project
working-directory: modflow-devtools
run: pip install ".[test]"

- name: Cache modflow6 examples
if: matrix.python != 3.8
id: cache-examples
uses: actions/cache@v3
with:
path: modflow6-examples/examples
key: modflow6-examples-${{ hashFiles('modflow6-examples/data/**') }}

- name: Install extra Python packages
if: matrix.python != 3.8
working-directory: modflow6-examples/etc
run: |
pip install -r requirements.pip.txt
pip install -r requirements.usgs.txt

- name: Update FloPy packages
if: matrix.python != 3.8
run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup

- name: Build modflow6 example models
if: matrix.python != 3.8 && steps.cache-examples.outputs.cache-hit != 'true'
working-directory: modflow6-examples/autotest
run: pytest -v -n auto test_scripts.py --init
run: uv sync --all-extras

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

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

rtd:
name: Docs
needs: test
runs-on: ubuntu-22.04
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push'
if: github.repository_owner == 'MODFLOW-ORG' && github.event_name == 'push'
steps:
- name: Trigger RTD
uses: dfm/rtds-action@v1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.x
cache: 'pip'
cache-dependency-path: pyproject.toml

Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
cat HISTORY.md

- name: Upload changelog
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: changelog
path: ${{ steps.update-changelog.outputs.changelog }}
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.x

- name: Install Python dependencies
run: |
Expand All @@ -192,7 +192,7 @@ jobs:
run: twine check --strict dist/*

- name: Upload package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
Expand Down
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,12 @@ app
bin

**.DS_Store
data_backup
data_backup

autotest/temp/

# uv lockfile
uv.lock

# filelock files
**/*.lock
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2
build:
os: "ubuntu-22.04"
os: "ubuntu-24.04"
tools:
python: "3.8"
python: "3.13"
sphinx:
configuration: docs/conf.py
formats:
Expand Down
4 changes: 2 additions & 2 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This document provides guidance to set up a development environment and discusse

## Requirements

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).
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.

## Installation

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

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:
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:

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