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

GH-211 Fixed issue for datasets with '#' in URL #212

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

KUGDev
Copy link
Contributor

@KUGDev KUGDev commented Sep 4, 2023

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

@codecov
Copy link

codecov bot commented Sep 4, 2023

Copy link
Member

@t1m0thyj t1m0thyj left a 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

Comment on lines 50 to 59
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
Copy link
Member

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?

Copy link
Contributor Author

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

@KUGDev
Copy link
Contributor Author

KUGDev commented Sep 5, 2023

@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

@KUGDev KUGDev requested a review from t1m0thyj September 5, 2023 18:16
@KUGDev
Copy link
Contributor Author

KUGDev commented Sep 6, 2023

Hi, I also discovered, that this problem relates to other places in the SDK
Will be working on this

@KUGDev KUGDev force-pushed the bugfix/GH-211-sharp-to-url-acceptable branch from 8a32eac to 5e5bb8b Compare September 7, 2023 17:39
@KUGDev
Copy link
Contributor Author

KUGDev commented Sep 7, 2023

@t1m0thyj @adam-wolfe I've finished the issue, could you please make a review?

@KUGDev KUGDev force-pushed the bugfix/GH-211-sharp-to-url-acceptable branch from 5e5bb8b to b55846a Compare September 11, 2023 09:48
@KUGDev
Copy link
Contributor Author

KUGDev commented Sep 11, 2023

Hello @t1m0thyj @adam-wolfe
Thanks for the comments, I've changed the functionality according to the requirements

@KUGDev KUGDev requested a review from adam-wolfe September 11, 2023 09:49
@adam-wolfe
Copy link

Looks good to me. Thanks!

Copy link
Member

@t1m0thyj t1m0thyj left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @KUGDev!

@t1m0thyj t1m0thyj merged commit 3b4c6ea into zowe:main Sep 11, 2023
18 of 19 checks passed
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.

3 participants