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/08/22 15:33:00 UTC

[incubator-sdap-nexus] 03/06: Addressed bug introduced by proxy

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

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

commit c226913cd2dec45efc39c6dad2cc3354e1dee02c
Author: skorper <st...@gmail.com>
AuthorDate: Wed Aug 10 16:46:55 2022 -0700

    Addressed bug introduced by proxy
---
 analysis/webservice/algorithms/doms/insitu.py    | 4 ++--
 analysis/webservice/algorithms/doms/subsetter.py | 2 +-
 analysis/webservice/algorithms_spark/Matchup.py  | 4 +++-
 analysis/webservice/apidocs/openapi.yml          | 4 ++--
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/analysis/webservice/algorithms/doms/insitu.py b/analysis/webservice/algorithms/doms/insitu.py
index 6aec6ec..6368a03 100644
--- a/analysis/webservice/algorithms/doms/insitu.py
+++ b/analysis/webservice/algorithms/doms/insitu.py
@@ -20,7 +20,7 @@ def query_insitu_schema():
 
 
 def query_insitu(dataset, variable, start_time, end_time, bbox, platform, depth_min, depth_max,
-               items_per_page=1000, session=None):
+               items_per_page=20000, session=None):
     """
     Query insitu API, page through results, and aggregate
     """
@@ -63,7 +63,7 @@ def query_insitu(dataset, variable, start_time, end_time, bbox, platform, depth_
         else:
             response = requests.get(next_page_url, params=params)
 
-        logging.debug(f'Insitu request {response.url}')
+        logging.info(f'Insitu request {response.url}')
 
         response.raise_for_status()
         insitu_page_response = response.json()
diff --git a/analysis/webservice/algorithms/doms/subsetter.py b/analysis/webservice/algorithms/doms/subsetter.py
index 12021b6..3f625d0 100644
--- a/analysis/webservice/algorithms/doms/subsetter.py
+++ b/analysis/webservice/algorithms/doms/subsetter.py
@@ -94,7 +94,7 @@ class DomsResultsRetrievalHandler(BaseDomsHandler.BaseDomsQueryCalcHandler):
     }
     singleton = True
 
-    def __init__(self, tile_service_factory):
+    def __init__(self, tile_service_factory, **kwargs):
         BaseDomsHandler.BaseDomsQueryCalcHandler.__init__(self, tile_service_factory)
         self.log = logging.getLogger(__name__)
 
diff --git a/analysis/webservice/algorithms_spark/Matchup.py b/analysis/webservice/algorithms_spark/Matchup.py
index 5ae74ea..b85c7b4 100644
--- a/analysis/webservice/algorithms_spark/Matchup.py
+++ b/analysis/webservice/algorithms_spark/Matchup.py
@@ -279,7 +279,9 @@ class Matchup(NexusCalcSparkHandler):
         threading.Thread(target=do_result_insert).start()
 
         # Get only the first "result_size_limit" results
-        matches = matches[0:result_size_limit]
+        # '0' means returns everything
+        if result_size_limit > 0:
+            matches = matches[0:result_size_limit]
 
         result = DomsQueryResults(results=matches, args=args,
                                   details=details, bounds=None,
diff --git a/analysis/webservice/apidocs/openapi.yml b/analysis/webservice/apidocs/openapi.yml
index be5e294..5e288b2 100644
--- a/analysis/webservice/apidocs/openapi.yml
+++ b/analysis/webservice/apidocs/openapi.yml
@@ -78,11 +78,11 @@ paths:
           example: -45,15,-30,30
         - in: query
           name: platforms
-          description: Platforms to include for matchup consideration
+          description: Platforms to include for matchup consideration. Platform depends on which insitu dataset is selected. See `/get_cdms_schema` endpoint for a list of valid platform ids.
           required: true
           schema:
             type: string
-          example: 1,2,3,4,5,6,7,8,9
+          example: 30
         - in: query
           name: depthMin
           description: |