Python tools for MODFLOW development
Project description
MODFLOW developer tools
Python tools for MODFLOW development and testing.
Requirements
This project requires Python3.8+. Its only core dependencies are numpy
and pytest
.
Installation
modflow-devtools
is available on PyPI and can be installed with pip:
pip install modflow-devtools
This package pairs well with a few pytest plugins:
pytest-cases
pytest-dotenv
pytest-xdist
These and a few other optional dependencies can be installed with:
pip install "modflow-devtools[test]"
To install from source and set up a development environment please see the developer documentation.
Use cases
This package contains shared tools for developing and testing MODFLOW 6 and FloPy, including standalone utilities as well as pytest
fixtures, CLI options, and test cases:
- utilities for retrieving release information and downloading assets from the GitHub API
- a
ZipFile
subclass that preserves file permissions (workaround for Python #15795) - a
pytest
CLI option for smoke testing (running a fast subset of cases) - a minimal
pytest-cases
framework for reusing test functions and data - a set of keepable
pytest
temporary directory fixtures for each scope - a set of fixtures to parametrize tests with models from external repos
MODFLOW-USGS/modflow6-examples
MODFLOW-USGS/modflow6-testmodels
MODFLOW-USGS/modflow6-largetestmodels
- a set of
pytest
markers to conditionally skip test cases based on- operating system
- Python packages installed
- executables available on the path
Quickstart
To import pytest
fixtures in a project consuming modflow-devtools
, add the following to a conftest.py
file:
pytest_plugins = [ "modflow_devtools.fixtures" ]
Note: pytest
requires this to be a top-level conftest.py
file. Nested conftest.py
files may override or extend this package's fixtures.
Documentation
Usage documentation is available at modflow-devtools.readthedocs.io.
MODFLOW Resources
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for modflow_devtools-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cd59aad0df89e0d16b3adac5eb86d727a30e7856a28544ab1bc0747f001c422 |
|
MD5 | a52de05aad56767f4137e3c887a8101e |
|
BLAKE2b-256 | 1e4f6d639a10b74670428c29fffd3b615b456ad72dc90c2341638e6a56c15f66 |