Skip to content

Commit 2c95a6e

Browse files
committed
Add test and templates for MVKxx and MVKO automated tests
1 parent 2d0f37e commit 2c95a6e

File tree

4 files changed

+39
-4
lines changed

4 files changed

+39
-4
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.9", "3.10", "3.11", "3.12"]
19+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
2020

2121
steps:
2222
- uses: actions/checkout@v4

test/MVKO_template.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"MVKO": {
3+
"module": "MODULE_LOCATION",
4+
"test-case": "Test",
5+
"test-dir": "TEST_DIRECTORY",
6+
"ref-case": "Baseline",
7+
"ref-dir": "BASELINE_DIRECTORY",
8+
"var-set": "default",
9+
"ninst": 30,
10+
"component": "mpaso",
11+
"img-fmt": "png",
12+
"critical": 0,
13+
"alpha": 0.05,
14+
"hist-name": "hist.am.timeSeriesStatsClimatology"
15+
}
16+
}

test/MVKxx_template.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"MVKxx": {
3+
"module": "MODULE_LOCATION",
4+
"test-case": "Test",
5+
"test-dir": "TEST_DIRECTORY",
6+
"ref-case": "Baseline",
7+
"ref-dir": "BASELINE_DIRECTORY",
8+
"var-set": "scream",
9+
"ninst": 30,
10+
"component": "scream",
11+
"img-fmt": "png",
12+
"hist-name": "h"
13+
}
14+
}

test/test_evv.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
evv_lib_dir = Path(evv4esm.__file__).parent.resolve()
1111
mimic_lib_dir = Path(mmc.__file__).parent.resolve()
1212
cl_args = namedtuple("Args", ["cfg"])
13-
evv_tests = {"TSC": "tsc.py", "MVK": "ks.py"}
13+
evv_tests = {"TSC": "tsc.py", "MVK": "ks.py", "MVKxx": "ks.py", "MVKO": "kso.py"}
1414

1515

1616
def gen_data_run_evv(evv_test):
@@ -39,7 +39,7 @@ def gen_data_run_evv(evv_test):
3939
json.dump(evv_cfg, config_file, indent=4)
4040

4141
evv_out_dir = Path(f"{evv_test}_test_output")
42-
evv(["-e", str(json_file), "-o", str(evv_out_dir)])
42+
evv(["-e", str(json_file), "-o", str(evv_out_dir), "-p", 0])
4343

4444
with open(Path(evv_out_dir, "index.json")) as evv_f:
4545
evv_status = json.load(evv_f)
@@ -57,9 +57,14 @@ def gen_data_run_evv(evv_test):
5757
assert not status[_index], f"{_index} SHOULD BE FAIL IS PASS"
5858

5959

60+
def test_evv_mvko():
61+
gen_data_run_evv("MVKO")
62+
63+
def test_evv_mvkxx():
64+
gen_data_run_evv("MVKxx")
65+
6066
def test_evv_tsc():
6167
gen_data_run_evv("TSC")
6268

63-
6469
def test_evv_mvk():
6570
gen_data_run_evv("MVK")

0 commit comments

Comments
 (0)