-
Notifications
You must be signed in to change notification settings - Fork 41
Improve 'Add titles to asset page graphs' implementation #1177
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
Conversation
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
…idation Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.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.
Good! Just cosmetic comments, maybe using a class method is the only more serious request.
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.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.
Great, maybe can you add this PR number in the changelog entry for #1125?
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <149331360+BelhsanHmida@users.noreply.github.com>
Description
This PR introduces improvements for code introduced in 'Add support for adding titles to asset page graphs' PR #1125:
flatten
method toSensorsToShowSchema
to get sensors id's from validatedsensors_to_show
title
key from dict input and input validationflatten_unique
which is a util function used exclusivity forsensors_to_show
and will in follow-up PR be moved to models/GenericAsset and renamed.test_SensorsToShowSchema.py
Improvements introduced
sensor
input in dict entry insensors_to_show
e.g. {"title": "Title 1", "sensor": 1}Title
key insensors_to_show
flatten_unique
#Follow up work
Create a follow-up PR to rename and move
flatten_unique
, which is used exclusivity forsensors_to_show