-
Notifications
You must be signed in to change notification settings - Fork 28
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
GH-211 Fixed issue for datasets with '#' in URL #212
GH-211 Fixed issue for datasets with '#' in URL #212
Conversation
Codecov ReportPatch coverage is
📢 Thoughts on this report? Let us know!. |
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.
@KUGDev Thanks for your contribution to the Python SDK 🙂
Left a comment regarding how we should handle URL encoding
def __adjust_for_url(self, str_to_adjust): | ||
"""Adjust string to be correct in a URL | ||
|
||
Returns | ||
------- | ||
adjusted_str | ||
A string with special characters, acceptable for a URL | ||
""" | ||
|
||
return str_to_adjust.replace("#", "%23") if str_to_adjust is not None else None |
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.
#
is probably not the only character that needs to be encoded. Could we use a method like urllib.parse.quote
here that encodes all special characters in the URL?
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.
@t1m0thyj thanks for the comment. I've tried other possible dataset names, looks like they are ok to use inside of URL (such as with @ and $ chars in them). But of course, it could be better to use the urllib.parse.quote
to prevent further issues. Will do
@t1m0thyj hi, I've added the changes. Should I do >80% coverage? Some of the functions are not covered with tests, so the codecov does not allow to pass the patch as successful |
Hi, I also discovered, that this problem relates to other places in the SDK |
8a32eac
to
5e5bb8b
Compare
@t1m0thyj @adam-wolfe I've finished the issue, could you please make a review? |
…in URL Signed-off-by: Uladzislau <[email protected]>
5e5bb8b
to
b55846a
Compare
Hello @t1m0thyj @adam-wolfe |
Looks good to me. Thanks! |
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.
LGTM, thanks @KUGDev!
What It Does
fix for #211
How to Test
Test all the functions, related to work with datasets and members with '#' character in their names
Review Checklist
I certify that I have:
Additional Comments