-
Notifications
You must be signed in to change notification settings - Fork 68
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
[SYNPY-1370] Documentation Upgrade #1032
Conversation
Hello @jaymedina! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2024-01-03 16:38:02 UTC |
Excellent start! When you get to another stopping point please use the |
@@ -7,7 +7,11 @@ functions. Use at your own risk. | |||
## Multipart Upload | |||
|
|||
::: synapseclient.core.upload.multipart_upload | |||
::: synapseclient.core.upload.multipart_upload._multipart_upload | |||
|
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.
I removed the explicit call to ::: synapseclient.core.upload.multipart_upload._multipart_upload
because it looked confusing in the documentation, and I wanted to have a conversation about it later. From a quick scan of the documentation, this looks to be the only hidden function that's explicitly documented. I see why that is: The returns of the other functions are calls to _multipart_upload
, and so references to it are made in the Multipart section of Core. But this goes back to a previous conversation of whether or not we should expose the documentation of a hidden function and vice versa. To me if something is hidden with _
, it's best not to add it to the documentation because it will be hidden from the user unless it's explicitly called, so it's best to avoid possible confusion with users that aren't experts in Python. But I'm up for iterating on this before a final review.
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.
One thing we can explicitly state is that people should use functions within core
at their own risk. There's not really anything "hidden" within Python packages, but the functions within core
are for developers only and aren't part of the "public" Python API.
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 I mean by hidden is that the functions led by _
are denoted to be for internal use only, and won't be available unless explicitly called, so it's not functionality that's immediately available to users (a user would have to look inside the code to know it's there).
But based on what you're saying, it sounds like we want to document everything in core
, both internal and external functions since core
is for users that are more advanced to begin with. If that's the case, I would re-add _multipart_upload
and update its docstring, and also expose retry.py
's _get_message
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.
All functions in core
and this package should have docstrings even if they aren't surfaced on the online python documentation site for development purposes and code readability.
I don't think we actually need all of core
to be available in the online python documentation site, but we should document that the functions in core
are subject to change at any time and for python client users to use at their own risk.
Hey @BryanFauble , happy new year 🙂 Just wanted quick clarification on the pep8-speaks status report on my PR: Did you want us to follow black's 88 character line-length rule you configured pep8-speaks to follow? Or should I just focus on resolving the SonarCloud issues (SonarCloud is following 120 char. limit)? |
@jaymedina Let's follow the 88 character limit. Sometimes we won't be able to always follow it. In some cases I have seen that having a URL that spans multiple lines breaks when it's rendered on the doc site, but we should strive to follow it as close as we can. I went ahead and updated the SonarCloud rule to follow this 88 limit. |
@BryanFauble, there are no replacements to these so I won't mark them as deprecated, and they're called in other parts of the repo ( Edit: Currently investigating, but not sure what's going on with the Ubuntu 3.8 tests. I'm locally running the failing unit tests ( |
Co-authored-by: BryanFauble <[email protected]>
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.
Excellent works! Thanks for taking your time to think through all of these changes.
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 41 New issues |
Great, thanks reviewers for the help |
This PR will update the following documentation:
Should also add this to https://github.com/Sage-Bionetworks/synapsePythonClient/blob/develop/docs/reference/core.md