Skip to content

Commit 02493ec

Browse files
Merge pull request #105 from asfadmin/test
Patch Release 1.0.15 Update
2 parents 9ee0711 + ed397f3 commit 02493ec

3 files changed

Lines changed: 22 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,17 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
2828
------
2929
## [1.0.15](https://github.com/asfadmin/Discovery-SearchAPI-v3/compare/v1.0.14...v1.0.15)
3030
### Changed
31-
- bump asf-search to v12.0.5
31+
- bump asf-search to v12.0.6
3232
- DIST-ALERT-S1 product type to OPERA dataset
3333
- TileID searchable attribute
3434
- productVersion attribute
3535
- Fix edge-case with `platform` & `processingLevel` concept-id aliasing
3636
- Updated `NISAR` dataset/platform concept-ids
37+
- `utils.NISAR.get_nisar_orbit_ephemera()` method
38+
- NISAR `track` and `frame` fix when specifying science product type
39+
40+
### Added
41+
- Adds `services/utils/nisar_orbit_ephemera` endpoint, returns ordered list of latest NISAR orbit ephemera of POE, MOE, NOE, and FOE products
3742

3843
------
3944
## [1.0.14](https://github.com/asfadmin/Discovery-SearchAPI-v3/compare/v1.0.13...v1.0.14)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ujson==5.7.0
2222
uvicorn==0.21.1
2323
watchfiles==0.19.0
2424

25-
asf-search[asf-enumeration]==12.0.5
25+
asf-search[asf-enumeration]==12.0.6
2626
python-json-logger==2.0.7
2727

2828
pyshp==2.1.3

src/SearchAPI/application/application.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from . import constants
2323
from .SearchAPISession import SearchAPISession
2424
from asf_search.ASFSearchOptions.config import config as asf_config
25+
from asf_search import ASFSearchResults
2526
from asf_enumeration import aria_s1_gunw
2627

2728
asf_config['session'] = SearchAPISession()
@@ -256,6 +257,20 @@ async def kml_to_footprint(granule: str, cmr_token: Optional[str] = None, maturi
256257
headers=constants.DEFAULT_HEADERS
257258
)
258259

260+
@router.get('/services/utils/nisar_orbit_ephemera')
261+
async def get_nisar_orbit_ephemera():
262+
"""Returns the latest nisar orbit ephemera products for POE, MOE, NOE, and FOE in that order. Returns as jsonlite2"""
263+
try:
264+
oe_dict = asf.utils.get_nisar_orbit_ephemeras()
265+
results = ASFSearchResults([product for product in oe_dict.values()])
266+
response_info = as_output(results, 'jsonlite2')
267+
return Response(**response_info)
268+
except (asf.ASFSearchError, asf.CMRError, ValueError) as exc:
269+
raise HTTPException(
270+
detail=f"Search failed to find results: {exc}",
271+
status_code=400
272+
) from exc
273+
259274
# example: https://api.daac.asf.alaska.edu/services/redirect/NISAR_L2_STATIC/{granule_id}.h5
260275
# @router.get('/services/redirect/{short_name}/{granule_id}')
261276
# async def nisar_static_layer(short_name: str, granule_id: str):

0 commit comments

Comments
 (0)