Skip to content

Commit 343db02

Browse files
authored
2.16.2 prep (#968)
1 parent 349bd82 commit 343db02

6 files changed

Lines changed: 4 additions & 37 deletions

File tree

recipe/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@
4343
"requests >=2.32,<2.35"
4444
]
4545
},
46-
"version": "2.16.1"
46+
"version": "2.16.2"
4747
}

src/uwtools/drivers/driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def _run_via_local_execution(self):
426426
path = self.rundir / self._runscript_done_file
427427
yield Asset(path, path.is_file)
428428
yield self.provisioned_rundir()
429-
cmd = "./{x} >{x}.out 2>&1".format(x=self._runscript_path.name)
429+
cmd = "./{x} >>{x}.out 2>&1".format(x=self._runscript_path.name)
430430
run_shell_cmd(cmd=cmd, cwd=self.rundir, log_output=True)
431431

432432
# Public methods

src/uwtools/drivers/ungrib.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from uwtools.drivers.support import set_driver_docstring
1616
from uwtools.exceptions import UWConfigError
1717
from uwtools.strings import STR
18-
from uwtools.utils.processing import run_shell_cmd
1918
from uwtools.utils.tasks import file
2019
from uwtools.utils.time import to_datetime, to_iso8601, to_timedelta
2120

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

100-
@task
101-
def _run_via_local_execution(self):
102-
"""
103-
A run executed directly on the local system.
104-
"""
105-
yield self.taskname("run via local execution")
106-
yield [Asset(path, path.is_file) for path in self.output["paths"]]
107-
yield self.provisioned_rundir()
108-
cmd = "{x} >{x}.out 2>&1".format(x=self._runscript_path)
109-
run_shell_cmd(cmd=cmd, cwd=self.rundir, log_output=True)
110-
11199
# Public helper methods
112100

113101
@classmethod

src/uwtools/resources/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"buildnum": "0",
3-
"version": "2.16.1"
3+
"version": "2.16.2"
44
}

src/uwtools/tests/drivers/test_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def test_Driver__run_via_local_execution(driverobj, node):
524524
):
525525
driverobj._run_via_local_execution()
526526
run_shell_cmd.assert_called_once_with(
527-
cmd="./{x} >{x}.out 2>&1".format(x=driverobj._runscript_path.name),
527+
cmd="./{x} >>{x}.out 2>&1".format(x=driverobj._runscript_path.name),
528528
cwd=driverobj.rundir,
529529
log_output=True,
530530
)

src/uwtools/tests/drivers/test_ungrib.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -139,27 +139,6 @@ def test_Ungrib__gribfile(driverobj):
139139
assert dst.is_symlink()
140140

141141

142-
def test_Ungrib__run_via_local_execution(driverobj, node):
143-
def make_output(*_args, **_kwargs):
144-
for path in driverobj.output["paths"]:
145-
path.touch()
146-
147-
with (
148-
patch.object(driverobj, "provisioned_rundir", return_value=node) as provisioned_rundir,
149-
patch.object(ungrib, "run_shell_cmd", side_effect=make_output) as run_shell_cmd,
150-
):
151-
val = driverobj._run_via_local_execution()
152-
assert val.ready
153-
for path in val.ref:
154-
assert path.exists()
155-
run_shell_cmd.assert_called_once_with(
156-
cmd="{x} >{x}.out 2>&1".format(x=driverobj._runscript_path),
157-
cwd=driverobj.rundir,
158-
log_output=True,
159-
)
160-
provisioned_rundir.assert_called_once_with()
161-
162-
163142
@mark.parametrize("val", ["06:00:00", "06:00", "06", "6", 6, timedelta(hours=6)])
164143
def test_Ungrib__step(driverobj, val):
165144
driverobj._config["step"] = val

0 commit comments

Comments
 (0)