Skip to content

Commit

Permalink
Merge branch 'main' into revert_chgres_cube
Browse files Browse the repository at this point in the history
  • Loading branch information
WeirAE authored Oct 8, 2024
2 parents 6300771 + e2eb7fc commit a4dbcdd
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/uwtools/resources/jsonschema/chgres-cube.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"additionalProperties": false,
"properties": {
"execution": {
"$ref": "urn:uwtools:execution"
"$ref": "urn:uwtools:execution-parallel"
},
"namelist": {
"additionalProperties": false,
Expand Down
2 changes: 1 addition & 1 deletion src/uwtools/resources/jsonschema/fv3.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"type": "string"
},
"execution": {
"$ref": "urn:uwtools:execution"
"$ref": "urn:uwtools:execution-parallel"
},
"field_table": {
"additionalProperties": false,
Expand Down
2 changes: 1 addition & 1 deletion src/uwtools/resources/jsonschema/jedi.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"type": "object"
},
"execution": {
"$ref": "urn:uwtools:execution"
"$ref": "urn:uwtools:execution-parallel"
},
"files_to_copy": {
"$ref": "urn:uwtools:files-to-stage"
Expand Down
2 changes: 1 addition & 1 deletion src/uwtools/resources/jsonschema/mpas-init.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"type": "object"
},
"execution": {
"$ref": "urn:uwtools:execution"
"$ref": "urn:uwtools:execution-parallel"
},
"files_to_copy": {
"$ref": "urn:uwtools:files-to-stage"
Expand Down
2 changes: 1 addition & 1 deletion src/uwtools/resources/jsonschema/mpas.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"additionalProperties": false,
"properties": {
"execution": {
"$ref": "urn:uwtools:execution"
"$ref": "urn:uwtools:execution-parallel"
},
"files_to_copy": {
"$ref": "urn:uwtools:files-to-stage"
Expand Down
2 changes: 1 addition & 1 deletion src/uwtools/resources/jsonschema/orog.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"additionalProperties": false,
"properties": {
"execution": {
"$ref": "urn:uwtools:execution"
"$ref": "urn:uwtools:execution-parallel"
},
"files_to_link": {
"$ref": "urn:uwtools:files-to-stage"
Expand Down
2 changes: 1 addition & 1 deletion src/uwtools/resources/jsonschema/sfc-climo-gen.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"additionalProperties": false,
"properties": {
"execution": {
"$ref": "urn:uwtools:execution"
"$ref": "urn:uwtools:execution-parallel"
},
"namelist": {
"additionalProperties": false,
Expand Down
2 changes: 1 addition & 1 deletion src/uwtools/resources/jsonschema/ungrib.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"additionalProperties": false,
"properties": {
"execution": {
"$ref": "urn:uwtools:execution"
"$ref": "urn:uwtools:execution-parallel"
},
"gfs_files": {
"additionalProperties": false,
Expand Down
2 changes: 1 addition & 1 deletion src/uwtools/resources/jsonschema/upp.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"additionalProperties": false,
"properties": {
"execution": {
"$ref": "urn:uwtools:execution"
"$ref": "urn:uwtools:execution-parallel"
},
"files_to_copy": {
"$ref": "urn:uwtools:files-to-stage"
Expand Down
20 changes: 10 additions & 10 deletions src/uwtools/tests/test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,15 +667,15 @@ def test_schema_esg_grid_rundir(esg_grid_prop):
assert "42 is not of type 'string'\n" in errors(42)


# execution
# execution-parallel


def test_schema_execution():
def test_schema_parallel_execution():
config = {"executable": "fv3"}
batchargs = {"batchargs": {"queue": "string", "walltime": "string"}}
mpiargs = {"mpiargs": ["--flag1", "--flag2"]}
threads = {"threads": 32}
errors = schema_validator("execution")
errors = schema_validator("execution-parallel")
# Basic correctness:
assert not errors(config)
# batchargs may optionally be specified:
Expand All @@ -692,16 +692,16 @@ def test_schema_execution():
)


def test_schema_execution_executable():
errors = schema_validator("execution", "properties", "executable")
def test_schema_parallel_execution_executable():
errors = schema_validator("execution-parallel", "properties", "executable")
# String value is ok:
assert not errors("fv3.exe")
# Anything else is not:
assert "42 is not of type 'string'\n" in errors(42)


def test_schema_execution_mpiargs():
errors = schema_validator("execution", "properties", "mpiargs")
def test_schema_parallel_execution_mpiargs():
errors = schema_validator("execution-parallel", "properties", "mpiargs")
# Basic correctness:
assert not errors(["string1", "string2"])
# mpiargs may be empty:
Expand All @@ -710,8 +710,8 @@ def test_schema_execution_mpiargs():
assert "42 is not of type 'string'\n" in errors(["string1", 42])


def test_schema_execution_threads():
errors = schema_validator("execution", "properties", "threads")
def test_schema_parallel_execution_threads():
errors = schema_validator("execution-parallel", "properties", "threads")
# threads must be non-negative, and an integer:
assert not errors(1)
assert not errors(4)
Expand All @@ -725,7 +725,7 @@ def test_schema_execution_threads():
def test_schema_execution_serial():
config = {"executable": "fv3"}
batchargs = {"batchargs": {"queue": "string", "walltime": "string"}}
errors = schema_validator("execution")
errors = schema_validator("execution-serial")
# Basic correctness:
assert not errors(config)
# batchargs may optionally be specified:
Expand Down

0 comments on commit a4dbcdd

Please sign in to comment.