Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate attribute names to use dashed to separate words #911

Open
victorgarcia98 opened this issue Nov 24, 2023 · 1 comment
Open

Migrate attribute names to use dashed to separate words #911

victorgarcia98 opened this issue Nov 24, 2023 · 1 comment
Labels
Milestone

Comments

@victorgarcia98
Copy link
Contributor

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
@Flix6x
Copy link
Contributor

Flix6x commented Mar 1, 2024

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.

@nhoening nhoening modified the milestones: 0.20, 0.21 Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants