diff --git a/config/nowcast.yaml b/config/nowcast.yaml index c36551ac..b86572db 100644 --- a/config/nowcast.yaml +++ b/config/nowcast.yaml @@ -159,7 +159,9 @@ rivers: b201702: /SalishSeaCast/rivers-climatology/rivers_month_201702.nc # Templates for the runoff forcing file name # **Must be quoted to project {} characters** - file template: "R201702DFraCElse_{:y%Ym%md%d}.nc" + # TODO: collapse to single item for v202111; b201702 key not required + file templates: + b201702: "R201702DFraCElse_{:y%Ym%md%d}.nc" # Module containing dictionary of the proportions that each river occupies in its watershed prop_dict module: salishsea_tools.river_201702 turbidity: diff --git a/tests/workers/test_make_forcing_links.py b/tests/workers/test_make_forcing_links.py index 6b251951..eb0b0732 100644 --- a/tests/workers/test_make_forcing_links.py +++ b/tests/workers/test_make_forcing_links.py @@ -197,9 +197,10 @@ def test_ssh_dir(self, host, ssh_dir, prod_config): prod_config["run"]["enabled hosts"][host]["forcing"]["ssh dir"] == ssh_dir ) - def test_rivers_file_template(self, prod_config): + def test_rivers_file_templates(self, prod_config): assert ( - prod_config["rivers"]["file template"] == "R201702DFraCElse_{:y%Ym%md%d}.nc" + prod_config["rivers"]["file templates"]["b201702"] + == "R201702DFraCElse_{:y%Ym%md%d}.nc" ) @pytest.mark.parametrize( diff --git a/tests/workers/test_make_runoff_file.py b/tests/workers/test_make_runoff_file.py index 0528ec31..a0747184 100644 --- a/tests/workers/test_make_runoff_file.py +++ b/tests/workers/test_make_runoff_file.py @@ -104,7 +104,7 @@ def test_message_types(self, msg, prod_config): def test_rivers_sections(self, prod_config): rivers = prod_config["rivers"] - assert rivers["file template"] == "R201702DFraCElse_{:y%Ym%md%d}.nc" + assert rivers["file templates"]["b201702"] == "R201702DFraCElse_{:y%Ym%md%d}.nc" assert rivers["rivers dir"] == "/results/forcing/rivers/" assert rivers["prop_dict module"] == "salishsea_tools.river_201702" assert ( diff --git a/tests/workers/test_upload_forcing.py b/tests/workers/test_upload_forcing.py index cd82fedd..a5d79489 100644 --- a/tests/workers/test_upload_forcing.py +++ b/tests/workers/test_upload_forcing.py @@ -189,7 +189,7 @@ def test_fraser_turbidity_uploads(self, host, expected, prod_config): ) def test_river_runoff_uploads(self, host, expected, prod_config): rivers = prod_config["rivers"] - assert rivers["file template"] == "R201702DFraCElse_{:y%Ym%md%d}.nc" + assert rivers["file templates"]["b201702"] == "R201702DFraCElse_{:y%Ym%md%d}.nc" assert rivers["rivers dir"] == "/results/forcing/rivers/" host_config = prod_config["run"]["enabled hosts"][host] assert host_config["forcing"]["rivers dir"] == expected