Skip to content

Add huawei_lte quality scale YAML #143347

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

Open
wants to merge 16 commits into
base: dev
Choose a base branch
from
Open

Conversation

scop
Copy link
Member

@scop scop commented Apr 20, 2025

Proposed change

To keep track.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

To keep track, one more item to go before bronze.
@home-assistant
Copy link

Hey there @fphammerle, mind taking a look at this pull request as it has been labeled with an integration (huawei_lte) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of huawei_lte can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign huawei_lte Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@thecode
Copy link
Member

thecode commented Apr 20, 2025

Please first fix the missing translations (in a new PR) so that the tests can pass:
https://github.com/home-assistant/core/actions/runs/14561111758/job/40844567691?pr=143347#step:9:3327

@scop
Copy link
Member Author

scop commented Apr 21, 2025

data_descriptions added in #143388. It's for the good, but I found it a bit surprising that

@thecode
Copy link
Member

thecode commented Apr 21, 2025

data_descriptions added in #143388. It's for the good, but I found it a bit surprising that

I fully agree with you (cc @joostlek) I encountered the same when adding quality scale for Shelly - #141062 (comment)

I think this should be fixed to allow adding quality scall with these marked as todo

@joostlek
Copy link
Member

They're optional in the code, but required to fulfil the rule, is that what you mean?

@thecode
Copy link
Member

thecode commented Apr 21, 2025

They're optional in the code, but required to fulfil the rule, is that what you mean?

Unless I was marking something wrong, assuming you are not ready to fulfill the rule and want to mark it as todo so you can add quality scale, CI will still fail not allowing you to progress.

@joostlek
Copy link
Member

CI should not fall if you set it to todo

Copy link
Member

@joostlek joostlek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put the things we agree on in the comments and let's get this merged and improve from there.

The integration can make use of some modern patterns which would increase the maintainability by a lot, while that is not explicitly covered by the quality scale, I would recommend to do that. I am available on Discord if you want to discuss things or want to challenge things :)

@@ -0,0 +1,76 @@
rules:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we clean up the entry unique id migration? I think at this time we can assume that everyone is running >2021.8 (and that if they decide to upgrade, they probably have bigger fish to fry)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I suppose that can go now.

common-modules: done
config-flow-test-coverage: done
config-flow: done
dependency-transparency: done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependency is not built and published in a CI

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't actually know that though. huawei-lte-api and stringcase don't seem to be published from a public CI it seems, right, downgraded to TODO and added a note in aafc685. Also with that assumption, added a clarifying PR for the docs in home-assistant/developers.home-assistant#2656

Also, the item about building/publishing in a CI is a "should", not "must", in the rule documentation. There are two "must"s and two "should"s in the doc. Given the doc is all about the quality scale rule, I feel there should be a difference between "must" and "should". Or perhaps we can mark the item as done, but add a comment when a "should" item is not addressed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Publishing in a public CI is a must as with a project this size, that is the least we can do to make our dependencies more transparent

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, it sounds that the documentation at https://developers.home-assistant.io/docs/core/integration-quality-scale/rules/dependency-transparency/ needs to be updated to say "must" for all items, not "should" for some.

@home-assistant home-assistant bot marked this pull request as draft April 25, 2025 10:28
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@scop
Copy link
Member Author

scop commented Apr 25, 2025

The integration can make use of some modern patterns which would increase the maintainability by a lot

Thank you for the list of things to look into, will do sometime. There's a lot that can be improved in the integration, I know, but I've found it so hard to find reviewers for changes in this integration in general that TBH I haven't been that motivated to land too much work on it, nor do I have much time to invest in following the direction where HA codebase goes these days.

It would be great to get the quality scale YAML in, because that's at least one way I can have a some kind of actual TODO list (even if incomplete) for the integration (because TODO/FIXME comments in code at least were not allowed by the linting config, and if I file issues for TODOs they tend to require herding or go stale).

@scop
Copy link
Member Author

scop commented Apr 25, 2025

I'm marking this ready for review due per the perfect PR recommendations. The additional things suggested are very much appreciated, but as noted they're not strictly speaking in scope for adding the quality scale file and keeping the PR as small as possible to do that.

@scop scop marked this pull request as ready for review April 25, 2025 18:42
@home-assistant home-assistant bot requested a review from joostlek April 25, 2025 18:42
@joostlek
Copy link
Member

Well, we can put things into the comments so we can keep track of them

@scop
Copy link
Member Author

scop commented Apr 25, 2025

True, but putting them in comments here means

  • They are misplaced due to stated reasons (out of scope for this PR, perfect PR and that stuff), and prevent small incremental improvements like the one that is already ready here (just add the quality scale YAML) from being merged. Addressing all of them would likely take several months.
    • If we merge this, they're as good as gone, it's unlikely that I'll remember to check back here later, and dunno if they're of value to anyone else in such a completed PR.
    • If we don't merge this, we'll hold the (now ready) quality YAML file "as hostage" for changes that are not really required by that change. I find it quite possible that the quality scale YAML things would change while we wait. If it was in, I suppose it would be changed by a sweeping PR that addresses it for all components, but if it sits here, someone has to notice separately and do extra work to keep up.
  • They comment about things in files that are not in files in this PR, so it's hard to correlate them with the actual source code.

@scop
Copy link
Member Author

scop commented Apr 25, 2025

And in case by comments it was meant comments in the quality YAML and not in this PR, I'm not sure if that's the correct place either -- not all items here map to quality scale rules, and I'm not sure if it's appropriate to put arbitrary other TODOs there. I'm open to other opinions though.

@joostlek
Copy link
Member

I mean the things related to the rules can be put in the comment of that rule, the rest can't and will live here

@scop
Copy link
Member Author

scop commented Apr 25, 2025

So to make sure I understand, if we add the comments in the quality scale YAML that apply to items in it, then we're good to merge, and other comments made are just left here in this PR issue for reference after merge?

@joostlek
Copy link
Member

Yes

From a personal point of view, as this is about quality I would find something about it being graded without being migrated to a coordinator for example.

But once we are crossing of things of the todolist this can just be an easy process :)

@joostlek
Copy link
Member

plaese let me know if you think its ready because so far I don't know if you think its ready or not

@scop
Copy link
Member Author

scop commented Apr 26, 2025

Pushing back to draft while I go through the comments directly related to the quality scale file, will mark as ready when I think it is.

@scop scop marked this pull request as draft April 26, 2025 10:43
@scop scop marked this pull request as ready for review June 25, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants