Skip to content

Commit

Permalink
fixed caps test. pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
huard committed Jun 5, 2019
1 parent d360ee4 commit 3ae80d9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion raven/processes/wps_hydrobasins_shape_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self):
def _handler(self, request, response):

level = 12 # request.inputs['level'][0].data
lakes = True #request.inputs['lakes'][0].data
lakes = True # request.inputs['lakes'][0].data
collect_upstream = request.inputs['aggregate_upstream'][0].data
lonlat = request.inputs['location'][0].data

Expand Down
3 changes: 1 addition & 2 deletions raven/processes/wps_nalcms_zonal_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,11 @@ def _handler(self, request, response):
lu[v] += prop.pop(k, 0)

prop['land-use'] = lu
#prop['mini_raster_array'] = pickle.dumps(prop['mini_raster_array'], protocol=0).decode()
# prop['mini_raster_array'] = pickle.dumps(prop['mini_raster_array'], protocol=0).decode()

feature_collect = {'type': 'FeatureCollection', 'features': stats}
response.outputs['statistics'].data = json.dumps(feature_collect)


except Exception as e:
msg = 'Failed to perform zonal statistics using {} and {}: {}'.format(shape_url, raster_url, e)
LOGGER.error(msg)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_wps_caps.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_wps_caps():
'raven-hmets',
'raven-hbv-ec',
'shape-properties',
'shape-selection',
'hydrosheds-select',
'terrain-analysis',
'nalcms-zonal-stats',
'zonal-stats',
Expand Down
12 changes: 6 additions & 6 deletions tests/test_wps_hydrobasins_shape_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def test_manicouagan(self):

fields = [
'location={location}',
#'level={level}',
#'lakes={lakes}',
# 'level={level}',
# 'lakes={lakes}',
'aggregate_upstream={aggregate_upstream}',
]

Expand All @@ -37,8 +37,8 @@ def test_lac_saint_jean(self):

fields = [
'location={location}',
#'level={level}',
#'lakes={lakes}',
# 'level={level}',
# 'lakes={lakes}',
'aggregate_upstream={aggregate_upstream}',
]

Expand Down Expand Up @@ -76,8 +76,8 @@ def test_smallwood_reservoir(self):

fields = [
'location={location}',
#'level={level}',
#'lakes={lakes}',
# 'level={level}',
# 'lakes={lakes}',
'aggregate_upstream={aggregate_upstream}',
]

Expand Down

0 comments on commit 3ae80d9

Please sign in to comment.