Skip to content

Fix spaceapi#26453

Merged
fabaff merged 20 commits into
home-assistant:devfrom
Bouni:fix_spaceapi
Sep 21, 2019
Merged

Fix spaceapi#26453
fabaff merged 20 commits into
home-assistant:devfrom
Bouni:fix_spaceapi

Conversation

@Bouni
Copy link
Copy Markdown
Contributor

@Bouni Bouni 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.

Comment thread homeassistant/components/spaceapi/__init__.py Outdated
Comment thread homeassistant/components/spaceapi/__init__.py Outdated
cv.ensure_list, [vol.In(ISSUE_REPORT_CHANNELS)]
),
vol.Required(CONF_LOCATION): LOCATION_SCHEMA,
vol.Optional(CONF_LOCATION): LOCATION_SCHEMA,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK, will do that tomorrow!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@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.

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,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This change makes it a Breaking change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

@Bouni Bouni Sep 9, 2019

Choose a reason for hiding this comment

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

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

@Bouni
Copy link
Copy Markdown
Contributor Author

Bouni 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
Copy link
Copy Markdown
Member

fabaff commented Sep 18, 2019

CI is not passing.

@Bouni
Copy link
Copy Markdown
Contributor Author

Bouni 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
@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

None yet

Development

Successfully merging this pull request may close these issues.

3 participants