Skip to content

Commit

Permalink
release(1.2.8): update mf6 version
Browse files Browse the repository at this point in the history
Also added latest version of gsflow (v 2.3.0) and mfusg_gsi (v2.1.1).
  • Loading branch information
jdhughes-usgs committed Jun 29, 2023
1 parent 7521c1b commit 897c4da
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 13 deletions.
8 changes: 7 additions & 1 deletion autotest/test_cli_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
import pathlib as pl
import shutil
import subprocess
import sys

import pytest
from flaky import flaky

RERUNS = 3

targets = (
"triangle",
"crt",
"mf6dev",
)

# set up paths
Expand Down Expand Up @@ -48,6 +51,7 @@ def clean_up() -> None:

@pytest.mark.dependency(name="make_program")
@pytest.mark.base
@flaky(max_runs=RERUNS)
@pytest.mark.parametrize("target", targets)
def test_make_program(target: str) -> None:
cmd = [
Expand All @@ -56,11 +60,13 @@ def test_make_program(target: str) -> None:
"--appdir",
str(dstpth),
"--verbose",
"--meson-build",
]
run_cli_cmd(cmd)


@pytest.mark.dependency(name="make_program_all")
@flaky(max_runs=RERUNS)
@pytest.mark.schedule
def test_make_program_all() -> None:
cmd = [
Expand Down
2 changes: 1 addition & 1 deletion autotest/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ def test_latest_assets():
keys = assets.keys()
test_keys = [
"code.json",
"code.md",
"mac.zip",
"linux.zip",
"win32.zip",
"win64.zip",
]
for key in keys:
Expand Down
13 changes: 10 additions & 3 deletions pymake/cmds/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,17 @@
"zip",
"keep",
"dryrun",
"meson",
)
COM_ARG_KEYS = (
"fc",
"cc",
"fflags",
"cflags",
"zip",
"keep",
"dryrun",
)
COM_ARG_KEYS = ("fc", "cc", "fflags", "cflags", "zip", "keep", "dryrun")


def main() -> None:
Expand Down Expand Up @@ -110,12 +119,10 @@ def main() -> None:
args = vars(parser_args)

# filter parser arguments into args and command line arguments
# com_arg_var = {}
arg_key_pop = []
com_arg_pop = []
for key, arg in args.items():
if key in COM_ARG_KEYS:
# com_arg_var[key] = arg
arg_key_pop.append(key)
else:
for carg in sys.argv:
Expand Down
15 changes: 13 additions & 2 deletions pymake/pymake_build_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ def build_apps(
meson=False,
mesondir=".",
clean=True,
mb=None,
):
"""Build all of the current targets or a subset of targets.
"""Build all current targets or a subset of targets.
Parameters
----------
Expand All @@ -71,6 +72,10 @@ def build_apps(
Main meson.build file path
clean : bool
boolean determining of final download should be removed
mb : bool
parser variable from cli that represents the boolean indicating that
the executable should be built using the meson build system.
(default is None)
Returns
-------
Expand All @@ -86,6 +91,12 @@ def build_apps(
if targets == ":":
targets = None

if mb is not None:
if meson:
raise ValueError(f"PROGRAM ERROR: meson={meson} and mb={mb}")
else:
meson = mb

# set targets
if targets is None:
targets = usgs_program_data.get_keys(current=True)
Expand Down Expand Up @@ -214,7 +225,7 @@ def build_apps(
pmobj.inplace = True

# set target and srcdir
pmobj.target = target
pmobj.target = target.replace("dev", "")
pmobj.srcdir = os.path.join(
download_dir, code_dict[target].dirname, code_dict[target].srcdir
)
Expand Down
8 changes: 2 additions & 6 deletions pymake/utils/_meson_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@
_get_osname,
_get_prepend,
)
from ._file_utils import _get_extra_exclude_files, _get_extrafiles_common_path
from ._Popen_wrapper import (
_process_Popen_command,
_process_Popen_communicate,
_process_Popen_initialize,
)
from ._file_utils import _get_extrafiles_common_path


@contextmanager
Expand Down Expand Up @@ -197,6 +192,7 @@ def meson_setup(
os.path.abspath(appdir), os.path.abspath(mesondir)
)
command_list.append(f"--libdir={libdir}")
command_list.append(f"--bindir={libdir}")

if os.path.isdir(build_dir):
command_list.append("--wipe")
Expand Down
3 changes: 3 additions & 0 deletions pymake/utils/usgsprograms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ mfnwt1.1.4 , 1.1.4 , False , https://water.usgs.gov/water-resources/software
mfnwt , 1.3.0 , True , https://water.usgs.gov/water-resources/software/MODFLOW-NWT/MODFLOW-NWT_1.3.0.zip , MODFLOW-NWT , src , True , True , False
mfusg_gsi , 2.1.1 , True , https://www.gsienv.com/wp-content/uploads/2023/04/USG-Transport-V_2.1.1.zip , . , USGT-v2-1-1-source , True , True , False
gsflow , 2.3.0 , True , https://water.usgs.gov/water-resources/software/gsflow/gsflow_2.3.0.zip , gsflow_2.3.0 , src , True , False , False
mf6dev , 6.4.2+ , False , https://github.com/MODFLOW-USGS/modflow6/archive/refs/heads/develop.zip , modflow6-develop , src , True , False , False
zbud6dev , 6.4.2+ , False , https://github.com/MODFLOW-USGS/modflow6/archive/refs/heads/develop.zip , modflow6-develop , utils/zonebudget/src, True , False , False
libmf6dev , 6.4.2+ , False , https://github.com/MODFLOW-USGS/modflow6/archive/refs/heads/develop.zip , modflow6-develop , srcbmi , True , False , True

0 comments on commit 897c4da

Please sign in to comment.