Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follows up on #1130 and picks up some threads originally in #1052
modflow-devtools
ci.yml
, only trigger matrix jobs if smoke tests passdisu_util.py
binary_file_writer.py
budget_file_compare.py
autotest/scripts/cross_section_functions.py
->autotest/cross_section_functions.py
for import without alteringsys.path
--path
(short-p
) argument toupdate_flopy.py
CLI, defaults to existing locationdoc/mf6io/mf6ivar/dfn
pytest-order
is used for orderingpytest-cases
. This is a proof of concept for decoupling test cases from test functions, meant to demo how existing test cases could be incrementally refactored to plug into a shared test function. Implementations range from a minimal switch topytest-cases
, keeping things in the original file, to more extensive refactoring using theCase
utility from devtools. Affected files include:test_gwf_buy_lak02.py
: cases and test function both kept in original scripttest_gwf_csub_sk01.py
: cases and test function both kept in original scripttest_gwf_maw04.py
: cases defined in original script, plugged into shared test functiontest_gwf_maw_cases.py
: broadly refactored cases previously intest_gwf_maw0[1-3].py
, plugged into shared functiontest_gwf.py
: shared test function, cases testing any package can be plugged inSimulation
toTestSimulation
to disambiguate from Flopy and ModflowAPItesting_framework
toTestFramework
(shared test function could replace framework class if refactor proceeds)flopy
(removetry/except
imports) since it's documented inDEVELOPER.md
and included inenvironment.yml
python
(without pytest) — tests depend on several pytest features so it seems reasonable to require it as a testing dependency, and--original-regression
,--model
and--package
filtering options are now supported bypytest
.REPOS_PATH
env var to testing steps in CI. This is not strictly required since the repos are checked out to the default search location used by devtools (level withmodflow6
) but probably still best to be explicit.DEVELOPER.md
to reflect updates described here. The recent changes should be mostly transparent but if errors are encountered in a local development environment, some things to check include:modflow-devtools>=0.1.4
should be installedflopy
must be installed from a recent version of thedevelop
branch (at least modflowpy/flopy@94cd19d)MODFLOW-USGS/modflow6-testmodels
,MODFLOW-USGS/modflow6-largetestmodels
andMODFLOW-USGS/modflow6-examples
are not cloned side-by-side with themodflow6
repo, theREPOS_PATH
environment variable must point to the folder containing the model repositories--pak
,--sim
and--match
options previously used for external model tests are converted to--model
and--package
options supported bypytest
— for finer-grained control the utility functions with which the CLI opts are implemented may be used directly