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

Add test case to identify missing MQTT configuration abbreviations #25616

Merged
merged 6 commits into from Aug 7, 2019

Conversation

@emontnemery
Copy link
Contributor

commented Jul 31, 2019

Description:

Add script to identify missing MQTT configuration abbreviations.
Move abbreviations to own file and add missing MQTT configuration abbreviations.

Maybe the script should be executed automatically as a test case?

Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#TODO

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

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

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@emontnemery emontnemery requested a review from home-assistant/core as a code owner Jul 31, 2019

@ghost

This comment has been minimized.

Copy link

commented Jul 31, 2019

Hey there @home-assistant/core, mind taking a look at this pull request as its been labeled with a integration (mqtt) you are listed as a codeowner for? Thanks!

This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people.

@project-bot project-bot bot added this to Needs review in Dev Jul 31, 2019

@balloob

This comment has been minimized.

Copy link
Member

commented Jul 31, 2019

Instead of a script, just make it a test.

@emontnemery emontnemery force-pushed the emontnemery:mqtt_abbreviations branch from fd3fef2 to cf1a8a5 Aug 1, 2019

@emontnemery emontnemery changed the title Add script to identify missing MQTT configuration abbreviations Add test case to identify missing MQTT configuration abbreviations Aug 1, 2019

missing = []
mqtt_dir = '../../../homeassistant/components/mqtt'
script_dir = os.path.realpath(
os.path.dirname(inspect.getfile(inspect.currentframe())))

This comment has been minimized.

Copy link
@balloob

balloob Aug 1, 2019

Member

Please rewrite all this file handling with __file__, mqtt.__file, PathLib.

Something like

from pathlib import Path

for fil in Path(mqtt.__file__).iterdir():

@MartinHjelmare MartinHjelmare moved this from Needs review to Review in progress in Dev Aug 2, 2019

@emontnemery emontnemery force-pushed the emontnemery:mqtt_abbreviations branch from 8274c1f to eda3f48 Aug 5, 2019

emontnemery added 2 commits Aug 2, 2019

@emontnemery emontnemery force-pushed the emontnemery:mqtt_abbreviations branch from eda3f48 to a832a21 Aug 5, 2019

Dev automation moved this from Review in progress to Reviewer approved Aug 7, 2019

@balloob
balloob approved these changes Aug 7, 2019
@balloob

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

Nice!

@balloob balloob merged commit e0be4ef into home-assistant:dev Aug 7, 2019

11 checks passed

CI Build #20190805.24 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview CheckFormat) Overview CheckFormat succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA
codecov/patch 100% of diff hit (target 94.01%)
Details
codecov/project 94.01% (target 90%)
Details

Dev automation moved this from Reviewer approved to Done Aug 7, 2019

@lock lock bot locked and limited conversation to collaborators Aug 8, 2019

@emontnemery emontnemery deleted the emontnemery:mqtt_abbreviations branch Sep 6, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
3 participants
You can’t perform that action at this time.