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

Fix spaceapi #26453

Merged
merged 20 commits into from Sep 21, 2019

Conversation

@Bouni
Copy link
Contributor

commented Sep 5, 2019

Breaking Change:

Values that were not complient with the SpaceAPI specification an therefore were changed.

  • contact / mailing_list were changed to contact / ml, to migrate change the mailing_list key to ml
  • location / address is no longer required but optional (the lat/lon properties of location are added automatically from the HA config). No need to change something.

Description:

Some values were not compliant to the specification others were not validated at all.
Now almost all values are supported, not supported are:

  • events I've no idea how over time changing events should be integrated. Maybe some has an idea how to do that.
  • contact/google/plus As Google+ is discontinued, I've not implemented this value.
  • state/trigger_person Again, no idea how to sove this.
  • state/trigger_person Same as trigger_person.

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

Checklist:

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

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. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

  • [ x ] Tests have been added to verify that the new code works.
@Bouni Bouni requested a review from fabaff as a code owner Sep 5, 2019
@project-bot project-bot bot added this to Needs review in Dev Sep 5, 2019
@Bouni Bouni referenced this pull request Sep 5, 2019
homeassistant/components/spaceapi/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/spaceapi/__init__.py Outdated Show resolved Hide resolved
@@ -100,12 +210,23 @@
vol.Required(CONF_ISSUE_REPORT_CHANNELS): vol.All(
cv.ensure_list, [vol.In(ISSUE_REPORT_CHANNELS)]
),
vol.Required(CONF_LOCATION): LOCATION_SCHEMA,
vol.Optional(CONF_LOCATION): LOCATION_SCHEMA,

This comment has been minimized.

Copy link
@fabaff

fabaff Sep 6, 2019

Member

I made the address a requirement in the first place because for most humans it's faster to work with the actual address than coordinates even if it's not a requirement by the SpaceAPI. But in regard of that those information are not consumed by humans it's the right choose to follow the SpaceAPI requirements.

This change makes it a Breaking change.

This comment has been minimized.

Copy link
@Bouni

Bouni Sep 6, 2019

Author Contributor

Does a Breaking Change need any special actions to take place?

This comment has been minimized.

Copy link
@fabaff

fabaff Sep 8, 2019

Member

Beside the Breaking Change: section in the PR template which should describe the changes and the migration path for the users, no.

This comment has been minimized.

Copy link
@Bouni

Bouni Sep 8, 2019

Author Contributor

OK, will do that tomorrow!

This comment has been minimized.

Copy link
@Bouni

Bouni Sep 9, 2019

Author Contributor

@fabaff I've thought a little about this one and in my opinion its not a breaking change. It's just optional now. All user have the location set at the moment as it was required until now and works without the need to change anything.


CONTACT_SCHEMA = vol.Schema(
{
vol.Optional(CONF_EMAIL): cv.string,
vol.Optional(CONF_IRC): cv.string,
vol.Optional(CONF_MAILING_LIST): cv.string,
vol.Optional(CONF_ML): cv.string,

This comment has been minimized.

Copy link
@fabaff

fabaff Sep 6, 2019

Member

This change makes it a Breaking change.

This comment has been minimized.

Copy link
@Bouni

Bouni Sep 6, 2019

Author Contributor

Again, does a Breaking Change need any special actions to take place?

This comment has been minimized.

Copy link
@Bouni

Bouni Sep 9, 2019

Author Contributor

I've described the breaking change and the steps to migrate in the PR template as requested.

Dev automation moved this from Needs review to Review in progress Sep 6, 2019
@Bouni

This comment has been minimized.

Copy link
Contributor Author

commented Sep 17, 2019

@fabaff Is there anything left for me to do or is it just waiting for the PR to be merged?

@fabaff

This comment has been minimized.

Copy link
Member

commented Sep 18, 2019

CI is not passing.

Dev automation moved this from Review in progress to Reviewer approved Sep 18, 2019
@fabaff
fabaff approved these changes Sep 18, 2019
Bouni added 17 commits Aug 28, 2019
Bouni and others added 3 commits Sep 6, 2019
Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>
Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>
@Bouni Bouni force-pushed the Bouni:fix_spaceapi branch from c686ea0 to 41fd984 Sep 19, 2019
@Bouni

This comment has been minimized.

Copy link
Contributor Author

commented Sep 19, 2019

CI is not passing.

🤦‍♂ It was so obvious and I didn't realize what the problem was.

@fabaff fabaff merged commit dc52b85 into home-assistant:dev Sep 21, 2019
11 checks passed
11 checks passed
CI Build #20190919.11 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 Coverage not affected when comparing 80136f3...41fd984
Details
codecov/project 94% (target 90%)
Details
Dev automation moved this from Reviewer approved to Done Sep 21, 2019
@lock lock bot locked and limited conversation to collaborators Sep 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
3 participants
You can’t perform that action at this time.