You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by sk...@apache.org on 2022/12/01 20:46:47 UTC

[incubator-sdap-nexus] branch cdms-subset-bugfix created (now 970df47)

This is an automated email from the ASF dual-hosted git repository.

skperez pushed a change to branch cdms-subset-bugfix
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git


      at 970df47  Updated changelog

This branch includes the following new commits:

     new 3e77c91  Remove platform requirement from subsetter. Platform can be any value, not just int
     new 970df47  Updated changelog

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-sdap-nexus] 02/02: Updated changelog

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skperez pushed a commit to branch cdms-subset-bugfix
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git

commit 970df47a04432e68b547f08ac073064a224035ce
Author: skorper <st...@gmail.com>
AuthorDate: Thu Dec 1 12:46:36 2022 -0800

    Updated changelog
---
 CHANGELOG.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2256ba7..29872b4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -60,6 +60,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - Fixed matchup insitu query loading on import; loads when needed instead
 - SDAP-406: Fixed `/timeSeriesSpark`comparison stats bug
 - Fixed excessive memory usage by `/cdmssubset`
+- Made `platforms` param optional in `/cdmssubset`, and removed int requirement
+- Updated OpenAPI specification for `/cdmssubset` to accurately reflect `platforms` and `parameter` field options.
 ### Security
 
 


[incubator-sdap-nexus] 01/02: Remove platform requirement from subsetter. Platform can be any value, not just int

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skperez pushed a commit to branch cdms-subset-bugfix
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git

commit 3e77c91a0cc8425cd24268110b7a99e52f1c9479
Author: skorper <st...@gmail.com>
AuthorDate: Thu Dec 1 12:42:12 2022 -0800

    Remove platform requirement from subsetter. Platform can be any value, not just int
---
 analysis/webservice/algorithms/doms/subsetter.py | 12 +-----------
 analysis/webservice/apidocs/openapi.yml          |  9 +++------
 2 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/analysis/webservice/algorithms/doms/subsetter.py b/analysis/webservice/algorithms/doms/subsetter.py
index 97b7569..182d56f 100644
--- a/analysis/webservice/algorithms/doms/subsetter.py
+++ b/analysis/webservice/algorithms/doms/subsetter.py
@@ -119,9 +119,6 @@ class DomsResultsRetrievalHandler(BaseDomsHandler.BaseDomsQueryCalcHandler):
             matchup_ds_names = []
 
         parameter_s = request.get_argument('parameter', None)
-        if parameter_s is None and len(matchup_ds_names) > 0:
-            raise NexusProcessingException(
-                reason='Parameter must be provided for insitu subset.' % parameter_s, code=400)
 
         try:
             start_time = request.get_start_datetime()
@@ -159,13 +156,6 @@ class DomsResultsRetrievalHandler(BaseDomsHandler.BaseDomsQueryCalcHandler):
                 reason='Depth Min should be less than Depth Max', code=400)
 
         platforms = request.get_argument('platforms', None)
-        if platforms is not None:
-            try:
-                p_validation = platforms.split(',')
-                p_validation = [int(p) for p in p_validation]
-                del p_validation
-            except:
-                raise NexusProcessingException(reason='platforms must be a comma-delimited list of integers', code=400)
 
         return primary_ds_name, matchup_ds_names, parameter_s, start_time, end_time, \
                bounding_polygon, depth_min, depth_max, platforms
@@ -318,7 +308,7 @@ class SubsetResult(NexusResults):
                 cols.append(datetime.utcfromtimestamp(result['time']).strftime('%Y-%m-%dT%H:%M:%SZ'))
 
                 for var in data_variables:
-                    cols.append(result['data'][var])
+                    cols.append(result['data'].get(var))
                 if i == 0:
                     rows.append(','.join(headers))
                 rows.append(','.join(map(str, cols)))
diff --git a/analysis/webservice/apidocs/openapi.yml b/analysis/webservice/apidocs/openapi.yml
index a4c21ac..c2d6f3d 100644
--- a/analysis/webservice/apidocs/openapi.yml
+++ b/analysis/webservice/apidocs/openapi.yml
@@ -418,12 +418,10 @@ paths:
         - in: query
           name: parameter
           description: |
-            The parameter of interest. One of 'sst', 'sss', 'wind'
-          required: true
+            The parameter of interest.
           schema:
             type: string
-            enum: ['sst', 'sss', 'wind']
-          example: sss
+          example: sea_surface_salinity
         - in: query
           name: depthMin
           description: |
@@ -448,8 +446,7 @@ paths:
           required: false
           schema:
             type: string
-            default: 1,2,3,4,5,6,7,8,9
-          example: 1,2,3,4,5,6,7,8,9
+          example: 3B,23
         - in: query
           name: output
           description: |