You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by nc...@apache.org on 2022/08/02 21:25:24 UTC
[incubator-sdap-nexus] branch master updated: Fix matchup bugs (#165)
This is an automated email from the ASF dual-hosted git repository.
nchung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git
The following commit(s) were added to refs/heads/master by this push:
new e62622f Fix matchup bugs (#165)
e62622f is described below
commit e62622f5b36dac15b74f260dae19594837c6d000
Author: Stepheny Perez <sk...@users.noreply.github.com>
AuthorDate: Tue Aug 2 14:25:20 2022 -0700
Fix matchup bugs (#165)
---
CHANGELOG.md | 3 +++
.../webservice/algorithms/doms/DatasetListQuery.py | 25 ++++++++++++++--------
analysis/webservice/apidocs/openapi.yml | 25 +++++++++++-----------
3 files changed, 31 insertions(+), 22 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 44639b1..054da4e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,10 +14,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- SDAP-371: Renamed `/domssubset` endpoint to `/cdmssubset`
- SDAP-396: Added saildrone insitu api to matchup
### Changed
+- domslist endpoint points to AWS insitu instead of doms insitu
### Deprecated
### Removed
+- removed dropdown from matchup doms endpoint secondary param
### Fixed
- Fix failing test_matchup unit test
+- Fixed bug in OpenAPI spec where both matchup endpoints shared the same id
- Fixed null value for count in matchup response
- SDAP-371: Fixed DOMS subset endpoint
- SDAP-397: Added depth to matchup insitu output
diff --git a/analysis/webservice/algorithms/doms/DatasetListQuery.py b/analysis/webservice/algorithms/doms/DatasetListQuery.py
index 0d2e77f..ed0ca7e 100644
--- a/analysis/webservice/algorithms/doms/DatasetListQuery.py
+++ b/analysis/webservice/algorithms/doms/DatasetListQuery.py
@@ -98,15 +98,22 @@ class DomsDatasetListQueryHandler(BaseDomsHandler.BaseDomsQueryCalcHandler):
for satellite in satellitesList:
satellite["metadata"] = self.getMetadataForSource(satellite["shortName"])
- for insitu in config.ENDPOINTS:
- depths, facets = self.getFacetsForInsituSource(insitu)
- insituList.append({
- "name": insitu["name"],
- "endpoint": insitu["url"],
- "metadata": self.getMetadataForSource(insitu["name"]),
- "depths": depths,
- "facets": facets
- })
+ for insitu in config.INSITU_PROVIDER_MAP:
+ provider = insitu['name']
+ for project in insitu['projects']:
+ project_name = project['name']
+ insituList.append({
+ 'name': project_name,
+ 'endpoint': f'{config.INSITU_API_ENDPOINT}?provider={provider}&project={project_name}',
+ 'metadata': {
+ 'Projects': [
+ {
+ 'ShortName': project_name,
+ 'LongName': project_name
+ }
+ ]
+ }
+ })
values = {
"satellite": satellitesList,
diff --git a/analysis/webservice/apidocs/openapi.yml b/analysis/webservice/apidocs/openapi.yml
index bb20c1a..be5e294 100644
--- a/analysis/webservice/apidocs/openapi.yml
+++ b/analysis/webservice/apidocs/openapi.yml
@@ -14,10 +14,11 @@ tags:
- name: Subsetting
description: Data Subsetting API
paths:
- /match_spark_doms:
+ /match_spark:
get:
- summary: Execute matchup request
+ summary: Execute matchup request (AWS insitu)
operationId: matchup
+ description: Endpoint to execute matchup request. If secondary dataset is insitu, use AWS insitu API.
tags:
- Matchup
parameters:
@@ -30,7 +31,7 @@ paths:
schema:
type: string
x-dspopulate:
- - satellite
+ - satellite
example: avhrr-l4-glob-v2-daily-ncei-ghrsst-sstblend-avhrr-oi-glob-v020-fv020
- in: query
name: secondary
@@ -43,8 +44,8 @@ paths:
schema:
type: string
x-dspopulate:
- - satellite
- - insitu
+ - satellite
+ - insitu
example: icoads
- in: query
name: startTime
@@ -126,7 +127,6 @@ paths:
required: false
schema:
type: string
- enum: ['sst', 'sss', 'wind']
default: sst
example: sst
- in: query
@@ -174,10 +174,11 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Error'
- /match_spark:
+ /match_spark_doms:
get:
- summary: Execute matchup request
- operationId: matchup
+ summary: Execute matchup request (DOMS insitu)
+ operationId: matchup_doms
+ description: Endpoint to execute matchup request. If secondary dataset is insitu, use DOMS insitu API.
tags:
- Matchup
parameters:
@@ -190,7 +191,7 @@ paths:
schema:
type: string
x-dspopulate:
- - satellite
+ - satellite
example: avhrr-l4-glob-v2-daily-ncei-ghrsst-sstblend-avhrr-oi-glob-v020-fv020
- in: query
name: secondary
@@ -202,9 +203,6 @@ paths:
required: true
schema:
type: string
- x-dspopulate:
- - satellite
- - insitu
example: icoads
- in: query
name: startTime
@@ -286,6 +284,7 @@ paths:
required: false
schema:
type: string
+ enum: ['sst', 'sss', 'wind']
default: sst
example: sst
- in: query