diff --git a/gradle.properties b/gradle.properties index b71523789e4ad77920474381301812fe0680c398..7b6a62f65d9bc7b34e817f429b054e1617b86b0d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,8 +10,8 @@ micronautRxVersion = 2.1.1 micronautPluginVersion = 3.1.1 nodePluginVersion = 3.0.1 nodeVersion = 16.3.0 -nshmpLibVersion = 0.9.11 -nshmpWsUtilsVersion = 0.1.7 +nshmpLibVersion = 1.0.2 +nshmpWsUtilsVersion = 0.3.5 shadowVersion = 7.1.2 spotbugsVersion = 4.7.0 spotlessVersion = 6.0.4 diff --git a/settings.gradle b/settings.gradle index 744b46c7afcbbbd77979a962daeb9a80bdc5f3f1..bdd1c7b2080b3804cf304ff37d7a7eea1d726774 100644 --- a/settings.gradle +++ b/settings.gradle @@ -19,7 +19,7 @@ git { if (user && pass) { fetch("https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus.git", { name "nshmp-haz-dep--nshm-conus-2018" - branch "origin/5.1.0-rc" + branch "origin/5.1.1" }) } } diff --git a/src/main/java/gov/usgs/earthquake/nshmp/DisaggCalc.java b/src/main/java/gov/usgs/earthquake/nshmp/DisaggCalc.java index 9d9087042cfb6043df301e903a6f9dd2a9f4f6b8..950887ee013a5a5f0e6eecc918f36b0119d3296d 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/DisaggCalc.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/DisaggCalc.java @@ -174,7 +174,7 @@ public class DisaggCalc { Set<Imt> modelImts = model.config().hazard.imts; - Path out = HazardCalc.createOutputDir(config.output.directory); + Path out = HazardExport.createDirectory(config.output.directory); /* * If no IML columns present, disaggregate at IMTs and return period from diff --git a/src/main/java/gov/usgs/earthquake/nshmp/HazardCalc.java b/src/main/java/gov/usgs/earthquake/nshmp/HazardCalc.java index 6b26713efa45c0f9ef41397843d231e1237b7396..0133cb4e7135d4c262721e67ebed7b2af6127e29 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/HazardCalc.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/HazardCalc.java @@ -109,7 +109,7 @@ public class HazardCalc { log.info(config.toString()); log.info(""); - Path out = createOutputDir(config.output.directory); + Path out = HazardExport.createDirectory(config.output.directory); SiteData siteData = config.hazard.useSiteData ? model.siteData() : SiteData.EMPTY; @@ -208,18 +208,6 @@ public class HazardCalc { sites.size(), stopwatch)); } - /* Avoid clobbering exsting result directories via incrementing. */ - static Path createOutputDir(Path dir) throws IOException { - int i = 1; - Path outDir = dir; - while (Files.exists(outDir)) { - outDir = outDir.resolveSibling(dir.getFileName() + "-" + i); - i++; - } - Files.createDirectories(outDir); - return outDir; - } - private static ExecutorService initExecutor(int threadCount) { if (threadCount == 1) { return MoreExecutors.newDirectExecutorService(); diff --git a/src/main/java/gov/usgs/earthquake/nshmp/RateCalc.java b/src/main/java/gov/usgs/earthquake/nshmp/RateCalc.java index 097d10b1bd4c1f8473c51c0da7a014d4fbf2c362..c143872d92a9848130164b9e9ee00a08c174bc5e 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/RateCalc.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/RateCalc.java @@ -28,6 +28,7 @@ import com.google.common.util.concurrent.MoreExecutors; import gov.usgs.earthquake.nshmp.calc.CalcConfig; import gov.usgs.earthquake.nshmp.calc.EqRate; import gov.usgs.earthquake.nshmp.calc.EqRateExport; +import gov.usgs.earthquake.nshmp.calc.HazardExport; import gov.usgs.earthquake.nshmp.calc.Site; import gov.usgs.earthquake.nshmp.calc.Sites; import gov.usgs.earthquake.nshmp.calc.ThreadCount; @@ -109,7 +110,7 @@ public class RateCalc { log.info(config.toString()); log.info(""); - Path out = HazardCalc.createOutputDir(config.output.directory); + Path out = HazardExport.createDirectory(config.output.directory); List<Site> sites = HazardCalc.readSites( args[1], model.siteData(), OptionalDouble.empty(), log);