Skip to content
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

Exclude gold and platinum integrations from .coveragerc #117563

Merged
merged 4 commits into from
May 24, 2024

Conversation

epenet
Copy link
Contributor

@epenet epenet commented May 16, 2024

Proposed change

SSIA, based on https://developers.home-assistant.io/docs/integration_quality_scale_index/#gold- and home-assistant/developers.home-assistant#1194
Tests: Above average test coverage for all integration modules

Sample output

Integrations: 1264
Invalid integrations: 3

Found errors. Generating files canceled.

Integration luftdaten:
* [ERROR] [COVERAGE] has quality scale gold and should not be present in .coveragerc file

Integration point:
* [ERROR] [COVERAGE] has quality scale gold and should not be present in .coveragerc file
* [ERROR] [COVERAGE] has quality scale gold and should not be present in .coveragerc file
* [ERROR] [COVERAGE] has quality scale gold and should not be present in .coveragerc file
* [ERROR] [COVERAGE] has quality scale gold and should not be present in .coveragerc file

Integration tellduslive:
* [ERROR] [COVERAGE] has quality scale gold and should not be present in .coveragerc file
* [ERROR] [COVERAGE] has quality scale gold and should not be present in .coveragerc file
* [ERROR] [COVERAGE] has quality scale gold and should not be present in .coveragerc file
* [ERROR] [COVERAGE] has quality scale gold and should not be present in .coveragerc file
* [ERROR] [COVERAGE] has quality scale gold and should not be present in .coveragerc file
* [ERROR] [COVERAGE] has quality scale gold and should not be present in .coveragerc file
* [ERROR] [COVERAGE] has quality scale gold and should not be present in .coveragerc file

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:

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.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

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

Code owner commands

Code owners of tellduslive 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 tellduslive 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.

@home-assistant
Copy link

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

Code owner commands

Code owners of point 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 point 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.

@home-assistant
Copy link

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

Code owner commands

Code owners of luftdaten 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 luftdaten 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.

.coveragerc Show resolved Hide resolved
.coveragerc Outdated
Comment on lines 1054 to 1051
homeassistant/components/point/__init__.py
homeassistant/components/point/alarm_control_panel.py
homeassistant/components/point/binary_sensor.py
homeassistant/components/point/sensor.py
Copy link
Contributor Author

@epenet epenet May 16, 2024

Choose a reason for hiding this comment

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

point has very low coverage... should it still qualify as gold (grandfather rule) or should we move back to silver?
See home-assistant/home-assistant.io#8477

---------- coverage: platform linux, python 3.12.2-final-0 -----------
Name                                                    Stmts   Miss  Cover   Missing
-------------------------------------------------------------------------------------
homeassistant/components/point/__init__.py                173    112    35%   67-82, 88-119, 124-143, 150-158, 163-172, 182-189, 193, 197-227, 231, 235-237, 241, 246, 250, 254, 264-282, 286, 290-294, 298-299, 307, 312, 317, 322-326, 331, 336
homeassistant/components/point/alarm_control_panel.py      58     58     0%   3-117
homeassistant/components/point/binary_sensor.py            58     58     0%   3-130
homeassistant/components/point/config_flow.py              95     13    86%   89, 94, 112-123, 128, 183-190
homeassistant/components/point/const.py                     8      0   100%
homeassistant/components/point/sensor.py                   28     28     0%   3-87
-------------------------------------------------------------------------------------
TOTAL                                                     420    269    36%

Copy link
Member

Choose a reason for hiding this comment

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

Let's correct it.

Copy link
Contributor Author

@epenet epenet May 20, 2024

Choose a reason for hiding this comment

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

Reverted following #117783

.coveragerc Outdated
Comment on lines 1430 to 1421
homeassistant/components/tellduslive/__init__.py
homeassistant/components/tellduslive/binary_sensor.py
homeassistant/components/tellduslive/cover.py
homeassistant/components/tellduslive/entry.py
homeassistant/components/tellduslive/light.py
homeassistant/components/tellduslive/sensor.py
homeassistant/components/tellduslive/switch.py
Copy link
Contributor Author

@epenet epenet May 16, 2024

Choose a reason for hiding this comment

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

tellduslive has very low coverage... should it still qualify as gold (grandfather rule) or should we move back to silver?
See home-assistant/home-assistant.io#8481

---------- coverage: platform linux, python 3.12.2-final-0 -----------
Name                                                    Stmts   Miss  Cover   Missing
-------------------------------------------------------------------------------------
homeassistant/components/tellduslive/__init__.py          115     80    30%   58-79, 84-99, 104-117, 122-132, 140-146, 150-151, 155, 160-172, 176-195, 201-213, 219, 223
homeassistant/components/tellduslive/binary_sensor.py      18     18     0%   3-43
homeassistant/components/tellduslive/config_flow.py        73      0   100%
homeassistant/components/tellduslive/const.py              16      0   100%
homeassistant/components/tellduslive/cover.py              29     29     0%   3-59
homeassistant/components/tellduslive/entry.py              68     68     0%   3-119
homeassistant/components/tellduslive/light.py              43     43     0%   3-80
homeassistant/components/tellduslive/sensor.py             66     66     0%   3-197
homeassistant/components/tellduslive/switch.py             25     25     0%   3-53
-------------------------------------------------------------------------------------
TOTAL                                                     453    329    27%

Copy link
Member

Choose a reason for hiding this comment

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

Let's correct it.

Copy link
Contributor Author

@epenet epenet May 20, 2024

Choose a reason for hiding this comment

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

Reverted following #117784

@epenet epenet marked this pull request as ready for review May 16, 2024 12:55
@epenet epenet requested a review from a team as a code owner May 16, 2024 12:55
@@ -19,6 +19,7 @@
"recorder.py",
"scene.py",
)
FORCE_COVERAGE = ("gold", "platinum")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we add internal to the list, we have:

  • browser
  • downloader
  • folder_watcher
  • kitchen_sink
  • otp
  • ping
  • recorder
  • stream
  • time_date
  • zeroconf

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks, @epenet 👍

../Frenck

@frenck frenck merged commit 6a10e89 into home-assistant:dev May 24, 2024
38 checks passed
@epenet epenet deleted the 20240516-1448 branch May 24, 2024 14:11
@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants