-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update to use BINARY option for windows builds with ifort * update zbud6 include files
- Loading branch information
1 parent
7d05f3e
commit d9b17d6
Showing
8 changed files
with
212 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import os | ||
from pathlib import Path | ||
from platform import system | ||
|
||
import flopy | ||
import pytest | ||
|
||
import pymake | ||
|
||
# set fpth based on current path | ||
if os.path.basename(os.path.normpath(os.getcwd())) == "autotest": | ||
fpth = Path("temp") | ||
else: | ||
fpth = Path("autotest/temp") | ||
fpth = (fpth / "gsflowexamples/gsflowexamples.txt").resolve() | ||
if fpth.is_file(): | ||
with open(fpth) as f: | ||
lines = f.read().splitlines() | ||
sim_dirs = [line for line in lines if len(line) > 0] | ||
else: | ||
sim_dirs = [] | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def target(module_tmpdir) -> Path: | ||
name = "gsflow" | ||
ext = ".exe" if system() == "Windows" else "" | ||
return module_tmpdir / f"{name}{ext}" | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def prog_data(target) -> dict: | ||
return pymake.usgs_program_data.get_target(target.name) | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def workspace(module_tmpdir, prog_data) -> Path: | ||
return module_tmpdir / prog_data.dirname | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def pm(module_tmpdir, target) -> pymake.Pymake: | ||
pm = pymake.Pymake(verbose=True) | ||
pm.target = str(target) | ||
pm.appdir = module_tmpdir | ||
pm.makefile = True | ||
pm.makeclean = True | ||
pm.makefiledir = module_tmpdir | ||
pm.inplace = True | ||
pm.networkx = True | ||
pm.verbose = True | ||
yield pm | ||
pm.finalize() | ||
|
||
|
||
@pytest.mark.dependency(name="download") | ||
@pytest.mark.base | ||
def test_download(pm, module_tmpdir, target): | ||
pm.download_target(target, download_path=module_tmpdir) | ||
assert pm.download, f"could not download {target} distribution" | ||
|
||
|
||
@pytest.mark.dependency(name="build", depends=["download"]) | ||
@pytest.mark.base | ||
def test_compile(pm, target): | ||
assert pm.build() == 0, f"could not compile {target}" | ||
|
||
|
||
@pytest.mark.dependency(name="test", depends=["build"]) | ||
@pytest.mark.regression | ||
@pytest.mark.parametrize("ws", sim_dirs) | ||
def test_gsflow(ws, target): | ||
success, _ = flopy.run_model( | ||
target, | ||
"gsflow.control", | ||
model_ws=ws, | ||
silent=False, | ||
normal_msg=[ | ||
"normal termination", | ||
"Normal completion of GSFLOW", | ||
], | ||
) | ||
assert success, f"could not run {ws}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
__author__ = "Joseph D. Hughes" | ||
__date__ = "July 5, 2023" | ||
__version__ = "1.2.9.dev0" | ||
__date__ = "February 11, 2024" | ||
__version__ = "1.2.9" | ||
__maintainer__ = "Joseph D. Hughes" | ||
__email__ = "[email protected]" | ||
__status__ = "Production" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters