Skip to content

Commit 388325b

Browse files
committed
Merge branch 'cop30'
2 parents 4ff4741 + e57ccfb commit 388325b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+404
-242
lines changed

applications/ams/ams/atl13.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def init_app(app):
5454
#
5555
# ATL13
5656
#
57-
@atl13.route('/atl13', methods=['GET', 'POST'])
57+
@atl13.route('/ATL13', methods=['GET', 'POST'])
5858
def atl13_route():
5959
single_lake = True
6060
try:

applications/ams/ams/atl24.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def init_app(app):
3838
#
3939
# ATL24
4040
#
41-
@atl24.route('/atl24', methods=['GET', 'POST'])
41+
@atl24.route('/ATL24', methods=['GET', 'POST'])
4242
def atl24_route():
4343
try:
4444
# execute query
@@ -72,7 +72,7 @@ def atl24_route():
7272
#
7373
# Granule
7474
#
75-
@atl24.route('/atl24/granule/<name>', methods=['GET', 'POST'])
75+
@atl24.route('/ATL24/granule/<name>', methods=['GET', 'POST'])
7676
def granule_route(name):
7777
try:
7878
# execute query

applications/ams/ams/usgs3dep.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Initialization
99
####################
1010

11-
usgs3dep = Blueprint('3dep', __name__, url_prefix='/ams')
11+
usgs3dep = Blueprint('usgs3dep', __name__, url_prefix='/ams')
1212

1313
####################
1414
# Module Functions
@@ -84,7 +84,7 @@ def build_time_query(clause, parms):
8484
#
8585
# 3DEP
8686
#
87-
@usgs3dep.route('/3dep', methods=['GET', 'POST'])
87+
@usgs3dep.route('/3DEP1M', methods=['GET', 'POST'])
8888
def usgs3dep_route():
8989
try:
9090
# execute query
@@ -131,7 +131,7 @@ def usgs3dep_route():
131131
#
132132
# Id
133133
#
134-
@usgs3dep.route('/3dep/id/<id>', methods=['GET', 'POST'])
134+
@usgs3dep.route('/3DEP1M/id/<id>', methods=['GET', 'POST'])
135135
def id_route(id):
136136
try:
137137
# execute query
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import json
22

33
def test_atl13_refid(client):
4-
response = client.post('/ams/atl13', json={"refid":5952002394})
4+
response = client.post('/ams/ATL13', json={"refid":5952002394})
55
data = json.loads(response.data.decode("utf-8"))
66
assert response.status_code == 200
77
assert data["source"] == "GRWL"
88

99
def test_atl13_name(client):
10-
response = client.get('/ams/atl13', json={"name": "Caspian Sea"})
10+
response = client.get('/ams/ATL13', json={"name": "Caspian Sea"})
1111
data = json.loads(response.data.decode("utf-8"))
1212
assert response.status_code == 200
1313
assert data["source"] == "HydroLAKES"
1414

1515
def test_atl13_coord(client):
16-
response = client.get('/ams/atl13', json={"coord": {"lon":-86.79835088109307, "lat":42.762733124439904}})
16+
response = client.get('/ams/ATL13', json={"coord": {"lon":-86.79835088109307, "lat":42.762733124439904}})
1717
data = json.loads(response.data.decode("utf-8"))
1818
assert response.status_code == 200
1919
assert data["source"] == "HydroLAKES"
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import json
22

33
def test_atl24_granule(client):
4-
response = client.get('/ams/atl24/granule/ATL24_20181014001920_02350103_006_02_002_01.h5')
4+
response = client.get('/ams/ATL24/granule/ATL24_20181014001920_02350103_006_02_002_01.h5')
55
data = json.loads(response.data.decode("utf-8"))
66
assert data["gt1r"]["season"] == 3
77
assert data["gt3r"]["bathy_photons"] == 16
@@ -10,40 +10,40 @@ def test_atl24_granule(client):
1010
assert beam in data
1111

1212
def test_atl24_time_range(client):
13-
response = client.post('/ams/atl24', json={"t0":"2018-10-14", "t1":"2018-10-15"})
13+
response = client.post('/ams/ATL24', json={"t0":"2018-10-14", "t1":"2018-10-15"})
1414
data = json.loads(response.data.decode("utf-8"))
1515
assert data["hits"] == 789
1616
assert len(data["granules"]) == 138
1717
assert "ATL24_20181014153336_02440113_006_02_002_01.h5" in data["granules"]
1818

1919
def test_atl24_season(client):
20-
response = client.post('/ams/atl24', json={"t0":"2019-09-30", "t1":"2019-10-02"})
20+
response = client.post('/ams/ATL24', json={"t0":"2019-09-30", "t1":"2019-10-02"})
2121
data = json.loads(response.data.decode("utf-8"))
2222
assert data["hits"] == 1507
23-
response = client.post('/ams/atl24', json={"t0":"2019-09-30", "t1":"2019-10-02", "season":0})
23+
response = client.post('/ams/ATL24', json={"t0":"2019-09-30", "t1":"2019-10-02", "season":0})
2424
data = json.loads(response.data.decode("utf-8"))
2525
assert data["hits"] == 289
26-
response = client.post('/ams/atl24', json={"t0":"2019-09-30", "t1":"2019-10-02", "season":1})
26+
response = client.post('/ams/ATL24', json={"t0":"2019-09-30", "t1":"2019-10-02", "season":1})
2727
data = json.loads(response.data.decode("utf-8"))
2828
assert data["hits"] == 296
29-
response = client.post('/ams/atl24', json={"t0":"2019-09-30", "t1":"2019-10-02", "season":2})
29+
response = client.post('/ams/ATL24', json={"t0":"2019-09-30", "t1":"2019-10-02", "season":2})
3030
data = json.loads(response.data.decode("utf-8"))
3131
assert data["hits"] == 449
32-
response = client.post('/ams/atl24', json={"t0":"2019-09-30", "t1":"2019-10-02", "season":3})
32+
response = client.post('/ams/ATL24', json={"t0":"2019-09-30", "t1":"2019-10-02", "season":3})
3333
data = json.loads(response.data.decode("utf-8"))
3434
assert data["hits"] == 473
3535

3636
def test_atl24_bathy_range(client):
37-
response = client.post('/ams/atl24', json={"t0":"2019-09-30", "t1":"2019-10-02", "photons0":100})
37+
response = client.post('/ams/ATL24', json={"t0":"2019-09-30", "t1":"2019-10-02", "photons0":100})
3838
data = json.loads(response.data.decode("utf-8"))
3939
assert data["hits"] == 859
40-
response = client.post('/ams/atl24', json={"t0":"2019-09-30", "t1": "2019-10-02", "meandepth1":10})
40+
response = client.post('/ams/ATL24', json={"t0":"2019-09-30", "t1": "2019-10-02", "meandepth1":10})
4141
data = json.loads(response.data.decode("utf-8"))
4242
assert data["hits"] == 844
43-
response = client.post('/ams/atl24', json={"t0":"2019-09-30", "t1":"2019-10-02", "mindepth1":10})
43+
response = client.post('/ams/ATL24', json={"t0":"2019-09-30", "t1":"2019-10-02", "mindepth1":10})
4444
data = json.loads(response.data.decode("utf-8"))
4545
assert data["hits"] == 1268
46-
response = client.post('/ams/atl24', json={"t0":"2019-09-30", "t1":"2019-10-02", "maxdepth0":30})
46+
response = client.post('/ams/ATL24', json={"t0":"2019-09-30", "t1":"2019-10-02", "maxdepth0":30})
4747
data = json.loads(response.data.decode("utf-8"))
4848
assert data["hits"] == 46
4949

@@ -55,6 +55,6 @@ def test_atl24_poly(client):
5555
{"lat": 21.222261686673306, "lon": -73.51303956051089},
5656
{"lat": 21.222261686673306, "lon": -73.78074797284968}
5757
]
58-
response = client.post(f'/ams/atl24', json={"poly":poly})
58+
response = client.post(f'/ams/ATL24', json={"poly":poly})
5959
data = json.loads(response.data.decode("utf-8"))
6060
assert data["hits"] == 408

applications/ams/tests/test_usgs3dep.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import json
22

33
def test_3dep_id(client):
4-
response = client.get('/ams/3dep/id/USGS_1M_10_x56y524_WA_KingCounty_2021_B21')
4+
response = client.get('/ams/3DEP1M/id/USGS_1M_10_x56y524_WA_KingCounty_2021_B21')
55
data = json.loads(response.data.decode("utf-8"))
66
assert data["id"] == 'USGS_1M_10_x56y524_WA_KingCounty_2021_B21'
77
assert data["assets"]["elevation"]["href"] == 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1m/Projects/WA_KingCounty_2021_B21/TIFF/USGS_1M_10_x56y524_WA_KingCounty_2021_B21.tif'
88
assert data["assets"]["elevation"]["raster:bands"][0]["data_type"] == 'float32'
99

1010
def test_3dep_time_range(client):
11-
response = client.post('/ams/3dep', json={"t0":"2018-10-14", "t1":"2018-10-15"})
11+
response = client.post('/ams/3DEP1M', json={"t0":"2018-10-14", "t1":"2018-10-15"})
1212
data = json.loads(response.data.decode("utf-8"))
1313
assert data["hits"] == 23
1414
assert data["features"][0]["id"] == "USGS_one_meter_x46y441_UT_Sanpete_2018", f'{data["features"][0]["id"]}'
@@ -21,7 +21,7 @@ def test_dep_poly(client):
2121
{"lon": -108.22632700395818, "lat": 38.86682337659025},
2222
{"lon": -107.88014597969254, "lat": 38.86682337659025}
2323
]
24-
response = client.post(f'/ams/3dep', json={"poly":poly})
24+
response = client.post(f'/ams/3DEP1M', json={"poly":poly})
2525
data = json.loads(response.data.decode("utf-8"))
2626
assert data["hits"] == 27
2727
assert data["features"][0]["id"] == "USGS_one_meter_x23y432_CO_MesaCo_QL2_UTM12_2016", f'{data["features"][0]["id"]}'

applications/provisioner/cluster.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ Resources:
685685
- ENVIRONMENT_VERSION=${EnvironmentVersion}
686686
- PROJECT_BUCKET=${ProjectBucket}
687687
- PROJECT_FOLDER=${ProjectFolder}
688+
- PROJECT_REGION=${AWS::Region}
688689
- ORCHESTRATOR=http://${IlbIP}:8050
689690
- ALERT_STREAM=${AlertStream}
690691
- TELEMETRY_STREAM=${TelemetryStream}

clients/python/examples/atl13_access.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"metadata": {},
6565
"outputs": [],
6666
"source": [
67-
"response = sliderule.source(\"ams/atl13\", {\"refid\": 5952002394})\n",
67+
"response = sliderule.source(\"ams/ATL13\", {\"refid\": 5952002394})\n",
6868
"response"
6969
]
7070
},
@@ -155,7 +155,7 @@
155155
"metadata": {},
156156
"outputs": [],
157157
"source": [
158-
"response = sliderule.source(\"ams/atl13\", {\"name\": \"Caspian Sea\"})\n",
158+
"response = sliderule.source(\"ams/ATL13\", {\"name\": \"Caspian Sea\"})\n",
159159
"response"
160160
]
161161
},
@@ -223,7 +223,7 @@
223223
"outputs": [],
224224
"source": [
225225
"coordinates = [-77.40162711974297, 38.48769543754824]\n",
226-
"response = sliderule.source(\"ams/atl13\", {\"coord\": {\"lon\": coordinates[0], \"lat\": coordinates[1]}})\n",
226+
"response = sliderule.source(\"ams/ATL13\", {\"coord\": {\"lon\": coordinates[0], \"lat\": coordinates[1]}})\n",
227227
"response"
228228
]
229229
},

clients/python/examples/atl24_access.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@
549549
"outputs": [],
550550
"source": [
551551
"# find all ATL24 granules that intersect the above polygon and have a maximum mean depth of 10m and are collected in the summer\n",
552-
"response = sliderule.source(\"ams/atl24\", {\"poly\": poly_str, \"meandepth1\": 10, \"season\": 2})\n",
552+
"response = sliderule.source(\"ams/ATL24\", {\"poly\": poly_str, \"meandepth1\": 10, \"season\": 2})\n",
553553
"response"
554554
]
555555
},
@@ -568,7 +568,7 @@
568568
"metadata": {},
569569
"outputs": [],
570570
"source": [
571-
"response = sliderule.source(\"ams/atl24\", {\"granule\": 'ATL24_20200201162415_05640610_006_01_002_01.h5'})\n",
571+
"response = sliderule.source(\"ams/ATL24\", {\"granule\": 'ATL24_20200201162415_05640610_006_01_002_01.h5'})\n",
572572
"response"
573573
]
574574
}

clients/python/tests/test_3dep.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_as_variable(self, init):
5858

5959
class Test3dep1m:
6060
def test_sample_ams(self, init):
61-
geojson = earthdata.ams(short_name='3dep1m', polygon=region)
61+
geojson = earthdata.ams(short_name='3DEP1M', polygon=region)
6262
gdf = raster.sample("3dep1m", [[-108.0,39.0]], {"catalog": json.dumps(geojson)})
6363
assert init
6464
assert len(gdf) >= 2

0 commit comments

Comments
 (0)