Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(tests): use devtools fixtures #1130

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

wpbonelli
Copy link
Contributor

@wpbonelli wpbonelli commented Jan 4, 2023

Update tests that load models from external repos to use devtools fixtures, with a bit of other refactoring. This was carved out of #1066 for a smaller changeset and more incremental refactor.

  • Use fixtures from modflow-devtools to:
    • map target executable names to their paths (targets fixture)
    • parametrize tests with models loaded from external repos
      • the set of models tested is not changed — coupled GWT models are skipped, as before
      • support example selection by model name/package via --model/--package pytest CLI options
      • support --original-regression flag as a pytest CLI option/fixture (configured in new conftest.py file)
      • update DEVELOPER.md to reflect devtools convention that external model repos live side by side with modflow6, or optional REPOS_PATH environment variable to specify a different location
  • Use devtools and flopy instead of pymake in build_exes.py and get_exes.py. Give both scripts an argparse CLI with optional --path argument to specify a different bin path (defaults to the existing location, bin in the project root).
  • Remove pymake usage from framework/simulation and external model tests. Move some utility functions previously in pymake into common_regression.py. A followup PR could replace pymake usages in the rest of the tests.
  • Use Github API token in CI step downloading exes (bypass rate limit)

@wpbonelli wpbonelli marked this pull request as ready for review January 4, 2023 13:32
Copy link
Contributor

@langevin-usgs langevin-usgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, @w-bonelli. Nice cleanup and nice documentation.

autotest/test_z01_testmodels_mf6.py Outdated Show resolved Hide resolved
@wpbonelli wpbonelli merged commit 29dfdcf into MODFLOW-USGS:develop Jan 6, 2023
@wpbonelli wpbonelli deleted the develop-tests branch January 6, 2023 14:28
This was referenced Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants