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

make uncertainty optional #234

Closed wholmgren closed 3 years ago

wholmgren commented 4 years ago

With the way we're using uncertainty in core and in the dashboard report form, I think it's reasonable to relax the requirement that users supply an uncertainty.

lboeman commented 3 years ago

Would a valid default be 0? I'm not sure how we would handle a null value here if report uncertainty is set to observation_uncertainty.

wholmgren commented 3 years ago

No, in the metrics modules there are different code paths for 0 and None.

The core datamodel.Observation would need to be modified to uncertainty: Union[float, None] = None, but I don't think it would cause any issues with reports. The __set_uncertainty__ function would still work as intended. So I think we'd just be looking at new tests.

@alorenzo175 am I missing anything?

alorenzo175 commented 3 years ago

@alorenzo175 am I missing anything?

Not as far as I can tell