flexmeasures
flexmeasures copied to clipboard
Migrate attribute names to use dashed to separate words
In general, we are using underscore for the DB entities attributes and deserialized attributes and dashed for serialized data.
However, DB attributes are in a serialized form (e.g. we could store quantities as string and convert them back to ur.Quantities
) so it might be more consistent to separate words with dashed.
This looks like a trivial task but bear with me that it isn't. Some things to consider are:
- Migrate old attributes replacing underscores by dashes. (also the down revision (
"-" -> "_"
). Can we do this in general or are there DB attributes using dashes? - Look for the use of the attributes through the code and do the replacement.
Non flexmeasures core tasks
- Make existing plugins to use/set the new asset attributes
I propose to tackle, within the same scope, moving units from attribute keys to attribute values. For example: "min_soc_in_mwh": 0.1
should become "soc-min": "100 kWh"
. Likewise for "max_soc_in_mwh"
. Afterwards each fallback attribute should have the same format as its corresponding flex-model/flex-config field.