S3 copy utils - #73
Open
sharmishtaa wants to merge 5 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #73 +/- ##
==========================================
+ Coverage 93.99% 98.24% +4.25%
==========================================
Files 5 5
Lines 416 514 +98
==========================================
+ Hits 391 505 +114
+ Misses 25 9 -16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add utilities to s3.py for copying S3 folders with file filtering: - list_s3_objects: List objects with pagination support - copy_s3_object: Copy single S3 objects - delete_s3_objects: Batch delete with 1000-object limit handling - copy_s3_folder: Copy folders with tracking and automatic rollback on failure - create_filename_exclude_filter: Create filters supporting glob patterns, path patterns, and regex Add example scripts: - copy_s3_folder.py: Copy S3 folders with exclusion patterns - extract_startlabels_s3.py: Extract startlabels from single cliplabels file - extract_startlabels_s3_list.py: Batch process multiple cliplabels files Add comprehensive test coverage (18 new tests, 77% coverage for s3.py). All code passes linting with 88-character line limit. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add comprehensive documentation improvements: - Module-level note about boto3 client creation behavior - Document 5GB file size limit for copy_s3_object - Clarify that copy_s3_folder success return value is always True Add validation for partial delete failures: - Check delete_objects response for errors - Raise RuntimeError with detailed error messages on partial failure - Add test for partial deletion failure scenario This ensures rollback operations properly detect and report failures when some objects cannot be deleted. Coverage improved from 77% to 79% (22 tests passing). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
for more information, see https://pre-commit.ci
Resolve E501 (line too long) and F841 (unused variable) errors: - Break long lines in docstrings, comments, and code examples - Remove unused mock_copy variables in test functions - Reformat inline comments to comply with 79 character limit Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Achieve 100% test coverage for poseinterface/s3.py by adding tests for: - download_json_from_s3: success, NoSuchKey error, and other ClientErrors - upload_json_to_s3: successful upload - list_s3_objects: ClientError handling - copy_s3_object: ClientError handling - delete_s3_objects: ClientError handling - copy_s3_folder: rollback failure scenario All exception paths in except blocks are now covered. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before submitting a pull request (PR), please read the contributing guide.
Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)
Description
What is this PR
Why is this PR needed?
Copying files to the benchmark dataset
What does this PR do?
Adds some utils for copying data and some example scripts that use it.
References
Please reference any existing issues/PRs that relate to this PR.
How has this PR been tested?
Please explain how any new code has been tested, and how you have ensured that no existing functionality has changed.
Is this a breaking change?
No
Does this PR require an update to the documentation?
If any features have changed, or have been added. Please explain how the
documentation has been updated.
Checklist: