Skip to content

Commit

Permalink
Merge pull request #43 from ACCESS-NRI/access-esm1p5-test-fixes
Browse files Browse the repository at this point in the history
Fixes for `ACCESS-ESM1.5` Config Tests
  • Loading branch information
CodeGat committed Aug 12, 2024
2 parents d24f258 + b252873 commit 8a7d38d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "model_config_tests"
version = "0.0.3"
version = "0.0.4"
authors = [
{ name = "ACCESS-NRI" },
]
Expand Down
10 changes: 7 additions & 3 deletions src/model_config_tests/qa/test_access_esm1p5_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
VALID_KEYWORDS: set[str] = {"global", "access-esm1.5"}
VALID_NOMINAL_RESOLUTION: str = "100 km"
VALID_REFERENCE: str = "https://doi.org/10.1071/ES19035"
VALID_PREINDUSTRIAL_START: dict[str, int] = {"year": 101, "month": 1, "day": 1}
VALID_HISTORICAL_START: dict[str, int] = {"year": 1850, "month": 1, "day": 1}
VALID_RUNTIME: dict[str, int] = {"year": 1, "month": 0, "day": 0}
VALID_PREINDUSTRIAL_START: dict[str, int] = {"year": 101, "month": 1, "days": 1}
VALID_HISTORICAL_START: dict[str, int] = {"year": 1850, "month": 1, "days": 1}
VALID_RUNTIME: dict[str, int] = {"years": 1, "months": 0, "days": 0}
VALID_RESTART_FREQ: str = "10YS"
VALID_MPPNCCOMBINE_EXE: str = "mppnccombine.spack"

Expand Down Expand Up @@ -181,6 +181,10 @@ def test_mppnccombine_fast_collate_exe(self, config):
"collate.exe", "config.yaml", VALID_MPPNCCOMBINE_EXE
)

assert "mpi" in config["collate"], error_field_nonexistence(
"collate.mpi", "config.yaml"
)

assert config["collate"]["mpi"], error_field_incorrect(
"collate.mpi", "config.yaml", "true"
)

0 comments on commit 8a7d38d

Please sign in to comment.