Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion recipe/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@
"requests >=2.32,<2.35"
]
},
"version": "2.16.1"
"version": "2.16.2"
}
2 changes: 1 addition & 1 deletion src/uwtools/drivers/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def _run_via_local_execution(self):
path = self.rundir / self._runscript_done_file
yield Asset(path, path.is_file)
yield self.provisioned_rundir()
cmd = "./{x} >{x}.out 2>&1".format(x=self._runscript_path.name)
cmd = "./{x} >>{x}.out 2>&1".format(x=self._runscript_path.name)
run_shell_cmd(cmd=cmd, cwd=self.rundir, log_output=True)

# Public methods
Expand Down
12 changes: 0 additions & 12 deletions src/uwtools/drivers/ungrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from uwtools.drivers.support import set_driver_docstring
from uwtools.exceptions import UWConfigError
from uwtools.strings import STR
from uwtools.utils.processing import run_shell_cmd
from uwtools.utils.tasks import file
from uwtools.utils.time import to_datetime, to_iso8601, to_timedelta

Expand Down Expand Up @@ -97,17 +96,6 @@ def vtable(self):
path.parent.mkdir(parents=True, exist_ok=True)
path.symlink_to(Path(self.config["vtable"]))

@task
def _run_via_local_execution(self):
"""
A run executed directly on the local system.
"""
yield self.taskname("run via local execution")
yield [Asset(path, path.is_file) for path in self.output["paths"]]
yield self.provisioned_rundir()
cmd = "{x} >{x}.out 2>&1".format(x=self._runscript_path)
run_shell_cmd(cmd=cmd, cwd=self.rundir, log_output=True)

# Public helper methods

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion src/uwtools/resources/info.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"buildnum": "0",
"version": "2.16.1"
"version": "2.16.2"
}
2 changes: 1 addition & 1 deletion src/uwtools/tests/drivers/test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def test_Driver__run_via_local_execution(driverobj, node):
):
driverobj._run_via_local_execution()
run_shell_cmd.assert_called_once_with(
cmd="./{x} >{x}.out 2>&1".format(x=driverobj._runscript_path.name),
cmd="./{x} >>{x}.out 2>&1".format(x=driverobj._runscript_path.name),
cwd=driverobj.rundir,
log_output=True,
)
Expand Down
21 changes: 0 additions & 21 deletions src/uwtools/tests/drivers/test_ungrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,27 +139,6 @@ def test_Ungrib__gribfile(driverobj):
assert dst.is_symlink()


def test_Ungrib__run_via_local_execution(driverobj, node):
def make_output(*_args, **_kwargs):
for path in driverobj.output["paths"]:
path.touch()

with (
patch.object(driverobj, "provisioned_rundir", return_value=node) as provisioned_rundir,
patch.object(ungrib, "run_shell_cmd", side_effect=make_output) as run_shell_cmd,
):
val = driverobj._run_via_local_execution()
assert val.ready
for path in val.ref:
assert path.exists()
run_shell_cmd.assert_called_once_with(
cmd="{x} >{x}.out 2>&1".format(x=driverobj._runscript_path),
cwd=driverobj.rundir,
log_output=True,
)
provisioned_rundir.assert_called_once_with()


@mark.parametrize("val", ["06:00:00", "06:00", "06", "6", 6, timedelta(hours=6)])
def test_Ungrib__step(driverobj, val):
driverobj._config["step"] = val
Expand Down
Loading