From 52a63126170c88fecbe79eead84d52cbf0fc83f7 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Tue, 6 Jul 2021 16:31:00 -0600 Subject: [PATCH 1/2] rename to nshmp-haz --- .gitlab-ci.yml | 8 ++++---- CONTRIBUTING.md | 2 +- Dockerfile | 6 +++--- README.md | 2 +- build.gradle | 2 +- code.json | 12 ++++++------ docs/pages/Building-&-Running.md | 2 +- etc/matlab/gmmBatchExample.m | 4 ++-- etc/python/gmmBatchExample.py | 4 ++-- gradle/ext.gradle | 2 +- scripts/docker-config.inc.sh | 2 +- settings.gradle | 2 +- .../java/gov/usgs/earthquake/nshmp/HazardCalc.java | 6 +++--- .../usgs/earthquake/nshmp/www/SourceController.java | 2 +- src/main/resources/application.yml | 4 ++-- src/main/resources/swagger/index.html | 4 ++-- ws.Dockerfile | 4 ++-- 17 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 29d0979a4..d2a0e9892 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,7 +48,7 @@ Build Image Haz: BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/java:11 FROM_IMAGE=${DEVOPS_REGISTRY}usgs/java:11 CI_JOB_TOKEN=${CI_JOB_TOKEN} - UPSTREAM_PATH: ghsc/nshmp/nshmp-haz-v2 + UPSTREAM_PATH: ghsc/nshmp/nshmp-haz Build Image WS: extends: @@ -60,13 +60,13 @@ Build Image WS: FROM_IMAGE=${DEVOPS_REGISTRY}usgs/java:11 CI_JOB_TOKEN=${CI_JOB_TOKEN} DOCKERFILE: ws.Dockerfile - UPSTREAM_PATH: ghsc/nshmp/nshmp-haz-v2 + UPSTREAM_PATH: ghsc/nshmp/nshmp-haz Build Lambda: artifacts: expire_in: 1 yr paths: - - build/libs/nshmp-haz-v2.jar + - build/libs/nshmp-haz.jar - build/libs/nshmp-haz-dependencies.zip extends: - .gradle @@ -175,4 +175,4 @@ Trigger nshmp-haz-ws CDK: stage: trigger variables: REF: main - UPSTREAM_PATH: ghsc/nshmp/nshmp-haz-v2 + UPSTREAM_PATH: ghsc/nshmp/nshmp-haz diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eaac6832b..58cb309d7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,6 +10,6 @@ If you have direct contributions you would like considered for incorporation into the project you can [fork this repository][2] and [submit a merge request][3] for review. -[1]: https://code.usgs.gov/ghsc/nshmp/nshmp-haz-v2/-/issues +[1]: https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/issues [2]: https://docs.gitlab.com/ee/gitlab-basics/fork-project.html [3]: https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html diff --git a/Dockerfile b/Dockerfile index d1e5a2b6f..3a5e5a678 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,14 +2,14 @@ # Run hazard jar file. # # Running Hazard: -# docker pull code.chs.usgs.gov:5001/ghsc/nshmp/images/nshmp-haz-v2; +# docker pull code.chs.usgs.gov:5001/ghsc/nshmp/images/nshmp-haz; # docker run \ # -e PROGRAM=<deagg | deagg-epsilon | deagg-iml | hazard | hazard-2018 | rate> \ # -e MODEL=<WUS_20[08|14|18] | CEUS_20[08|14|18] | COUS_20[08|14|18] | AK_2007 | HI_2020> \ # -v /absolute/path/to/sites/file:/app/sites.<geojson | csv> \ # -v /absolute/path/to/config/file:/app/config.json \ # -v /absolute/path/to/output:/app/output \ -# code.chs.usgs.gov:5001/ghsc/nshmp/images/nshmp-haz-v2; +# code.chs.usgs.gov:5001/ghsc/nshmp/images/nshmp-haz; # # Build locally: # docker build @@ -20,7 +20,7 @@ ARG BUILD_IMAGE=usgs/java:11 ARG FROM_IMAGE=usgs/java:11 -ARG project=nshmp-haz-v2 +ARG project=nshmp-haz ARG builder_workdir=/app/${project} ARG libs_dir=${builder_workdir}/build/libs diff --git a/README.md b/README.md index c6523b5ba..203d474f0 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,4 @@ command line applications and web service classes and relies on the [*nshmp-lib*](https://code.usgs.gov/ghsc/nshmp/nshmp-lib) hazard library, among other dependencies. -Please see the [docs](https://code.usgs.gov/ghsc/nshmp/nshmp-haz-v2/-/tree/master/docs) for more information. +Please see the [docs](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/master/docs) for more information. diff --git a/build.gradle b/build.gradle index e220de132..cf42f93f7 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ * Then build the JAR file: ./gradlew assemble * * One can then specify the model to run in the services: - * java -jar build/libs/nshmp-haz-v2.jar --models=/path/to/models + * java -jar build/libs/nshmp-haz.jar --models=/path/to/models * * Where <MODEL> is one of the model enums in nshmp.www.Model */ diff --git a/code.json b/code.json index 900a2a7d2..ba79cd172 100644 --- a/code.json +++ b/code.json @@ -1,6 +1,6 @@ [ { - "name": "nshmp-haz-v2", + "name": "nshmp-haz", "organization": "U.S. Geological Survey", "description": "National Seismic Hazard Mapping Project (NSHMP) software stack", "version": "#.#.#", @@ -12,15 +12,15 @@ "licenses": [ { "name": "Public Domain, CC0-1.0", - "URL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz-v2/-/blob/master/LICENSE.md" + "URL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/blob/master/LICENSE.md" } ] }, - "repositoryURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz-v2/", - "homepageURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz-v2/-/tree/master/docs", - "downloadURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz-v2/-/releases/tag/v#.#.#", - "disclaimerURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz-v2/-/blob/master/DISCLAIMER.md", + "repositoryURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz/", + "homepageURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/master/docs", + "downloadURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/releases/tag/v#.#.#", + "disclaimerURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/blob/master/DISCLAIMER.md", "vcs": "git", "laborHours": 1200, diff --git a/docs/pages/Building-&-Running.md b/docs/pages/Building-&-Running.md index 2184c25f1..7f78c9201 100644 --- a/docs/pages/Building-&-Running.md +++ b/docs/pages/Building-&-Running.md @@ -48,7 +48,7 @@ either a comma-delimited (CSV) or [GeoJSON](http://geojson.org) file. The path t be supplied as a third argument. It can be used to override any calculation settings; if absent [default](calculation-configuration) values are used. -See the [examples](/ghsc/nshmp/nshmp-haz-v2/-/tree/master/etc/examples) directory for more details. +See the [examples](/ghsc/nshmp/nshmp-haz/-/tree/master/etc/examples) directory for more details. ### Computing Disaggregations diff --git a/etc/matlab/gmmBatchExample.m b/etc/matlab/gmmBatchExample.m index 344532d11..e61fff510 100644 --- a/etc/matlab/gmmBatchExample.m +++ b/etc/matlab/gmmBatchExample.m @@ -1,4 +1,4 @@ -%% nshmp-haz-v2 Ground Motion Model (GMM) batch processing example script +%% nshmp-haz Ground Motion Model (GMM) batch processing example script clear; @@ -31,7 +31,7 @@ inputs = fileread('gmm-inputs.csv'); % All GMM services are available to call for batch processing. host = 'http://localhost:8080'; -service = '/nshmp-haz-v2/gmm/spectra'; +service = '/nshmp-haz/gmm/spectra'; query = 'gmm=AB_06_PRIME&gmm=CAMPBELL_03&gmm=FRANKEL_96'; diff --git a/etc/python/gmmBatchExample.py b/etc/python/gmmBatchExample.py index 130267fba..ff5c3dd4d 100644 --- a/etc/python/gmmBatchExample.py +++ b/etc/python/gmmBatchExample.py @@ -1,4 +1,4 @@ -## nshmp-haz-v2 Ground Motion Model (GMM) batch processing example script +## nshmp-haz Ground Motion Model (GMM) batch processing example script import requests @@ -35,7 +35,7 @@ file.close() # All GMM services are available to call for batch processing. host = 'http://localhost:8080' -service = '/nshmp-haz-v2/gmm/spectra' +service = '/nshmp-haz/gmm/spectra' url = host + service diff --git a/gradle/ext.gradle b/gradle/ext.gradle index 62ff00739..ddd9896f6 100644 --- a/gradle/ext.gradle +++ b/gradle/ext.gradle @@ -2,7 +2,7 @@ * Extra properties config. */ ext { - projectName = 'nshmp-haz-v2' + projectName = 'nshmp-haz' propsPath = '/classes/java/main/service.properties' diff --git a/scripts/docker-config.inc.sh b/scripts/docker-config.inc.sh index 2f1042606..e8cba0878 100644 --- a/scripts/docker-config.inc.sh +++ b/scripts/docker-config.inc.sh @@ -19,7 +19,7 @@ readonly CONTEXT_PATH="${CONTEXT_PATH:-/}"; readonly JAVA_XMX="${JAVA_XMX:-8g}"; readonly MODEL=$(echo "${MODEL:-CONUS_2008}" | awk \{'print toupper($0)'\}); readonly NSHM_VERSION="${NSHM_VERSION:-master}"; -readonly PROJECT="${PROJECT:-nshmp-haz-v2}"; +readonly PROJECT="${PROJECT:-nshmp-haz}"; readonly PROGRAM=$(echo "${PROGRAM:-hazard}" | awk \{'print tolower($0)'\}); readonly WUS="Western US"; readonly VERSION_2014B="v4.1.1"; diff --git a/settings.gradle b/settings.gradle index 61152b0cb..21a222568 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,7 +2,7 @@ plugins { id "com.alexvasilkov.git-dependencies" version "2.0.1" } -rootProject.name = "nshmp-haz-v2" +rootProject.name = "nshmp-haz" /** * Download default model, nshm-conus-2018. diff --git a/src/main/java/gov/usgs/earthquake/nshmp/HazardCalc.java b/src/main/java/gov/usgs/earthquake/nshmp/HazardCalc.java index 4e788b9a8..dec96fb77 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/HazardCalc.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/HazardCalc.java @@ -54,15 +54,15 @@ public class HazardCalc { * argument. * * <p>Refer to the nshmp-haz <a - * href="https://code.usgs.gov/ghsc/nshmp/nshmp-haz-v2/-/wikis" + * href="https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/wikis" * target="_top">wiki</a> for comprehensive descriptions of source models, * configuration files, site files, and hazard calculations. * * @see <a - * href="https://code.usgs.gov/ghsc/nshmp/nshmp-haz-v2/-/wikis/Building-&-Running" + * href="https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/wikis/Building-&-Running" * target="_top"> nshmp-haz wiki</a> * @see <a - * href="https://code.usgs.gov/ghsc/nshmp/nshmp-haz-v2/-/tree/master/etc/examples" + * href="https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/master/etc/examples" * target="_top"> example calculations</a> */ public static void main(String[] args) { diff --git a/src/main/java/gov/usgs/earthquake/nshmp/www/SourceController.java b/src/main/java/gov/usgs/earthquake/nshmp/www/SourceController.java index d60708d38..b5713e6d5 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/www/SourceController.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/www/SourceController.java @@ -20,7 +20,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; * default model used * * <p> To run the Micronaut jar file with a model: java -jar - * path/to/nshmp-haz-v2.jar -model=<{@code Model}> + * path/to/nshmp-haz.jar -model=<{@code Model}> * * * @author U.S. Geological Survey diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index fc040527b..d875d42d0 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -14,11 +14,11 @@ nshmp-haz: ## # The basin service url # To specify the url to use: - # java -jar build/libs/nshmp-haz-v2.jar --basin-service-url= + # java -jar build/libs/nshmp-haz.jar --basin-service-url= basin-service-url: ${basin-service-url:https://staging-earthquake.usgs.gov/nshmp/ws/data/basin} ## # The path to the models. # To specify the model to use: - # java -jar build/libs/nshmp-haz-v2.jar --models=<path/to/models> + # java -jar build/libs/nshmp-haz.jar --models=<path/to/models> model-path: ${models:libs/nshmp-haz-dep--nshm-conus-2018} diff --git a/src/main/resources/swagger/index.html b/src/main/resources/swagger/index.html index bf2ed5ab0..8a4003d3a 100644 --- a/src/main/resources/swagger/index.html +++ b/src/main/resources/swagger/index.html @@ -39,11 +39,11 @@ <div id="swagger-ui"></div> <footer class="nshmp-template-footer"> - <a href="https://code.usgs.gov/ghsc/nshmp/nshmp-haz-v2/-/blob/master/LICENSE.md"> + <a href="https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/blob/master/LICENSE.md"> License </a> - <a href="https://code.usgs.gov/ghsc/nshmp/nshmp-haz-v2/-/blob/master/DISCLAIMER.md"> + <a href="https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/blob/master/DISCLAIMER.md"> Disclaimer </a> diff --git a/ws.Dockerfile b/ws.Dockerfile index bcc535bea..c065eb70b 100644 --- a/ws.Dockerfile +++ b/ws.Dockerfile @@ -49,13 +49,13 @@ ENV MODELS_DIRECTORY="/models" WORKDIR /app -COPY --from=builder /app/build/libs/nshmp-haz-v2.jar . +COPY --from=builder /app/build/libs/nshmp-haz.jar . VOLUME [ "${MODELS_DIRECTORY}" ] EXPOSE 8080 -ENTRYPOINT java -jar nshmp-haz-v2.jar \ +ENTRYPOINT java -jar nshmp-haz.jar \ "-Xms${JAVA_XMS}" \ "-Xmx${JAVA_XMX}" \ "-Dmicronaut.server.context-path=${CONTEXT_PATH}" \ -- GitLab From 4108ce8d5c4e8e9a461f93dc27d388dcebf84f10 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Tue, 6 Jul 2021 16:35:22 -0600 Subject: [PATCH 2/2] rename to nshmp-haz --- docs/pages/Building-&-Running.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/Building-&-Running.md b/docs/pages/Building-&-Running.md index 7f78c9201..2184c25f1 100644 --- a/docs/pages/Building-&-Running.md +++ b/docs/pages/Building-&-Running.md @@ -48,7 +48,7 @@ either a comma-delimited (CSV) or [GeoJSON](http://geojson.org) file. The path t be supplied as a third argument. It can be used to override any calculation settings; if absent [default](calculation-configuration) values are used. -See the [examples](/ghsc/nshmp/nshmp-haz/-/tree/master/etc/examples) directory for more details. +See the [examples](/ghsc/nshmp/nshmp-haz-v2/-/tree/master/etc/examples) directory for more details. ### Computing Disaggregations -- GitLab