Skip to content

refactor(fixtures): fix/refactor model-loading fixtures#33

Merged
wpbonelli merged 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:fix-fixtures
Dec 29, 2022
Merged

refactor(fixtures): fix/refactor model-loading fixtures#33
wpbonelli merged 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:fix-fixtures

Conversation

@wpbonelli
Copy link
Copy Markdown
Member

@wpbonelli wpbonelli commented Dec 29, 2022

  • refactor model-loading fixtures as Path to namefile rather than model directory, affects the following fixtures
    • test_model_mf6
    • test_model_mf5to6
    • large_test_model
  • split get_model_paths() utility function into
    • get_model_dir_paths()
    • get_namefile_paths()
  • add/update tests

This PR introduces a breaking change for model-loading fixtures. Previously the fixtures were Paths to the model directory, i.e. the folder containing the model's namefile. This caused ambiguity and/or duplication if a folder contained multiple namefiles. Since namefiles contain relative paths to inputs, it should be sufficient to provide the namefile path alone to test functions.

This PR does not change the example_scenario fixture, which is still a Tuple[str, List[Path]] mapping scenario name to ordered list of namefile paths.

@wpbonelli wpbonelli marked this pull request as ready for review December 29, 2022 18:44
* refactor test model fixtures as path to namefile, not model dir
* refactor model-loading utility functions for distinct use cases
* expand tests
* update docs
@wpbonelli wpbonelli merged commit 23593df into MODFLOW-ORG:develop Dec 29, 2022
@wpbonelli wpbonelli deleted the fix-fixtures branch December 29, 2022 19:17
This was referenced Dec 29, 2022
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.

1 participant