Repository: vgteam/sequenceTubeMap (js)

Issue:
Get rid of the dataPath in the examples and tests
We no longer use the `dataPath` field on view targets, but it is still set on the examples in `config.js` and still checked in the link to view tests. We should get rid of it and only use the one global `dataPath`.

Pull request description:
Remove references to dataPath
Fixes #390 

Patch:
diff --git a/docker/config.json b/docker/config.json
index 7fb8a7f..ea07c86 100644
--- a/docker/config.json
+++ b/docker/config.json
@@ -7,7 +7,6 @@
         {"files": [{"type": "graph", "name": "snp1kg-BRCA1.vg.xg"}]},
         {"files": [{"type": "read", "name": "NA12878-BRCA1.sorted.gam"}]}
       ],
-      "dataPath": "default",
       "region": "17:1-100",
       "bedFile": "snp1kg-BRCA1.bed",
       "dataType": "built-in"
@@ -18,7 +17,6 @@
         {"files": [{"type": "graph", "name": "x.vg.xg"}]},
         {"files": [{"type": "haplotype", "name": "x.vg.gbwt"}]}
       ],
-      "dataPath": "mounted",
       "dataType": "built-in",
       "region": "x:1-100"
     },
@@ -28,7 +26,6 @@
         {"files": [{"type": "graph", "name": "cactus.vg.xg"}]},
         {"files": [{"type": "read", "name": "cactus-NA12879.sorted.gam"}]}
       ],
-      "dataPath": "mounted",
       "bedFile": "cactus.bed",
       "region": "ref:1-100",
       "dataType": "built-in"
@@ -40,7 +37,6 @@
         {"files": [{"type": "read", "name": "cactus0_10.sorted.gam"}]},
         {"files": [{"type": "read", "name": "cactus10_20.sorted.gam"}]}
       ],
-      "dataPath": "mounted",
       "bedFile": "cactus.bed",
       "region": "ref:1-100",
       "dataType": "built-in"
diff --git a/src/App.js b/src/App.js
index b92cc3c..0530acc 100644
--- a/src/App.js
+++ b/src/App.js
@@ -66,9 +66,7 @@ class App extends Component {
     this.defaultViewTarget =
       urlParamsToViewTarget(document.location) ?? config.DATA_SOURCES[0];
     this.state = {
-      // These describe the files on the server side that we are working on.
-      // This is a little like dataPath (inside viewTarget, which specifies if we're using mounted/built-in data),
-      // but lets us toggle between data from
+      // These describe the files on the server side that we are working on. It lets us toggle between data from
       // the server and local test data
       dataOrigin: dataOriginTypes.API,
       viewTarget: this.defaultViewTarget,
diff --git a/src/Types.ts b/src/Types.ts
index 9ac28e0..3991c96 100644
--- a/src/Types.ts
+++ b/src/Types.ts
@@ -1,10 +1,6 @@
 // Type file for documentation
 // (not actually enforced by Typescript)
 
-// All the paths are scoped to a type on the server side.
-// This is the type of data paths we are working with, such as "mounted", "upload", or "default" - see server.js.
-type DataPath = "mounted" | "default" | "upload";
-
 // Describes whether a built-in example, user uploaded file, mounted, or synthetic example
 // Fills input for the "Data:" dropdown in the HeaderForm
 type DataType = "built-in" | "file-upload" | "mounted files" | "examples";
@@ -34,7 +30,6 @@ type ViewTarget = {
 
   // Non-essential to server, used for examples
   name?: string;
-  dataPath: DataPath;
   dataType: DataType;
 };
 
diff --git a/src/config.json b/src/config.json
index a7f10d2..27dc124 100644
--- a/src/config.json
+++ b/src/config.json
@@ -7,7 +7,6 @@
         {"trackFile": "exampleData/internal/snp1kg-BRCA1.vg.xg", "trackType": "graph", "trackColorSettings": {"mainPalette": "greys", "auxPalette": "ygreys"}},
         {"trackFile": "exampleData/internal/NA12878-BRCA1.sorted.gam", "trackType": "read"}
       ],
-      "dataPath": "default",
       "region": "17:1-100",
       "bedFile": "exampleData/internal/snp1kg-BRCA1.bed",
       "dataType": "built-in",
@@ -19,7 +18,6 @@
         {"trackFile": "exampleData/x.vg.xg", "trackType": "graph"},
         {"trackFile": "exampleData/x.vg.gbwt", "trackType": "haplotype"}
       ],
-      "dataPath": "mounted",
       "dataType": "built-in",
       "region": "x:1-100"
     },
@@ -29,7 +27,6 @@
         {"trackFile": "exampleData/cactus.vg.xg", "trackType": "graph"},
         {"trackFile": "exampleData/cactus-NA12879.sorted.gam", "trackType": "read"}
       ],
-      "dataPath": "mounted",
       "bedFile": "exampleData/cactus.bed",
       "region": "ref:1-100",
       "dataType": "built-in"
@@ -41,7 +38,6 @@
         {"trackFile": "exampleData/cactus0_10.sorted.gam", "trackType": "read"},
         {"trackFile": "exampleData/cactus10_20.sorted.gam", "trackType": "read"}
       ],
-      "dataPath": "mounted",
       "bedFile": "exampleData/cactus.bed",
       "region": "ref:1-100",
       "dataType": "built-in"
@@ -51,7 +47,6 @@
   "dataPath": "exampleData",
   "internalDataPath": "exampleData/internal/",
   "tempDirPath": "temp",
-
   "fetchTimeout": 15,
   "maxFileSizeBytes": 1000000000,
 


Test patch:
diff --git a/src/end-to-end.test.js b/src/end-to-end.test.js
index 76be1cb..923a3f8 100644
--- a/src/end-to-end.test.js
+++ b/src/end-to-end.test.js
@@ -339,7 +339,7 @@ describe("When we wait for it to load", () => {
 it("produces correct link for view before & after go is pressed", async () => {
   // First test that after pressing go, the link reflects the dat form
   const expectedLinkBRCA1 =
-    "http://localhost?name=snp1kg-BRCA1&tracks[0][trackFile]=exampleData%2Finternal%2Fsnp1kg-BRCA1.vg.xg&tracks[0][trackType]=graph&tracks[0][trackColorSettings][mainPalette]=greys&tracks[0][trackColorSettings][auxPalette]=ygreys&tracks[1][trackFile]=exampleData%2Finternal%2FNA12878-BRCA1.sorted.gam&tracks[1][trackType]=read&dataPath=default&region=17%3A1-100&bedFile=exampleData%2Finternal%2Fsnp1kg-BRCA1.bed&dataType=built-in&simplify=false";
+    "http://localhost?name=snp1kg-BRCA1&tracks[0][trackFile]=exampleData%2Finternal%2Fsnp1kg-BRCA1.vg.xg&tracks[0][trackType]=graph&tracks[0][trackColorSettings][mainPalette]=greys&tracks[0][trackColorSettings][auxPalette]=ygreys&tracks[1][trackFile]=exampleData%2Finternal%2FNA12878-BRCA1.sorted.gam&tracks[1][trackType]=read&region=17%3A1-100&bedFile=exampleData%2Finternal%2Fsnp1kg-BRCA1.bed&dataType=built-in&simplify=false";
   // Set up dropdown
   await act(async () => {
     let dropdown = document.getElementById("dataSourceSelect");