quintel / etengine

Calculation engine for the Energy Transition Model
https://energytransitionmodel.com/
MIT License
15 stars 7 forks source link

Split setting parameters from the inputs endpoint into a separate endpoint. #1445

Open robcalon opened 3 months ago

robcalon commented 3 months ago

The https://engine.energytransitionmodel.com/api/v3/scenarios/xxxx/inputs endpoint contains mostly float-like parameter values with the occasional boolean or enum typed parameters. Processing mixed types from the endpoint is becoming increasingly painful in exporting results as most Python libraries don't like mixed types.

Would it be an option to split off the boolean and enum type parameters to a different endpoint, e.g. https://engine.energytransitionmodel.com/api/v3/scenarios/xxxx/settings to make it more easily to process the settings endpoint? I would also propose to migrate the boolean parameters that are now implemented as float-like parameters with 0, 1 to proper boolean parameters with an allowed setting of true/false to prevent setting a float value instead.

This would provide the additional benefit that inter- or extrapolation of parameters becomes more trivial as only float-like parameters can be inter- or extrapolated, you'd like to keep all 'settings' parameters the same.

robcalon commented 3 months ago

@noracato could you have a look at this one?

github-actions[bot] commented 1 month ago

This issue has had no activity for 60 days and will be closed in 7 days. Removing the "Stale" label or posting a comment will prevent it from being closed automatically. You can also add the "Pinned" label to ensure it isn't marked as stale in the future.