[ 
https://issues.apache.org/jira/browse/CLIMATE-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15537076#comment-15537076
 ] 

ASF GitHub Bot commented on CLIMATE-875:
----------------------------------------

Github user Omkar20895 commented on a diff in the pull request:

    https://github.com/apache/climate/pull/411#discussion_r81418144
  
    --- Diff: ocw/data_source/podaac_datasource.py ---
    @@ -41,9 +42,39 @@ def convert_times_to_datetime(time):
         parsed_time = utime(units)
         return [parsed_time.num2date(x) for x in time[:]]
     
    +def list_available_extract_granule_dataset_ids():
    +    '''Convenience function which returns an up-to-date \
    +        list of available granule dataset id's which can be \
    +        used in the granule extraction service.
     
    -def load_dataset(variable, datasetId='', name=''):
    -    '''Loads a Dataset from PODAAC
    +    :returns: a comma-seperated list of granule dataset id's.
    +
    +    '''
    +    podaac_utils = PodaacUtils()
    +    return podaac_utils.list_available_extract_granule_dataset_ids()
    +
    +def subset_granule(input_file_path=''):
    +    '''Subset Granule service allows users to Submit subset jobs. \
    +        Use of this service should be preceded by a Granule Search in \
    +        order to identify and generate a list of granules to be subsetted.
    +
    +    :param input_file_path: path to a json file which contains the \
    +        the request that you want to send to PO.DAAC
    +    :type input_file_path: :mod:`string`
    +
    +    :returns: a token on successful request reception. This can be \
    +        further used to check the status of the request.
    +
    +    '''
    +    podaac = Podaac()
    +    status = podaac.subset_status(podaac.granule_subset(input_file_path))
    +    print("Granule subsetting initiated with request tracking token '%s'." 
% status)
    +    while status is not "200":
    --- End diff --
    
    Instead of 200 it should be the string "done" here, because as much as I 
have noticed subset_token returns the following status 
    - "submitted" : returned on successful submission
    - "error" : returned when there is error in the JSON POST request.
    - "unknown" : I am uncertain about this.
    - "done" : returned when subsetting is done.


> Upgrade to Podaacpy 1.3.0
> -------------------------
>
>                 Key: CLIMATE-875
>                 URL: https://issues.apache.org/jira/browse/CLIMATE-875
>             Project: Apache Open Climate Workbench
>          Issue Type: Bug
>          Components: data sources
>    Affects Versions: 1.1.0
>            Reporter: Lewis John McGibbney
>            Assignee: Lewis John McGibbney
>             Fix For: 1.2.0
>
>
> This should be a trivial upgrade of the versioning and possibly some API 
> upgrades such that OCW 1.2.0 is released with Podaac v3.2.2 Webservices 
> integration.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to