From 93206d687a4a4a759dda24f307db6e2d4e14602a Mon Sep 17 00:00:00 2001
From: bclayton-usgs <bclayton@usgs.gov>
Date: Wed, 26 Feb 2020 12:26:26 -0700
Subject: [PATCH] remove main method

---
 build.gradle                                  |  1 +
 .../nshmp/netcdf/NshmpNetcdfReader.java       | 40 -------------------
 2 files changed, 1 insertion(+), 40 deletions(-)

diff --git a/build.gradle b/build.gradle
index 45cce1b..d55d9f3 100644
--- a/build.gradle
+++ b/build.gradle
@@ -47,6 +47,7 @@ check.dependsOn jacocoTestReport
 
 /* Add HTML reports to SpotBugs */
 tasks.withType(com.github.spotbugs.SpotBugsTask) {
+  ignoreFailures = false // TODO remove when nshmp-lib is updated
   reports {
     xml.enabled = false
     html.enabled = true
diff --git a/src/main/java/gov/usgs/earthquake/nshmp/netcdf/NshmpNetcdfReader.java b/src/main/java/gov/usgs/earthquake/nshmp/netcdf/NshmpNetcdfReader.java
index 583492a..12e099c 100644
--- a/src/main/java/gov/usgs/earthquake/nshmp/netcdf/NshmpNetcdfReader.java
+++ b/src/main/java/gov/usgs/earthquake/nshmp/netcdf/NshmpNetcdfReader.java
@@ -446,46 +446,6 @@ public class NshmpNetcdfReader {
 
   }
 
-  public static void main(String[] args) {
-
-    String filename = args[0];
-
-    double targetLon = -105.23;
-    double targetLat = 39.2;
-    // double targetLon = -65.0;
-    // double targetLat = 50.0;
-    Location targetSite = Location.create(targetLat, targetLon);
-
-    // initialize reader
-    NshmpNetcdfReader nshmpNCDR = null;
-    try {
-      System.err.println("attempting to open file ");
-      nshmpNCDR = new NshmpNetcdfReader(filename);
-    } catch (IOException e) {
-      System.err.println("Failed to initialize NshmpNetcdfReader");
-      e.printStackTrace();
-    }
-
-    // test Iml map - are Imls consistent for a given Imt across SiteClass?
-    if (checkConsistentImls(nshmpNCDR.nshmpCoords.imlMap, nshmpNCDR.nshmpCoords.siteClassEnums,
-        nshmpNCDR.nshmpCoords.imts)) {
-      System.err.println("Iml sets are consistent for each Imt across all site classes\n");
-    }
-
-    BoundingHazards boundingHazards = new BoundingHazards(nshmpNCDR, targetSite);
-
-    for (int iSc = 0; iSc < nshmpNCDR.nshmpCoords.nVs; iSc++) {
-      for (int iImt = 0; iImt < nshmpNCDR.nshmpCoords.nImt; iImt++) {
-        System.err.println("\n");
-        boundingHazards.dumpBoundingPlusTarget(mapVsToEnum2018(nshmpNCDR.nshmpCoords.vs30s[iSc]),
-            nshmpNCDR.nshmpCoords.imts.get(iImt));
-      }
-    }
-    // System.err.println("\n");
-    // boundingHazards.dumpBoundingPlusTarget(mapVsToEnum2018(150), Imt.PGA);
-    System.err.println("\n** done **");
-  }
-
   /*
    * Return hazard curves for four closest grid points as a List of:
    * Map<SiteClass, Map<Imt, XySequence(iml,hazard)>>
-- 
GitLab