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] Multiple parameters for route_v8 #84

Conversation

maciej-wichowski
Copy link
Contributor

  1. Improve encode_parameters method, so it processes dict parameters correctly. Here API expects multi-level dict to be expressed as key[sub1]=val1&key[sub2]=val2. The method supports only one level sub-dict, which as far as I know, should be enough.
  2. Fix route_v8 - avoid, exclude and truck parameters were not fully supported.

Fixes #83

@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.99%. Comparing base (a8f1b58) to head (e1e01ff).
Report is 2 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #84   +/-   ##
=======================================
  Coverage   92.98%   92.99%           
=======================================
  Files          26       26           
  Lines        1754     1755    +1     
=======================================
+ Hits         1631     1632    +1     
  Misses        123      123           
Flag Coverage Δ
unittests 92.99% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -6,7 +6,7 @@
__email__ = "[email protected]"
__copyright__ = "Copyright (c) 2017 Abdullah Selek"
__license__ = "MIT License"
__version__ = "3.6.4"
__version__ = "3.6.5"
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think we need to bump the version as 3.6.4 is not released yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry! I also bumped the version in #82 ...

herepy/utils.py Outdated
for key, value in parameters.items():
if isinstance(value, dict):
for key2, val2 in value.items():
res[f"{key}[{key2}]"] = val2
Copy link
Owner

Choose a reason for hiding this comment

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

Please format the code, I can see an extra space before val2. And also use better variable names for key2 and val2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks.

Copy link
Owner

@abdullahselek abdullahselek left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes! Looks good to me.

@abdullahselek abdullahselek merged commit a9a623f into abdullahselek:master Oct 17, 2024
21 of 22 checks passed
@maciej-wichowski maciej-wichowski deleted the fix-route_v8_multiple_parameters branch October 18, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In RoutingAPI.route_v8, some parameters are ignored.
3 participants