azavea / climate-change-api

Apache License 2.0
0 stars 0 forks source link

Fix crash due to type mismatch in percentile indicators #851

Closed CloudNiner closed 6 years ago

CloudNiner commented 6 years ago

Overview

This bug was introduced when we upgraded numpy 1.13 -> 1.15 in 26ddea7240015419f7638028f681458b828a866c

I went through the numpy release notes but don't see the entry that would have caused this error.

Testing Instructions

percentile_* indicator queries should now not crash when provided with a custom percentile HTTP param. The default was unaffected because we set it as an integer.

An example query that should now pass, when before it failed:

http :8080/api/climate-data/39.95233/-75.16379/historical/indicator/percentile_precipitation/ percentile==75 dataset==LOCA noCache==True "Authorization:Token <yourtoken>"

Optionally, you can verify that the numpy upgrade was the issue by:

Notes

I ran queries for most of the other classes of indicators that use extra params and didn't run into any other issues. So hopefully there aren't any other lurking issues from the numpy upgrade.

Checklist

See|Connects #XXX