-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
Record Plugwise Quality Scale #131888
Record Plugwise Quality Scale #131888
Conversation
Hey there @bouwew, @frenck, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Most |
reconfiguration-flow: | ||
status: exempt | ||
comment: This integration does not have any reconfiguration steps | ||
dynamic-devices: done |
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.
binary_sensor.py has this logic, but button.py not?
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.
Sorry what do you mean here?
Reboot vs Restart? Remove the _attr_translation_key
?
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.
No, this is the unload part, it's in all others but button
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.
Oh, I didn't even spot that one. I think we had that discussion before. Ideally we use the device class name for consistency.
But what I meant here was, binary sensors are added on the fly, but button are not, why is that?
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.
I kept the code in button.py
simple because there is only one button defined at the moment, and I don't foresee any more buttons being added in the future.
Also this button is connected to the gateway-device, it will never change.
When this device changes a new Plugwise integration must be added because the ID = pw changes.
Now that I write this, this could be a reason for adding reconfiguring!?
reconfiguration-flow: | ||
status: exempt | ||
comment: This integration does not have any reconfiguration steps |
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.
And why would that make it exempt?
parallel-updates: | ||
status: done | ||
comment: Using coordinator | ||
test-coverage: done |
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.
It would be nice to also have tests that check failing calls in the number tests
parallel-updates: | ||
status: done | ||
comment: Using coordinator | ||
test-coverage: done |
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.
test_sensor.py
line 161:
Instead of enabling entities on the fly
entity_registry.async_update_entity(entity_id=entity_id, disabled_by=None)
await hass.async_block_till_done()
await hass.config_entries.async_reload(init_integration.entry_id)
await hass.async_block_till_done()
use a fixture:
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
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.
Yes, thanks, there are also some other similar test-improvements on its way...
parallel-updates: | ||
status: done | ||
comment: Using coordinator |
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.
But you have mutable platforms, and they also have a need for parallel-updates
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Updated the quality scale as discussed for benchmark, with follow-up incrementals PRs 'done'-ing the todo's. As already shared in chat, thanks for you thorough review @joostlek, highly appreciated! |
6e6cabe
to
624c12a
Compare
comment: Using coordinator, but required due to mutable platform | ||
test-coverage: | ||
status: todo | ||
comment: Consider using snapshots + consistency in setup calls + add numerical tests + use fixtures |
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.
Note that the snapshots was an opinionated comment. Snapshots are a great way to fixate data structures and to see what fixture creates what and what the effect of changes on them are
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.
I interpreted it that way, hence noting as a consideration :)
common-modules: | ||
status: todo | ||
comment: Verify entity for async_added_to_hass usage (discard?) | ||
docs-high-level-description: done |
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.
I must say, when I read the docs, I am missing what Plugwise is. I think we should make the docs more accessible for users who are looking to buy a new device for example. We never really explain what plugwise is or what a smile is for example
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.
Will create a new docs PR for this (already spotted it myself as well) - set to todo
status: todo | ||
comment: Verify entity for async_added_to_hass usage (discard?) | ||
docs-high-level-description: done | ||
docs-installation-instructions: done |
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.
I am missing the default config flow setup snippet and I personally think the text is a bit too literal. I think there is room for improvement here.
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.
Linked to PR-in-progress / set to todo
comment: Verify entity for async_added_to_hass usage (discard?) | ||
docs-high-level-description: done | ||
docs-installation-instructions: done | ||
docs-removal-instructions: done |
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.
I'm missing this one
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.
Linked to PR-in-progress / set to todo
comment: Consider using snapshots + consistency in setup calls + add numerical tests + use fixtures | ||
integration-owner: done | ||
docs-installation-parameters: done | ||
docs-configuration-parameters: done |
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.
No options flow, so this would be exempt
status: todo | ||
comment: Consider using snapshots + consistency in setup calls + add numerical tests + use fixtures | ||
integration-owner: done | ||
docs-installation-parameters: done |
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.
It does describe it but it could use the configuration block for it maybe
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.
Linked to PR-in-progress / set to todo
docs-use-cases: done | ||
docs-supported-devices: done | ||
docs-supported-functions: done | ||
docs-data-update: done | ||
docs-known-limitations: done | ||
docs-troubleshooting: done | ||
docs-examples: done |
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.
I am missing a few of these in the docs
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.
All set to todo just for re-checking one by one
f192f82
to
0bfba76
Compare
common-modules: | ||
status: todo | ||
comment: Verify entity for async_added_to_hass usage (discard?) | ||
docs-high-level-description: done |
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.
docs-high-level-description: done | |
docs-high-level-description: todo |
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.
Updated as future todo
status: todo | ||
comment: Verify entity for async_added_to_hass usage (discard?) | ||
docs-high-level-description: done | ||
docs-installation-instructions: done |
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.
docs-installation-instructions: done | |
docs-installation-instructions: todo |
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.
Docs PR was just closed, but let's leave it as todo to make a process out of this. E.g. set to todo, create small update PR to indicate (with reference PR to docs) that it's done.
Proposed change
Add initial quality indication as per new rules
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: