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.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1612b05939d9e53c13f459cb9b4918ee526e66403d1f407ae5d77dcf84b8287f |
|
MD5 | bdabd4f4278d59f613a420029809da02 |
|
BLAKE2b-256 | a6ef541f83dc33da0d45989c95dbef1cb507af13d9d82b0eba895a0e2477c69e |