SolarArbiter / solarforecastarbiter-api

HTTP API and database schema for the Solar Forecast Arbiter
https://api.solarforecastarbiter.org
MIT License
10 stars 6 forks source link

Aggregate values #287

Closed lboeman closed 3 years ago

lboeman commented 3 years ago

Creates and passes an index for computing aggregate values to the solarforecastarbiter.utils.compute_aggregate function updated in https://github.com/SolarArbiter/solarforecastarbiter-core/pull/590

The _make aggregate_index function was enforcing a rule that aggregate interval lengths are divisors of one day, So I've added a validator for the aggregate schema to enforce this. closes #255 closes #219

lboeman commented 3 years ago

should add a test explicitly for the situation described in #255

Done, though I may have misunderstood this error, and neglected it in the core PR. The KeyError was already being caught here and results in an error message on the dashboard. Should this error only occur if the deleted observation is valid at the given period?

alorenzo175 commented 3 years ago

should add a test explicitly for the situation described in #255

Done, though I may have misunderstood this error, and neglected it in the core PR. The KeyError was already being caught here and results in an error message on the dashboard. Should this error only occur if the deleted observation is valid at the given period?

I'm not sure. Really great issue... I do think the core change would take care of it as far as I understand the issue

lboeman commented 3 years ago

@alorenzo175 I think I've brought this in line with your suggestions. Could you give it another review?