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
Issue 282 use pint to check and convert units #283
Issue 282 use pint to check and convert units #283
Conversation
…urrencies, and simplifying units according to preference; also add tests Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool!
I'd leave preferred units in the code for now, as I don't see how users need to care. Both |
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Correct, not in FlexMeasures, but I had moved it here from one of our plugins. With the introduction of pint, I intend to factor these functions out of that plugin first, and then remove them here. |
This PR mostly contains behind the screens work as a base for future user functionality (i.e. auto-converting data to desired units when POSTing and GETting data). I did already hook up unit conversion to our dev endpoint for posting sensor data.
I also left a todo to possibly move a list of preferred units to a config setting, but we can also leave that in the code for now. @nhoening what would you prefer?