Skip to content

Make OWM and WAPI mappings independent #10

@nhoening

Description

@nhoening

We actually are mapping OWMs response fields to FlexMeasures' internal names and sensor representation. A crucial part of code in this plugin.

I found out that when calling WeatherAPI, we are first translating its responses into the OWM format (in map_weather_api_to_owm()) and then let the usual mapping code run.

We should actually make them independent of each other (imagine OWM changes its format, then your WeatherAPI code breaks also). Two mappings in sensor_specs.py, and then save_forecasts_in_db() only selects the right one. Much cleaner.

(Something I should have caught in an earlier review, sorry)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions