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

Migrate geo_json_events platform to integration with config flow #70439

Closed

Conversation

exxamalte
Copy link
Contributor

@exxamalte exxamalte commented Apr 22, 2022

Breaking change

Proposed change

Migrate geo_json_events from a platform to an integration with config flow. This integration uses the data coordinator to manage entities. Also introduces a diagnostics sensor that keeps track of updates from the external feed.

The legacy way of defining this integrations as a geo_location platform via YAML configuration is still supported and the configuration will automatically be migrated.

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)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

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
  • The code has been formatted using Black (black --fast 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.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 13, 2022
@exxamalte
Copy link
Contributor Author

PR is still current, ready to be reviewed and merged.

@exxamalte
Copy link
Contributor Author

Just rebased to latest dev branch.

@exxamalte
Copy link
Contributor Author

Rebased again. I ran tox locally with py39 and p310 and all tests ran fine, i.e. I couldn't reproduce the previously failed tests.

@exxamalte
Copy link
Contributor Author

exxamalte commented Dec 5, 2022

Rebased again; added integration type; replaced deprecated unit system.

@github-actions github-actions bot removed the stale label Jan 11, 2023
Comment on lines +84 to +87
hass.async_create_task(
hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_IMPORT}, data=config
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Very quick scan, but a couple of things:

  • I think it should raise an issue to tell the user to remove the manual configuration
  • config_flow PRs are always quite big. I suggest that you remove everything else can can be kept for a follow-up PR (eg. the sensor platform)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I'll have a look into raising an issue from this step. And, let me have a look how I can simplify this PR to only include configflow for now, and move the other small improvements to a future PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I followed your advice and reduced this change to the minimum, i.e. config flow only, and this is now available here: #87062

@exxamalte exxamalte mentioned this pull request Feb 1, 2023
19 tasks
@exxamalte
Copy link
Contributor Author

Closing in favour of #87062
I'll open separate PRs for the diagnostics sensor and other small improvements, after the config flow PR is through.

@exxamalte exxamalte closed this Feb 1, 2023
Dev automation moved this from By Code Owner to Cancelled Feb 1, 2023
@exxamalte
Copy link
Contributor Author

Closing in favour of #87062
I'll open separate PRs for the diagnostics sensor and other small improvements, after the config flow PR is through.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Cancelled
Development

Successfully merging this pull request may close these issues.

None yet

3 participants