Python development tools for MODFLOW 6 and related projects.
- a minimal GitHub API client for release info/assets
- a
ZipFilesubclass that preserves file permissions (workaround for Python #15795) - pytest fixtures including "keepable" temporary directories and snapshot testing utilities
- pytest markers to skip test cases conditional on operating system, installed packages, or available executables
- a parser for MODFLOW 6 definition files
- a models API for streamlined access to MODFLOW 6 (and other) models in
Python3.10+, dependency-free by default.
Several optional dependency groups are available, oriented around specific use cases:
dfn: MF6 definition file parsingtest: pytest fixtures/extensionsmodels: example model access
modflow-devtools is available on PyPI and can be installed with pip:
pip install modflow-devtoolsTo install an optional dependency group:
pip install "modflow-devtools[test]"To install from source and set up a development environment please see the developer documentation.
To use the pytest fixtures provided by modflow-devtools, add the following to a test file or conftest.py file:
pytest_plugins = [ "modflow_devtools.fixtures" ]Note: this must be a top-level conftest.py, which nested conftest.py files may then override or extend.
Docs are available at modflow-devtools.readthedocs.io.
For more info on MODFLOW 6 see the USGS overview.


