Skip to content

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
bkatiemills committed Apr 19, 2024
1 parent 82319ca commit 3bd1d93
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 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.40
image: argovis/testdb:0.41
redis:
image: redis:7.0.2
api:
image: argovis/api:2.22.0
image: argovis/api:2.24.1
env:
ARGONODE: core

Expand Down
6 changes: 3 additions & 3 deletions argovisHelpers/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def query(route, options={}, apikey='', apiroot='https://argovis-api.colorado.ed
results = []
delay = 0
if 'polygon' in options:
#pgons = split_polygon(options['polygon'], 5, 5)
pgons = split_polygon(options['polygon'], 5, 5)
for i in range(len(pgons)):
ops['polygon'] = pgons[i]
increment = argofetch(route, options=ops, apikey=apikey, apiroot=apiroot, suggestedLatency=delay, verbose=verbose)
Expand All @@ -105,8 +105,8 @@ def query(route, options={}, apikey='', apiroot='https://argovis-api.colorado.ed
# do it for boxes too just to make sure nothing funny happened on the boundaries
ops = copy.deepcopy(options)
ops['compression'] = 'minimal'
true_ids = argofetch(route, options=ops, apikey=apikey, apiroot=apiroot, suggestedLatency=delay, verbose=verbose)[0]
true_ids = [x[0] for x in true_ids]
true_ids = argofetch(route, options=ops, apikey=apikey, apiroot=apiroot, suggestedLatency=delay, verbose=verbose)
true_ids = [x[0] for x in true_ids[0]]
fetched_ids = [x['_id'] for x in results]
if len(fetched_ids) != len(list(set(fetched_ids))):
# deduplicate anything scooped up by multiple cells, like on cell borders
Expand Down
1 change: 1 addition & 0 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def test_timeseries_recombo(apiroot, apikey):

slice_response = helpers.query('/timeseries/ccmpwind', options={'startDate':'1995-01-01T00:00:00Z', 'endDate':'2019-01-01T00:00:00Z', 'polygon': [[-10,-10],[10,-10],[10,10],[-10,10],[-10,-10]], 'data':'all'}, apikey=apikey, apiroot=apiroot)
noslice_response = helpers.query('/timeseries/ccmpwind', options={'startDate':'1995-01-01T00:00:00Z', 'endDate':'2019-01-01T00:00:00Z', 'id': '0.125_0.125', 'data':'all'}, apikey=apikey, apiroot=apiroot)

assert slice_response[0]['data'] == noslice_response[0]['data'], 'mismatch on data recombination'
assert slice_response[0]['timeseries'] == noslice_response[0]['timeseries'], 'mismatch on timestamp recombination'

Expand Down

0 comments on commit 3bd1d93

Please sign in to comment.