From bed7c5bfcbdbed745122a7709ae4a32b907a289b Mon Sep 17 00:00:00 2001 From: Peter Powers <pmpowers@usgs.gov> Date: Mon, 22 May 2023 13:44:45 -0600 Subject: [PATCH] added AK 2007 refs --- gradle/nshm.gradle | 24 +++++++++++++++++++ nshms.yml | 14 +++++++++++ .../earthquake/nshmp/model/NshmTests.java | 12 +++++++++- 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/gradle/nshm.gradle b/gradle/nshm.gradle index 8b8cfbd7..3b3ce34f 100644 --- a/gradle/nshm.gradle +++ b/gradle/nshm.gradle @@ -76,6 +76,30 @@ task nshms() { } } +// Test Alaska 2007 NSHM +task testAlaska2007(type: Test) { + description = "Test Alaska 2007 NSHM" + group = "verification" + + doFirst { + downloadNshm(findNshm("nshm-alaska", 2007)) + } + + testLogging { + exceptionFormat "full" + } + + useJUnitPlatform() + jvmArgs( + "-Xms2g", + "-Xmx8g", + ) + + filter { + includeTestsMatching "gov.usgs.earthquake.nshmp.model.NshmTests.testAlaska2007" + } +} + // Test Alaska 2023 NSHM task testAlaska2023(type: Test) { description = "Test Alaska 2023 NSHM" diff --git a/nshms.yml b/nshms.yml index ed307186..674894c7 100644 --- a/nshms.yml +++ b/nshms.yml @@ -2,6 +2,20 @@ # NSHMs to use for unit tests and for deployments. #### nshms: + # Alaska 2023 NSHM + - + repo: nshm-alaska + tag: 2.1.0 + year: 2007 + deployments: + development: + instanceType: t4g.xlarge + staging: + instanceType: t4g.2xlarge + # TODO: Add to production when model is stable + # production: + # instanceType: c7g.8xlarge + # Alaska 2023 NSHM - repo: nshm-alaska diff --git a/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTests.java b/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTests.java index a0668cb4..58281e4e 100644 --- a/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTests.java +++ b/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTests.java @@ -90,7 +90,7 @@ class NshmTests { // run single model NshmModel nshmModel = - NshmTestUtils.loadModel(NSHMS.get("nshm-conus-2018")); + NshmTestUtils.loadModel(NSHMS.get("nshm-conus-2007")); NshmTestUtils.writeExpecteds(nshmModel); nshmModel.exec.shutdown(); @@ -102,6 +102,16 @@ class NshmTests { // } } + /** + * Test Alaska 2007 NSHM + * + * To run test: ./gradlew testAlaska2007 + */ + @Test + final void testAlaska2007() throws IOException { + NshmTestUtils.testNshm(NSHMS.get("nshm-alaska-2007")); + } + /** * Test Alaska 2023 NSHM * -- GitLab