Skip to content

Commit

Permalink
Only str->str mapping for filesToStage
Browse files Browse the repository at this point in the history
  • Loading branch information
maddenp-noaa committed Feb 6, 2024
1 parent 608909a commit a9e0efb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
12 changes: 1 addition & 11 deletions src/uwtools/resources/FV3Forecast.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,7 @@
"minProperties": 1,
"patternProperties": {
"^.*$": {
"oneOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
]
"type": "string"
}
},
"type": "object"
Expand Down
6 changes: 1 addition & 5 deletions src/uwtools/tests/drivers/test_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,10 @@ def test_FV3Forecast_schema_filesToStage():
assert "is not of type 'object'" in errors([])
# A str -> str dict is ok:
assert not errors({"file1": "/path/to/file1", "file2": "/path/to/file2"})
# A str -> List[str] dict is ok:
assert not errors({"dir": ["/path/to/file1", "/path/to/file2"]})
# An empty dict is not allowed:
assert "does not have enough properties" in errors({})
# Non-string values are not allowed:
assert "not valid" in errors({"file1": True})
# Non-string list elements are not allowed:
assert "not valid" in errors({"dir": [88]})
assert "True is not of type 'string'" in errors({"file1": True})


def test_FV3Forecast_schema_forecast_field_table(field_table_vals):
Expand Down

0 comments on commit a9e0efb

Please sign in to comment.