Add HaClient code quality review prompt#70
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
platform darwin -- Python 3.11.15, pytest-9.0.3, pluggy-1.6.0
rootdir: /Users/abo/Developer/Graphras-com/OpenSource/HaClient
configfile: pyproject.toml
plugins: cov-7.1.0, asyncio-1.3.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 285 items
tests/test_api_extras.py .. [ 0%]
tests/test_client.py ............................. [ 10%]
tests/test_domains.py .................................................. [ 28%]
................ [ 34%]
tests/test_entity_events.py ...... [ 36%]
tests/test_event_domain.py ....... [ 38%]
tests/test_events.py .............. [ 43%]
tests/test_favorites.py ......... [ 46%]
tests/test_granular_events.py .......................................... [ 61%]
.. [ 62%]
tests/test_plugins.py ................ [ 67%]
tests/test_registry.py .... [ 69%]
tests/test_rest.py ............ [ 73%]
tests/test_services.py ........ [ 76%]
tests/test_state_store.py ...... [ 78%]
tests/test_sync.py ........ [ 81%]
tests/test_timer_lifecycle.py ....................... [ 89%]
tests/test_websocket.py ............................... [100%]
================================ tests coverage ================================
______________ coverage: platform darwin, python 3.11.15-final-0 _______________
Name Stmts Miss Branch BrPart Cover Missing
src/haclient/init.py 16 0 0 0 100%
src/haclient/api.py 114 4 16 0 97% 424-425, 428-429
src/haclient/config.py 31 2 0 0 94% 149-150
src/haclient/core/init.py 9 0 0 0 100%
src/haclient/core/clock.py 19 0 0 0 100%
src/haclient/core/connection.py 41 0 2 0 100%
src/haclient/core/events.py 89 3 28 4 94% 96->exit, 99->exit, 108-109, 125, 213->exit
src/haclient/core/factory.py 32 1 4 0 97% 54
src/haclient/core/plugins.py 82 0 12 0 100%
src/haclient/core/registry.py 34 1 4 1 95% 58
src/haclient/core/services.py 35 0 10 0 100%
src/haclient/core/state.py 65 0 18 1 99% 114->110
src/haclient/domains/init.py 17 0 0 0 100%
src/haclient/domains/air_quality.py 58 0 14 0 100%
src/haclient/domains/binary_sensor.py 19 0 0 0 100%
src/haclient/domains/climate.py 38 0 2 1 98% 115->117
src/haclient/domains/cover.py 34 0 0 0 100%
src/haclient/domains/event.py 65 0 20 0 100%
src/haclient/domains/fan.py 105 0 20 0 100%
src/haclient/domains/humidifier.py 57 0 6 0 100%
src/haclient/domains/light.py 82 1 20 2 97% 232, 236->238
src/haclient/domains/lock.py 47 0 4 0 100%
src/haclient/domains/media_player.py 183 4 28 1 98% 366, 580, 626-627
src/haclient/domains/scene.py 51 0 10 0 100%
src/haclient/domains/sensor.py 26 0 2 0 100%
src/haclient/domains/switch.py 21 0 0 0 100%
src/haclient/domains/timer.py 146 0 28 1 99% 400->exit
src/haclient/domains/vacuum.py 144 0 22 0 100%
src/haclient/domains/valve.py 63 0 6 0 100%
src/haclient/entity/init.py 2 0 0 0 100%
src/haclient/entity/base.py 114 0 30 0 100%
src/haclient/exceptions.py 11 0 0 0 100%
src/haclient/infra/init.py 3 0 0 0 100%
src/haclient/infra/rest_aiohttp.py 74 3 20 2 95% 136, 138, 194
src/haclient/infra/ws_aiohttp.py 288 20 110 19 89% 170-171, 174-175, 178-179, 234, 242, 322->324, 326->328, 337->339, 356->355, 366-368, 376->363, 385-387, 395->394, 442->446, 444->446, 448->452, 450->452, 468->exit, 487-488, 527->exit, 530, 535->537, 538-540
src/haclient/ports.py 33 0 0 0 100%
src/haclient/sync.py 112 2 12 3 96% 60, 62, 88->90
TOTAL 2360 41 448 35 97%
Required test coverage of 95% reached. Total coverage: 97.08%
============================= 285 passed in 52.27s =============================