Python tools for MODFLOW development
Project description
MODFLOW developer tools
Version 0.1.5 — release candidate
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 in the project root:
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.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d852177764f5e0b8de6b3e9b79a4a50236efd714b1bee513a056650953496c0d |
|
MD5 | 23ca6b387cf275d976a2605d762c1b79 |
|
BLAKE2b-256 | 2d36f3ea47617eb3821a9910d8496c4b69d40c666ae177313976a268c74a6fc9 |