Skip to content

Commit

Permalink
Fix path issue with field_table (#527)
Browse files Browse the repository at this point in the history
Wrap the field table string in Path() to make the filecopy task happy.
  • Loading branch information
christinaholtNOAA authored Jul 10, 2024
1 parent 51f1929 commit 6b5fbfd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/uwtools/drivers/fv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def field_table(self):
yield self._taskname(fn)
path = self._rundir / fn
yield asset(path, path.is_file)
yield filecopy(src=self._driver_config["field_table"]["base_file"], dst=path)
yield filecopy(src=Path(self._driver_config["field_table"]["base_file"]), dst=path)

@tasks
def files_copied(self):
Expand Down
2 changes: 1 addition & 1 deletion src/uwtools/tests/drivers/test_fv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def test_FV3_field_table(driverobj):
src.touch()
dst = driverobj._rundir / "field_table"
assert not dst.is_file()
driverobj._driver_config["field_table"] = {"base_file": src}
driverobj._driver_config["field_table"] = {"base_file": str(src)}
driverobj.field_table()
assert dst.is_file()

Expand Down

0 comments on commit 6b5fbfd

Please sign in to comment.