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
[CLI] flexmeasures show beliefs
entity path in case of duplicated sensors
#1026
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Victor Garcia Reolid <victor@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.
Nice. Could you add docstrings to the new methods?
… their entity path. Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@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.
Thanks! Don't forget the changelog entry.
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
…es' into cli/improve-duplicate-sensor-names
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.
After testing, instead of suggesting changes, I had a go at trying out some changes myself (see #1031).
Examples: | ||
>>> reduce_entity_paths([["Account1", "Asset1"], ["Account2", "Asset2"]]) | ||
[["Account1", "Asset1"], ["Account2", "Asset2"]] | ||
|
||
>>> reduce_entity_paths([["Asset1"], ["Asset2"]]) | ||
[["Asset1"], ["Asset2"]] | ||
|
||
>>> reduce_entity_paths([["Asset1"], ["Asset1"]]) | ||
[["Asset1"], ["Asset1"]] | ||
|
||
>>> reduce_entity_paths([["Asset1", "Asset2"], ["Asset1"]]) | ||
[["Asset1"], ["Asset1", "Asset2"]] |
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.
None of these examples seem to actually reduce anything.
* docs: clarify flag option Signed-off-by: F.N. Claessen <felix@seita.nl> * docs: improve title Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: harmonize how two CLI options work together (show path vs. show ID) Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: harmonize how paths are shown in case of having only a part of the sensor names be duplicated Signed-off-by: F.N. Claessen <felix@seita.nl> * refactor: repurpose util function Signed-off-by: F.N. Claessen <felix@seita.nl> * refactor: simplify logic Signed-off-by: F.N. Claessen <felix@seita.nl> * docs: fix typos Signed-off-by: F.N. Claessen <felix@seita.nl> --------- Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
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.
Approved, albeit the docstring example of reduce_entity_paths
could be better.
Signed-off-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Description
The command
flexmeasures show beliefs
adds the sensor ID in case of trying to export sensors with the same name. However, if we want to hand this over to a third-party, it would be nicer if it included the asset names or its ancestry.This PR changes the appended sensor ID to a string representing the "path" of the entity.
Related Items
Closes #1023