-
Notifications
You must be signed in to change notification settings - Fork 35
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 route v8 multiple via points #76
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6ea7aa2
Fix route v8 multiple via points
271d160
Clean test
e991034
Merge pull request #1 from cecileprat/fix_multiple_viapoints
cecileprat fb3dc55
Bumping codecov version
9a75331
Bump responses version
5ac00a6
Merge branch 'master' into master
abdullahselek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of using
_
here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have 11 via points, you will have
via1
andvia10
indata
andmanipulation_keys
The first url built in
__get
will contain:via1=...&via10=..
Then we loop to replace those
manipulation_keys
(via1
andvia10
) by the one needed by HERE (via
):url.replace("via1", "via")
->via=...&via0=...
(it also replaces the first part ofvia10
)url.replace("via10", "via")
->via=...&via0=...
(it does nothing, so the second via point is not given through thevia
query parameter, and so HERE does not take the second via point into account)By creating
via1_
andvia10_
keys instead:given the url containing
via1_=...&via10_=..
url.replace("via1_", "via")
->via=...&via10_=...
(it replaces only the first key)url.replace("via10_", "via")
->via=...&via=...
(it replaces the second key)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification 👍 changes look good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind bumping the version of
codecov
to make the CI happy?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bumping the codecov version, it seems like your test is failing. Let's fix it and then we can merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Responses requires Python 3.8 or higher as I see, can you remove the previous versions from CI config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want me to remove it from
ci.yml
and.travis.yml
, but keeppython_requires=">=3.5"
insetup.py
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please, 3.5 has already reached end of life. It's a good time to stop supporting it. Please update the setup.py too.