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

Update WazeRouteCalculator, add config options, fix subscription #27963

Merged
merged 6 commits into from Nov 26, 2019

Conversation

@hmmbob
Copy link
Contributor

hmmbob commented Oct 20, 2019

Description:

The current version of waze_travel_time doesn't allow for the use of toll roads in European countries that use the vignette system (like Switzerland, Austria...) so even if avoid_toll_roads is false, no toll roads will be used for routing on those countries. This PR fixes add, and adds possibilities to avoid Ferries, Toll roads and previous mentioned vignette/subscription roads.

DO NOT MERGE UNTIL UNDERLYING WazeRouteCalculator 0.12 PACKAGE HAS BEEN RELEASED (I will remove [WIP] tags). This is waiting for kovacsbalu/WazeRouteCalculator#52 to be merged.

Updates package released - ready to go.

Related issue (if applicable): Fixes #27400 and fixes #25964.

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

Example entry for configuration.yaml (if applicable):

sensor:
  - platform: waze_travel_time
    name: Westerscheldetunnel (normal)
    origin: 51.330436, 3.802043
    destination: 51.445677, 3.749929
    region: 'EU'
    avoid_toll_roads: false
    avoid_subscription_roads: false

  - platform: waze_travel_time
    name: Westerscheldetunnel (avoiding toll, subscription)
    origin: 51.330436, 3.802043
    destination: 51.445677, 3.749929
    region: 'EU'
    avoid_toll_roads: true
    avoid_subscription_roads: true

  - platform: waze_travel_time
    name: Avoid Ferry Alem-Maren Kessel (NLD)
    origin: 51.787593, 5.346249
    destination: 51.790886, 5.377690
    region: 'EU'
    avoid_ferries: true

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 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:

  • Tests have been added to verify that the new code works.
@project-bot project-bot bot added this to Needs review in Dev Oct 20, 2019
@MartinHjelmare MartinHjelmare moved this from Needs review to Incoming in Dev Oct 20, 2019
@hmmbob hmmbob changed the title [WIP] Update WazeRouteCalculator, add config options, fix subscription Update WazeRouteCalculator, add config options, fix subscription Oct 21, 2019
@hmmbob

This comment has been minimized.

Copy link
Contributor Author

hmmbob commented Oct 21, 2019

Package was released, ready to go. Any way to retrigger the failed tests?

@MartinHjelmare MartinHjelmare moved this from Incoming to Needs review in Dev Oct 23, 2019
Dev automation moved this from Needs review to Reviewer approved Oct 23, 2019
@fabaff

This comment has been minimized.

Copy link
Member

fabaff commented Nov 1, 2019

Package was released, ready to go. Any way to retrigger the failed tests?

Do a rebase and a forced push.

@hmmbob

This comment has been minimized.

Copy link
Contributor Author

hmmbob commented Nov 1, 2019

I'll need a manual to do that - I made changes in the Github web environment which does not allow for rebase. I didn't use git locally but directly edited the files needed and then copied to the web environment.

Can you point me to a good how-to, that starts from the perspective of having a branch on github and nothing locally?

Found a decent guide at https://anavarre.net/how-to-rebase-a-github-pull-request/

hmmbob added 6 commits Oct 19, 2019
There was an error in the underlying lib
@hmmbob hmmbob force-pushed the hmmbob:hmmbob-waze branch from 26a273d to bade48e Nov 1, 2019
@hmmbob

This comment has been minimized.

Copy link
Contributor Author

hmmbob commented Nov 1, 2019

Test is failing at unrelated work?

@sretalla

This comment has been minimized.

Copy link

sretalla commented Nov 26, 2019

Any news on how we're going to progress on this?... after figuring out and fixing the code in the wazeroute calculator, I've now been manually updating the code every release of HA on my box ever since to have it working... it would be great to see it finally drop as part of the finished product more than 4 months later.

@balloob balloob merged commit 9e97149 into home-assistant:dev Nov 26, 2019
9 of 11 checks passed
9 of 11 checks passed
CI Build #20191101.40 had test failures
Details
CI (Tests PyTest Python37) Tests PyTest Python37 failed
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
cla-bot Everyone involved has signed the CLA
codecov/patch Coverage not affected when comparing 07337ba...bade48e
Details
codecov/project 94.36% (target 90%)
Details
Dev automation moved this from Reviewer approved to Done Nov 26, 2019
@hmmbob hmmbob deleted the hmmbob:hmmbob-waze branch Nov 26, 2019
@lock lock bot locked and limited conversation to collaborators Nov 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
5 participants
You can’t perform that action at this time.