-
Notifications
You must be signed in to change notification settings - Fork 15
Cloud-synced Folder Docstrings updates #899
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
base: master
Are you sure you want to change the base?
Cloud-synced Folder Docstrings updates #899
Conversation
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.
Hello @Laverne-Encord, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request focuses on updating the docstrings for cloud-synced folder functionality. The changes clarify the behavior of the synchronization process, the meaning of different synchronization statuses, and the usage of related methods. The goal is to improve the clarity and accuracy of the documentation for developers using these features.
Highlights
- Docstring Updates: Improved clarity and accuracy of docstrings for cloud-synced folder functionality in
encord/orm/storage.py,encord/storage.py, andencord/user_client.py. - Clarification of Synchronization Status: Refined the descriptions of
SyncPrivateDataWithCloudSyncedFolderStatusenum values to provide more precise information about the state of the synchronization job. - Method Documentation: Enhanced the documentation for methods like
sync_private_data_with_cloud_synced_folder_start()andcreate_storage_folder()to better explain their purpose, usage, and behavior.
Changelog
Click here to see the changelog
- encord/orm/storage.py
- Updated docstrings for
SyncPrivateDataWithCloudSyncedFolderStatusenum to clarify the meaning of each status (IN_PROGRESS, DONE, ERROR). - Improved wording for the DONE status to indicate that individual items may still have failed to process.
- Updated docstrings for
- encord/storage.py
- Modified the docstring for
sync_private_data_with_cloud_synced_folder_start()to clarify that it starts the synchronization process. - Improved the description of the synchronization process steps.
- Clarified that the SDK process can be terminated after starting the job.
- Removed 'efficiently' from the description of long polling in
sync_private_data_with_cloud_synced_folder_get_result(). - Changed 'will log' to 'logs' in the note for
sync_private_data_with_cloud_synced_folder_get_result().
- Modified the docstring for
- encord/user_client.py
- Updated the docstring for
create_storage_folder()to clarify the usage of thecloud_synced_folder_paramsparameter.
- Updated the docstring for
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
A docstring's gentle art,
To guide the coder's heart.
With words so clear and bright,
It banishes the night,
And helps good software start.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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.
Code Review
The pull request updates docstrings related to cloud-synced folders, improving clarity and consistency. The changes are focused and well-scoped, addressing specific areas where the existing documentation could be enhanced.
Summary of Findings
- Docstring Consistency: In the
SyncPrivateDataWithCloudSyncedFolderStatusenum, the docstrings for theDONEandERRORstatuses use different phrasing and capitalization for similar concepts. Consistency in wording and capitalization improves readability and understanding. - Docstring Clarity: In the
sync_private_data_with_cloud_synced_folder_startmethod, the docstring could benefit from more precise language to clearly distinguish between the cloud storage bucket and the cloud-synced folder. - Grammar and Style: Several docstrings contain minor grammatical or stylistic issues that could be improved for clarity and professionalism.
Merge Readiness
The pull request is almost ready for merging. Addressing the identified issues related to docstring consistency, clarity, and grammar will further improve the quality of the code. I am unable to directly approve this pull request, and recommend that others review and approve this code before merging. Given the medium severity comments, I recommend that the pull request not be merged until those are addressed (at a minimum).
| DONE = auto() | ||
| """ | ||
| The synchronization job has successfully completed. | ||
| The synchronization job successfully completed. |
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.
| to the cloud-synced folder. Synchronization between cloud storage and the cloud-synced folder is | ||
| performed asynchronously in the background. This method returns immediately with | ||
| a job UUID that can be used to track the synchronization progress. |
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.
To improve clarity, consider rephrasing to explicitly state the relationship between the cloud storage and the cloud-synced folder. For example, '...linked to the cloud storage bucket for this cloud-synced folder.'
| to the cloud-synced folder. Synchronization between cloud storage and the cloud-synced folder is | |
| performed asynchronously in the background. This method returns immediately with | |
| a job UUID that can be used to track the synchronization progress. | |
| to the cloud storage bucket for this cloud-synced folder. Synchronization between cloud storage and the cloud-synced folder is |
| cloud_synced_folder_params: Passing this parameter creates a cloud-synced folder. Specifying `None` creates | ||
| a normal folder for data uploads. |
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.
Consider changing 'leaving this a None' to 'specifying None' for better clarity.
| cloud_synced_folder_params: Passing this parameter creates a cloud-synced folder. Specifying `None` creates | |
| a normal folder for data uploads. | |
| client_metadata: Optional arbitrary metadata to be associated with the folder. Should be a dictionary | |
| parent_folder: The parent folder of the folder; or `None` if the folder is to be created at the root level. | |
| cloud_synced_folder_params: Passing this parameter creates a cloud-synced folder. Specifying `None` creates |
Unit test report (Pydantic 1.x)238 tests 238 ✅ 11s ⏱️ Results for commit 1821ed2. |
Unit test report ((Pydantic 2.x)238 tests 238 ✅ 9s ⏱️ Results for commit 1821ed2. |
Cloud-synced Folder Docstrings updates