Skip to content

Commit

Permalink
Merge pull request #29 from bkatiemills/qol
Browse files Browse the repository at this point in the history
glodap, ars
  • Loading branch information
bkatiemills authored Apr 8, 2024
2 parents 65cba78 + 10a260a commit 94cfc05
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:

services:
database:
image: argovis/testdb:0.38
image: argovis/testdb:0.40
redis:
image: redis:7.0.2
api:
image: argovis/api:2.20.2
image: argovis/api:2.22.0
env:
ARGONODE: core

Expand Down
15 changes: 9 additions & 6 deletions argovisHelpers/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def query(route, options={}, apikey='', apiroot='https://argovis-api.colorado.ed
r = re.sub('^/', '', route)
r = re.sub('/$', '', r)

data_routes = ['argo', 'cchdo', 'drifters', 'tc', 'argotrajectories', 'easyocean', 'grids/rg09', 'grids/kg21', 'grids/glodap', 'timeseries/noaasst', 'timeseries/copernicussla', 'timeseries/ccmpwind']
data_routes = ['argo', 'cchdo', 'drifters', 'tc', 'argotrajectories', 'easyocean', 'grids/rg09', 'grids/kg21', 'grids/glodap', 'timeseries/noaasst', 'timeseries/copernicussla', 'timeseries/ccmpwind', 'extended/ar']

scoped_parameters = {
'argo': ['id','platform', 'metadata'],
Expand All @@ -54,7 +54,8 @@ def query(route, options={}, apikey='', apiroot='https://argovis-api.colorado.ed
'grids/glodap': ['id'],
'timeseries/noaasst': ['id'],
'timeseries/copernicussla': ['id'],
'timeseries/ccmpwind': ['id']
'timeseries/ccmpwind': ['id'],
'extended/ar': ['id']
}

earliest_records = {
Expand All @@ -66,10 +67,11 @@ def query(route, options={}, apikey='', apiroot='https://argovis-api.colorado.ed
'easyocean': parsetime("1983-10-08T00:00:00.000Z"),
'grids/rg09': parsetime("2004-01-14T00:00:00.000Z"),
'grids/kg21': parsetime("2005-01-14T00:00:00.000Z"),
'grids/glodap': parsetime("0001-01-01T00:00:00.000Z"),
'grids/glodap': parsetime("1000-01-01T00:00:00.000Z"),
'timeseries/noaasst': parsetime("1989-12-30T00:00:00.000Z"),
'timeseries/copernicussla': parsetime("1993-01-02T00:00:00Z"),
'timeseries/ccmpwind': parsetime("1993-01-02T00:00:00Z")
'timeseries/ccmpwind': parsetime("1993-01-02T00:00:00Z"),
'extended/ar': parsetime("2000-01-01T00:00:00Z")
}

# plus a day vs the API, just to make sure we don't artificially cut off
Expand All @@ -82,10 +84,11 @@ def query(route, options={}, apikey='', apiroot='https://argovis-api.colorado.ed
'easyocean': parsetime("2022-10-17T00:00:00.000Z"),
'grids/rg09': parsetime("2022-05-16T00:00:00.000Z"),
'grids/kg21': parsetime("2020-12-16T00:00:00.000Z"),
'grids/glodap': parsetime("0001-01-02T00:00:00.000Z"),
'grids/glodap': parsetime("1000-01-02T00:00:00.000Z"),
'timeseries/noaasst': parsetime("2023-01-30T00:00:00.000Z"),
'timeseries/copernicussla': parsetime("2022-08-01T00:00:00.000Z"),
'timeseries/ccmpwind': parsetime("2019-12-30T00:00:00Z")
'timeseries/ccmpwind': parsetime("2019-12-30T00:00:00Z"),
'extended/ar': parsetime("2022-01-01T21:00:00Z")
}

if r in data_routes:
Expand Down
Binary file added dist/argovisHelpers-0.0.22-py3-none-any.whl
Binary file not shown.
Binary file added dist/argovisHelpers-0.0.22.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "argovisHelpers"
version = "0.0.21"
version = "0.0.22"
description = "Helper functions to consume and parse information from University of Colorado's Argovis API."
readme = "README.md"
authors = [{name = "Katie Mills" }]
Expand Down

0 comments on commit 94cfc05

Please sign in to comment.