Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-

-->
-----
## [1.0.17](https://github.com/asfadmin/Discovery-SearchAPI-v3/compare/v1.0.15...v1.0.16)
### Changed
- Searches with `granule_list` can use other search filters
- bump asf-search to v12.2.2
- Baseline bugfix
- S1D support
- OPERA-S1 file sizes in jsonlite2 output

------
## [1.0.16](https://github.com/asfadmin/Discovery-SearchAPI-v3/compare/v1.0.15...v1.0.16)
### Changed
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ujson==5.7.0
uvicorn==0.21.1
watchfiles==0.19.0

asf-search[asf-enumeration]==12.1.0
asf-search[asf-enumeration]==12.2.2
python-json-logger==2.0.7

pyshp==2.1.3
Expand Down
9 changes: 5 additions & 4 deletions src/SearchAPI/application/asf_opts.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,11 @@ def get_asf_opts(params: dict) -> asf.ASFSearchOptions:
"Unbound wildcard searches not supported with SearchAPI."
"Specify `maxresults` or use the asf-search python module directly (try `output=python` to download the equivalent script)"
)
if len([param for param in params if param not in ["collections", "maxResults"]]) > 1:
raise ValueError(
'Cannot use search keywords "granule_list/product_list" with other search params'
)
if "product_list" in params:
if len([param for param in params if param not in ["collections", "maxResults"]]) > 1:
raise ValueError(
'Cannot use search keyword "product_list" with other search params'
)

if (flight_direction := params.get("flightDirection")) is not None:
if isinstance(flight_direction, str) and len(flight_direction):
Expand Down
25 changes: 25 additions & 0 deletions tests/yml_tests/test_URLs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,31 @@ tests:
expected file: x-python
expected code: 200

- granule_list with platform valid:
granule_list: S1B_S6_GRDH_1SDV_20190911T214309_20190911T214338_017995_021E10_5CCB
platform: S1
output: json

expected file: json
expected code: 200

- granule_list with date valid:
granule_list: S1B_S6_GRDH_1SDV_20190911T214309_20190911T214338_017995_021E10_5CCB
start: "2019-01-01T00:00:00Z"
output: json

expected file: json
expected code: 200

- granule_list with other keywords valid:
intersectsWith: polygon((-91.1083+41.7191,-83.9568+41.4233,-83.9916+43.9781,-91.7194+42.8556,-91.1083+41.7191))
platform: Sentinel-1A, Sentinel-1B
granule_list: S1A_IW_GRDH_1SDV_20220201T000545_20220201T000612_041712_04F694_C8B2
output: json

expected file: json
expected code: 200

#In CMR reporting script, we report groupid as null on most datasets. Some datasets updated to expect blank file & moved to partial pass yaml
- groupid Sentinel:
groupid: S1B_S1DV_0492_0497_017567_041
Expand Down
23 changes: 0 additions & 23 deletions tests/yml_tests/test_URLs_expected_400.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,30 +202,7 @@ tests:
expected file: error json
expected code: 400

- granule_list with platform invalid:
granule_list: S1B_S6_GRDH_1SDV_20190911T214309_20190911T214338_017995_021E10_5CCB
platform: S1
output: csv

expected file: error json
expected code: 400

- granule_list with date invalid:
granule_list: S1B_S6_GRDH_1SDV_20190911T214309_20190911T214338_017995_021E10_5CCB
start: "2019-01-01T00:00:00Z"
output: csv

expected file: error json
expected code: 400

- granule_list with other keywords invalid:
intersectsWith: polygon((-91.1083+41.7191,-83.9568+41.4233,-83.9916+43.9781,-91.7194+42.8556,-91.1083+41.7191))
platform: Sentinel-1A,Sentinel-1B
granule_list: S1A_IW_GRDH_1SDV_20220201T000545_20220201T000612_041712_04F694_C8B2
output: json

expected file: error json
expected code: 400

- granule_list with product_list invalid:
granule_list: S1B_S6_GRDH_1SDV_20190911T214309_20190911T214338_017995_021E10_5CCB
Expand Down
Loading
Loading