-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -834,16 +834,16 @@ def add_private_data_to_folder_start( | |||||||||
| return self._add_data_to_folder_start(integration_id, private_files, ignore_errors) | ||||||||||
|
|
||||||||||
| def sync_private_data_with_cloud_synced_folder_start(self) -> UUID: | ||||||||||
| """Start synchronization of a cloud-synced folder with its remote cloud storage bucket. | ||||||||||
| """Starts synchronization of a cloud-synced folder with its remote cloud storage bucket. | ||||||||||
|
|
||||||||||
| This method triggers a synchronization job that scans the cloud storage bucket linked | ||||||||||
| to this folder and updates the Encord storage folder to match. The synchronization is | ||||||||||
| performed asynchronously in the background, and this method returns immediately with | ||||||||||
| a job UUID that can be used to track the progress. | ||||||||||
| 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. | ||||||||||
|
Comment on lines
+840
to
+842
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.'
Suggested change
|
||||||||||
|
|
||||||||||
| The synchronization process: | ||||||||||
| 1. Scans the cloud bucket for files | ||||||||||
| 2. Creates new storage items for files that exist in the bucket but not in the folder | ||||||||||
| 1. Scans the cloud bucket for files. | ||||||||||
| 2. Creates new storage items for files that exist in the bucket but not in the cloud-synced folder. | ||||||||||
| 3. Updates the tombstone status of items (marks as tombstone if deleted from bucket, | ||||||||||
| restores if re-added) | ||||||||||
| 4. Updates items if they have the same path but different content (different checksum) | ||||||||||
|
|
@@ -858,8 +858,8 @@ def sync_private_data_with_cloud_synced_folder_start(self) -> UUID: | |||||||||
|
|
||||||||||
| Note: | ||||||||||
| This method can only be used with folders created with cloud_synced_folder_params. | ||||||||||
| The SDK process can be terminated after starting the job - the synchronization | ||||||||||
| will continue running on the server. | ||||||||||
| The SDK process can be terminated after starting the job. The synchronization | ||||||||||
| continues running on the server. | ||||||||||
| """ | ||||||||||
|
|
||||||||||
| sync_job_uuid = self._api_client.post( | ||||||||||
|
|
@@ -884,7 +884,7 @@ def sync_private_data_with_cloud_synced_folder_get_result( | |||||||||
| """Poll for the results of a cloud-synced folder synchronization job. | ||||||||||
|
|
||||||||||
| This method polls for the status of a synchronization job started with | ||||||||||
| `sync_private_data_with_cloud_synced_folder_start()`. It uses long polling to efficiently | ||||||||||
| `sync_private_data_with_cloud_synced_folder_start()`. It uses long polling to | ||||||||||
| wait for job completion without constantly making API requests. The method returns once | ||||||||||
| the job completes or the timeout is reached. | ||||||||||
|
|
||||||||||
|
|
@@ -902,7 +902,7 @@ def sync_private_data_with_cloud_synced_folder_get_result( | |||||||||
| with this folder. | ||||||||||
|
|
||||||||||
| Note: | ||||||||||
| This method will log progress information as it polls for results. For very large | ||||||||||
| This method logs progress information as it polls for results. For very large | ||||||||||
| buckets, the synchronization process can take a significant amount of time. | ||||||||||
| """ | ||||||||||
|
|
||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1204,8 +1204,8 @@ def create_storage_folder( | |||||||||||
| client_metadata: Optional arbitrary metadata to be associated with the folder. Should be a dictionary | ||||||||||||
| that is JSON-serializable. | ||||||||||||
| 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 will create cloud synced folder, leaving this a `None` will create | ||||||||||||
| a normal folder for further data uploads. | ||||||||||||
| cloud_synced_folder_params: Passing this parameter creates a cloud-synced folder. Specifying `None` creates | ||||||||||||
| a normal folder for data uploads. | ||||||||||||
|
Comment on lines
+1207
to
+1208
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider changing 'leaving this a
Suggested change
|
||||||||||||
|
|
||||||||||||
| Returns: | ||||||||||||
| The created storage folder. See :class:`encord.storage.StorageFolder` for details. | ||||||||||||
|
|
||||||||||||
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.
For consistency, consider using the same tense and capitalization as other status descriptions. For example, 'The synchronization job has successfully completed.'