Skip to content

Commit

Permalink
refactor: multiple (#100)
Browse files Browse the repository at this point in the history
* remove unused case and context utilities
* remove default exe dict (modflow6 autotest concern)
* add optional import mechanism, use for pytest import
  • Loading branch information
wpbonelli committed Aug 5, 2023
1 parent 33ab22a commit 07bd60f
Show file tree
Hide file tree
Showing 10 changed files with 167 additions and 489 deletions.
64 changes: 0 additions & 64 deletions docs/md/cases.md

This file was deleted.

9 changes: 5 additions & 4 deletions docs/md/executables.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The `Executables` class maps executable names to paths on the filesystem. This i
For example, assuming development binaries live in `bin` relative to the project root (as is currently the convention for `modflow6`), the following `pytest` fixtures could be defined:

```python
from modflow_devtools.executables import build_default_exe_dict, Executables
from modflow_devtools.executables import Executables

@pytest.fixture(scope="session")
def bin_path() -> Path:
Expand All @@ -16,7 +16,10 @@ def bin_path() -> Path:

@pytest.fixture(scope="session")
def targets(bin_path) -> Executables:
return Executables(**build_default_exe_dict(bin_path))
exes = {
# ...map names to paths
}
return Executables(**exes)
```

The `targets` fixture can then be injected into test functions:
Expand All @@ -27,8 +30,6 @@ def test_targets(targets):
assert targets["mf6"] == targets.mf6
```

The `build_default_exe_dict` function is provided to create the default executable mapping used by MODFLOW 6 autotests.

There is also a convenience function for getting a program's version string. The function will automatically strip the program name from the output (assumed delimited with `:`).

```python
Expand Down
43 changes: 0 additions & 43 deletions modflow_devtools/case.py

This file was deleted.

249 changes: 0 additions & 249 deletions modflow_devtools/context.py

This file was deleted.

Loading

0 comments on commit 07bd60f

Please sign in to comment.