modflow-devtools 1.6.0__tar.gz → 1.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- modflow_devtools-1.7.0/.gitignore +154 -0
- modflow_devtools-1.7.0/PKG-INFO +167 -0
- {modflow_devtools-1.6.0 → modflow_devtools-1.7.0}/README.md +22 -31
- {modflow_devtools-1.6.0 → modflow_devtools-1.7.0}/modflow_devtools/__init__.py +2 -2
- modflow_devtools-1.7.0/modflow_devtools/build.py +38 -0
- modflow_devtools-1.7.0/modflow_devtools/dfn.py +660 -0
- modflow_devtools-1.7.0/modflow_devtools/dfn2toml.py +46 -0
- {modflow_devtools-1.6.0 → modflow_devtools-1.7.0}/modflow_devtools/download.py +13 -226
- {modflow_devtools-1.6.0 → modflow_devtools-1.7.0}/modflow_devtools/fixtures.py +38 -16
- {modflow_devtools-1.6.0 → modflow_devtools-1.7.0}/modflow_devtools/imports.py +3 -0
- {modflow_devtools-1.6.0 → modflow_devtools-1.7.0}/modflow_devtools/latex.py +8 -9
- modflow_devtools-1.7.0/modflow_devtools/make_registry.py +89 -0
- {modflow_devtools-1.6.0 → modflow_devtools-1.7.0}/modflow_devtools/markers.py +4 -5
- {modflow_devtools-1.6.0 → modflow_devtools-1.7.0}/modflow_devtools/misc.py +66 -60
- modflow_devtools-1.7.0/modflow_devtools/models.py +522 -0
- {modflow_devtools-1.6.0 → modflow_devtools-1.7.0}/modflow_devtools/ostags.py +1 -2
- modflow_devtools-1.7.0/modflow_devtools/registry/examples.toml +382 -0
- modflow_devtools-1.7.0/modflow_devtools/registry/models.toml +9485 -0
- modflow_devtools-1.7.0/modflow_devtools/registry/registry.toml +31890 -0
- {modflow_devtools-1.6.0 → modflow_devtools-1.7.0}/modflow_devtools/snapshots.py +2 -2
- modflow_devtools-1.7.0/pyproject.toml +190 -0
- modflow_devtools-1.6.0/MANIFEST.in +0 -5
- modflow_devtools-1.6.0/PKG-INFO +0 -136
- modflow_devtools-1.6.0/modflow_devtools/build.py +0 -31
- modflow_devtools-1.6.0/modflow_devtools.egg-info/PKG-INFO +0 -136
- modflow_devtools-1.6.0/modflow_devtools.egg-info/SOURCES.txt +0 -23
- modflow_devtools-1.6.0/modflow_devtools.egg-info/dependency_links.txt +0 -1
- modflow_devtools-1.6.0/modflow_devtools.egg-info/not-zip-safe +0 -1
- modflow_devtools-1.6.0/modflow_devtools.egg-info/requires.txt +0 -24
- modflow_devtools-1.6.0/modflow_devtools.egg-info/top_level.txt +0 -1
- modflow_devtools-1.6.0/pyproject.toml +0 -102
- modflow_devtools-1.6.0/setup.cfg +0 -4
- modflow_devtools-1.6.0/setup.py +0 -3
- modflow_devtools-1.6.0/version.txt +0 -1
- {modflow_devtools-1.6.0 → modflow_devtools-1.7.0}/LICENSE.md +0 -0
- {modflow_devtools-1.6.0 → modflow_devtools-1.7.0}/modflow_devtools/zip.py +0 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
95
|
+
__pypackages__/
|
|
96
|
+
|
|
97
|
+
# Celery stuff
|
|
98
|
+
celerybeat-schedule
|
|
99
|
+
celerybeat.pid
|
|
100
|
+
|
|
101
|
+
# SageMath parsed files
|
|
102
|
+
*.sage.py
|
|
103
|
+
|
|
104
|
+
# Environments
|
|
105
|
+
.env
|
|
106
|
+
.venv
|
|
107
|
+
env/
|
|
108
|
+
venv/
|
|
109
|
+
ENV/
|
|
110
|
+
env.bak/
|
|
111
|
+
venv.bak/
|
|
112
|
+
|
|
113
|
+
# Spyder project settings
|
|
114
|
+
.spyderproject
|
|
115
|
+
.spyproject
|
|
116
|
+
|
|
117
|
+
# Rope project settings
|
|
118
|
+
.ropeproject
|
|
119
|
+
|
|
120
|
+
# mkdocs documentation
|
|
121
|
+
/site
|
|
122
|
+
|
|
123
|
+
# mypy
|
|
124
|
+
.mypy_cache/
|
|
125
|
+
.dmypy.json
|
|
126
|
+
dmypy.json
|
|
127
|
+
|
|
128
|
+
# Pyre type checker
|
|
129
|
+
.pyre/
|
|
130
|
+
|
|
131
|
+
# IDEs
|
|
132
|
+
.idea/
|
|
133
|
+
.vscode/
|
|
134
|
+
|
|
135
|
+
# downloaded exe
|
|
136
|
+
modflow_devtools/bin/
|
|
137
|
+
modflow_devtools/utilities/temp/
|
|
138
|
+
|
|
139
|
+
# git-cliff-action likes to add app/ folder to the project root
|
|
140
|
+
app
|
|
141
|
+
|
|
142
|
+
# in case developer installs modflow executables in the project root
|
|
143
|
+
bin
|
|
144
|
+
|
|
145
|
+
**.DS_Store
|
|
146
|
+
data_backup
|
|
147
|
+
|
|
148
|
+
autotest/temp/
|
|
149
|
+
|
|
150
|
+
# uv lockfile
|
|
151
|
+
uv.lock
|
|
152
|
+
|
|
153
|
+
# filelock files
|
|
154
|
+
**/*.lock
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: modflow-devtools
|
|
3
|
+
Version: 1.7.0
|
|
4
|
+
Summary: Python tools for MODFLOW development
|
|
5
|
+
Project-URL: Documentation, https://modflow-devtools.readthedocs.io/en/latest/
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/MODFLOW-ORG/modflow-devtools/issues
|
|
7
|
+
Project-URL: Source Code, https://github.com/MODFLOW-ORG/modflow-devtools
|
|
8
|
+
Author-email: "Joseph D. Hughes" <modflow@usgs.gov>, Michael Reno <mreno@ucar.edu>, Mike Taves <mwtoews@gmail.com>, Wes Bonelli <wbonelli@ucar.edu>
|
|
9
|
+
Maintainer-email: "Joseph D. Hughes" <modflow@usgs.gov>
|
|
10
|
+
License: CC0
|
|
11
|
+
License-File: LICENSE.md
|
|
12
|
+
Keywords: MODFLOW,development,groundwater,hydrogeology,utilities
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Hydrology
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Provides-Extra: build
|
|
25
|
+
Requires-Dist: build; extra == 'build'
|
|
26
|
+
Requires-Dist: twine; extra == 'build'
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: boltons; extra == 'dev'
|
|
29
|
+
Requires-Dist: codespell[toml]; extra == 'dev'
|
|
30
|
+
Requires-Dist: coverage; extra == 'dev'
|
|
31
|
+
Requires-Dist: filelock; extra == 'dev'
|
|
32
|
+
Requires-Dist: flaky; extra == 'dev'
|
|
33
|
+
Requires-Dist: meson!=0.63.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: mypy; extra == 'dev'
|
|
35
|
+
Requires-Dist: myst-parser; extra == 'dev'
|
|
36
|
+
Requires-Dist: ninja; extra == 'dev'
|
|
37
|
+
Requires-Dist: numpy; extra == 'dev'
|
|
38
|
+
Requires-Dist: pandas; extra == 'dev'
|
|
39
|
+
Requires-Dist: pooch; extra == 'dev'
|
|
40
|
+
Requires-Dist: pytest!=8.1.0; extra == 'dev'
|
|
41
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
42
|
+
Requires-Dist: pytest-dotenv; extra == 'dev'
|
|
43
|
+
Requires-Dist: pytest-xdist; extra == 'dev'
|
|
44
|
+
Requires-Dist: pyyaml; extra == 'dev'
|
|
45
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
46
|
+
Requires-Dist: sphinx; extra == 'dev'
|
|
47
|
+
Requires-Dist: sphinx-rtd-theme; extra == 'dev'
|
|
48
|
+
Requires-Dist: syrupy; extra == 'dev'
|
|
49
|
+
Requires-Dist: tomli; extra == 'dev'
|
|
50
|
+
Requires-Dist: tomli-w; extra == 'dev'
|
|
51
|
+
Provides-Extra: dfn
|
|
52
|
+
Requires-Dist: boltons; extra == 'dfn'
|
|
53
|
+
Requires-Dist: tomli; extra == 'dfn'
|
|
54
|
+
Requires-Dist: tomli-w; extra == 'dfn'
|
|
55
|
+
Provides-Extra: docs
|
|
56
|
+
Requires-Dist: myst-parser; extra == 'docs'
|
|
57
|
+
Requires-Dist: sphinx; extra == 'docs'
|
|
58
|
+
Requires-Dist: sphinx-rtd-theme; extra == 'docs'
|
|
59
|
+
Provides-Extra: lint
|
|
60
|
+
Requires-Dist: codespell[toml]; extra == 'lint'
|
|
61
|
+
Requires-Dist: mypy; extra == 'lint'
|
|
62
|
+
Requires-Dist: ruff; extra == 'lint'
|
|
63
|
+
Provides-Extra: models
|
|
64
|
+
Requires-Dist: boltons; extra == 'models'
|
|
65
|
+
Requires-Dist: filelock; extra == 'models'
|
|
66
|
+
Requires-Dist: pooch; extra == 'models'
|
|
67
|
+
Requires-Dist: tomli; extra == 'models'
|
|
68
|
+
Requires-Dist: tomli-w; extra == 'models'
|
|
69
|
+
Provides-Extra: test
|
|
70
|
+
Requires-Dist: codespell[toml]; extra == 'test'
|
|
71
|
+
Requires-Dist: coverage; extra == 'test'
|
|
72
|
+
Requires-Dist: filelock; extra == 'test'
|
|
73
|
+
Requires-Dist: flaky; extra == 'test'
|
|
74
|
+
Requires-Dist: meson!=0.63.0; extra == 'test'
|
|
75
|
+
Requires-Dist: mypy; extra == 'test'
|
|
76
|
+
Requires-Dist: ninja; extra == 'test'
|
|
77
|
+
Requires-Dist: numpy; extra == 'test'
|
|
78
|
+
Requires-Dist: pandas; extra == 'test'
|
|
79
|
+
Requires-Dist: pytest!=8.1.0; extra == 'test'
|
|
80
|
+
Requires-Dist: pytest-cov; extra == 'test'
|
|
81
|
+
Requires-Dist: pytest-dotenv; extra == 'test'
|
|
82
|
+
Requires-Dist: pytest-xdist; extra == 'test'
|
|
83
|
+
Requires-Dist: pyyaml; extra == 'test'
|
|
84
|
+
Requires-Dist: ruff; extra == 'test'
|
|
85
|
+
Requires-Dist: syrupy; extra == 'test'
|
|
86
|
+
Description-Content-Type: text/markdown
|
|
87
|
+
|
|
88
|
+
# MODFLOW developer tools
|
|
89
|
+
|
|
90
|
+
[](https://github.com/MODFLOW-ORG/modflow-devtools/actions/workflows/ci.yml)
|
|
91
|
+
[](https://modflow-devtools.readthedocs.io/en/latest/?badge=latest)
|
|
92
|
+
[](https://img.shields.io/github/contributors/MODFLOW-ORG/modflow-devtools)
|
|
93
|
+
[](https://github.com/MODFLOW-ORG/modflow-devtools/tags/latest)
|
|
94
|
+
|
|
95
|
+
[](https://pypi.python.org/pypi/modflow-devtools)
|
|
96
|
+
[](https://pypi.python.org/pypi/modflow-devtools)
|
|
97
|
+
[](https://pypi.python.org/pypi/modflow-devtools)
|
|
98
|
+
[](https://pypi.python.org/pypi/modflow-devtools)
|
|
99
|
+
[](https://pypi.python.org/pypi/modflow-devtools)
|
|
100
|
+
|
|
101
|
+
[](https://anaconda.org/conda-forge/modflow-devtools/badges/license.svg)
|
|
102
|
+
[](https://anaconda.org/conda-forge/modflow-devtools)
|
|
103
|
+
[](https://anaconda.org/conda-forge/modflow-devtools)
|
|
104
|
+
|
|
105
|
+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
|
106
|
+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
107
|
+
|
|
108
|
+
Python development tools for MODFLOW 6 and related projects.
|
|
109
|
+
|
|
110
|
+
- [Features](#features)
|
|
111
|
+
- [Requirements](#requirements)
|
|
112
|
+
- [Installation](#installation)
|
|
113
|
+
- [Documentation](#documentation)
|
|
114
|
+
|
|
115
|
+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
116
|
+
|
|
117
|
+
## Features
|
|
118
|
+
|
|
119
|
+
* a minimal GitHub API client for release info/assets
|
|
120
|
+
* a `ZipFile` subclass that [preserves file permissions](https://stackoverflow.com/questions/39296101/python-zipfile-removes-execute-permissions-from-binaries) (workaround for [Python #15795](https://bugs.python.org/issue15795))
|
|
121
|
+
* pytest fixtures including "keepable" temporary directories and snapshot testing utilities
|
|
122
|
+
* pytest markers to skip test cases conditional on operating system, installed packages, or available executables
|
|
123
|
+
* a parser for MODFLOW 6 [definition files](https://modflow6.readthedocs.io/en/stable/_dev/dfn.html)
|
|
124
|
+
* a models API for streamlined access to MODFLOW 6 (and other) models in
|
|
125
|
+
- [`MODFLOW-ORG/modflow6-examples`](https://github.com/MODFLOW-ORG/modflow6-examples)
|
|
126
|
+
- [`MODFLOW-ORG/modflow6-testmodels`](https://github.com/MODFLOW-ORG/modflow6-testmodels)
|
|
127
|
+
- [`MODFLOW-ORG/modflow6-largetestmodels`](https://github.com/MODFLOW-ORG/modflow6-largetestmodels)
|
|
128
|
+
|
|
129
|
+
## Requirements
|
|
130
|
+
|
|
131
|
+
Python3.10+, dependency-free by default.
|
|
132
|
+
|
|
133
|
+
Several optional dependency groups are available, oriented around specific use cases:
|
|
134
|
+
|
|
135
|
+
- `dfn`: MF6 definition file parsing
|
|
136
|
+
- `test`: pytest fixtures/extensions
|
|
137
|
+
- `models`: example model access
|
|
138
|
+
|
|
139
|
+
## Installation
|
|
140
|
+
|
|
141
|
+
`modflow-devtools` is available on PyPI and can be installed with pip:
|
|
142
|
+
|
|
143
|
+
```shell
|
|
144
|
+
pip install modflow-devtools
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
To install an optional dependency group:
|
|
148
|
+
|
|
149
|
+
```shell
|
|
150
|
+
pip install "modflow-devtools[test]"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
To install from source and set up a development environment please see the [developer documentation](DEVELOPER.md).
|
|
154
|
+
|
|
155
|
+
To use the `pytest` fixtures provided by `modflow-devtools`, add the following to a test file or `conftest.py` file:
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
pytest_plugins = [ "modflow_devtools.fixtures" ]
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Note**: this must be a top-level `conftest.py`, which nested `conftest.py` files may then override or extend.
|
|
162
|
+
|
|
163
|
+
## Documentation
|
|
164
|
+
|
|
165
|
+
Docs are available at [modflow-devtools.readthedocs.io](https://modflow-devtools.readthedocs.io/en/latest/).
|
|
166
|
+
|
|
167
|
+
For more info on MODFLOW 6 see [the USGS overview](https://water.usgs.gov/ogw/modflow/).
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# MODFLOW developer tools
|
|
2
2
|
|
|
3
|
-
[](https://github.com/MODFLOW-ORG/modflow-devtools/actions/workflows/ci.yml)
|
|
4
4
|
[](https://modflow-devtools.readthedocs.io/en/latest/?badge=latest)
|
|
5
|
-
[](https://img.shields.io/github/contributors/MODFLOW-ORG/modflow-devtools)
|
|
6
|
+
[](https://github.com/MODFLOW-ORG/modflow-devtools/tags/latest)
|
|
7
7
|
|
|
8
8
|
[](https://pypi.python.org/pypi/modflow-devtools)
|
|
9
9
|
[](https://pypi.python.org/pypi/modflow-devtools)
|
|
@@ -18,45 +18,36 @@
|
|
|
18
18
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
|
19
19
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
20
20
|
|
|
21
|
-
Python development tools for MODFLOW 6.
|
|
21
|
+
Python development tools for MODFLOW 6 and related projects.
|
|
22
22
|
|
|
23
|
-
- [
|
|
23
|
+
- [Features](#features)
|
|
24
24
|
- [Requirements](#requirements)
|
|
25
25
|
- [Installation](#installation)
|
|
26
26
|
- [Documentation](#documentation)
|
|
27
27
|
|
|
28
28
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## Features
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Utilities include:
|
|
35
|
-
|
|
36
|
-
* a minimal GitHub API client for retrieving release information and downloading assets
|
|
32
|
+
* a minimal GitHub API client for release info/assets
|
|
37
33
|
* a `ZipFile` subclass that [preserves file permissions](https://stackoverflow.com/questions/39296101/python-zipfile-removes-execute-permissions-from-binaries) (workaround for [Python #15795](https://bugs.python.org/issue15795))
|
|
38
|
-
*
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
- operating system
|
|
46
|
-
- Python packages installed
|
|
47
|
-
- executables available on the PATH
|
|
48
|
-
- test fixtures for example / test models in
|
|
49
|
-
- `MODFLOW-USGS/modflow6-examples`
|
|
50
|
-
- `MODFLOW-USGS/modflow6-testmodels`
|
|
51
|
-
- `MODFLOW-USGS/modflow6-largetestmodels`
|
|
34
|
+
* pytest fixtures including "keepable" temporary directories and snapshot testing utilities
|
|
35
|
+
* pytest markers to skip test cases conditional on operating system, installed packages, or available executables
|
|
36
|
+
* a parser for MODFLOW 6 [definition files](https://modflow6.readthedocs.io/en/stable/_dev/dfn.html)
|
|
37
|
+
* a models API for streamlined access to MODFLOW 6 (and other) models in
|
|
38
|
+
- [`MODFLOW-ORG/modflow6-examples`](https://github.com/MODFLOW-ORG/modflow6-examples)
|
|
39
|
+
- [`MODFLOW-ORG/modflow6-testmodels`](https://github.com/MODFLOW-ORG/modflow6-testmodels)
|
|
40
|
+
- [`MODFLOW-ORG/modflow6-largetestmodels`](https://github.com/MODFLOW-ORG/modflow6-largetestmodels)
|
|
52
41
|
|
|
53
42
|
## Requirements
|
|
54
43
|
|
|
55
|
-
Python3.
|
|
44
|
+
Python3.10+, dependency-free by default.
|
|
45
|
+
|
|
46
|
+
Several optional dependency groups are available, oriented around specific use cases:
|
|
56
47
|
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
48
|
+
- `dfn`: MF6 definition file parsing
|
|
49
|
+
- `test`: pytest fixtures/extensions
|
|
50
|
+
- `models`: example model access
|
|
60
51
|
|
|
61
52
|
## Installation
|
|
62
53
|
|
|
@@ -66,7 +57,7 @@ Python3.8+, dependency-free, but pairs well with `pytest` and select plugins, e.
|
|
|
66
57
|
pip install modflow-devtools
|
|
67
58
|
```
|
|
68
59
|
|
|
69
|
-
|
|
60
|
+
To install an optional dependency group:
|
|
70
61
|
|
|
71
62
|
```shell
|
|
72
63
|
pip install "modflow-devtools[test]"
|
|
@@ -74,7 +65,7 @@ pip install "modflow-devtools[test]"
|
|
|
74
65
|
|
|
75
66
|
To install from source and set up a development environment please see the [developer documentation](DEVELOPER.md).
|
|
76
67
|
|
|
77
|
-
To
|
|
68
|
+
To use the `pytest` fixtures provided by `modflow-devtools`, add the following to a test file or `conftest.py` file:
|
|
78
69
|
|
|
79
70
|
```python
|
|
80
71
|
pytest_plugins = [ "modflow_devtools.fixtures" ]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from os import PathLike
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from subprocess import run
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def meson_build(
|
|
7
|
+
project_path: PathLike,
|
|
8
|
+
build_path: PathLike,
|
|
9
|
+
bin_path: PathLike,
|
|
10
|
+
):
|
|
11
|
+
project_path = Path(project_path).expanduser().resolve()
|
|
12
|
+
build_path = Path(build_path).expanduser().resolve()
|
|
13
|
+
bin_path = Path(bin_path).expanduser().resolve()
|
|
14
|
+
|
|
15
|
+
# meson setup
|
|
16
|
+
args = [
|
|
17
|
+
"meson",
|
|
18
|
+
"setup",
|
|
19
|
+
str(build_path),
|
|
20
|
+
f"--bindir={bin_path}",
|
|
21
|
+
f"--libdir={bin_path}",
|
|
22
|
+
f"--prefix={Path.cwd()}",
|
|
23
|
+
]
|
|
24
|
+
if build_path.is_dir():
|
|
25
|
+
args.append("--wipe")
|
|
26
|
+
|
|
27
|
+
print("Running command: " + " ".join(args))
|
|
28
|
+
run(args, check=True, cwd=project_path)
|
|
29
|
+
|
|
30
|
+
# meson compile
|
|
31
|
+
args = ["meson", "compile", "-C", str(build_path)]
|
|
32
|
+
print("Running command: " + " ".join(args))
|
|
33
|
+
run(args, check=True, cwd=project_path)
|
|
34
|
+
|
|
35
|
+
# meson install
|
|
36
|
+
args = ["meson", "install", "-C", str(build_path)]
|
|
37
|
+
print("Running command: " + " ".join(args))
|
|
38
|
+
run(args, check=True, cwd=project_path)
|