Add a convert option to zip the AM transfers#14
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an optional --zip/-z flag to vandockit convert to zip Archivematica (AM) transfer directories after conversion, and updates filesystem permission handling to support marking either directories or individual files read-only.
Changes:
- Add
--zip/-zClick option and plumb it through conversion execution. - Add
zip_dir()to create a zip archive for a transfer directory and remove the original directory. - Update
make_read_only()to accept either a directory or a file path; add a unit test for zipping behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| vandockit/main.py | Adds --zip/-z flag and forwards it into the conversion call. |
| vandockit/converters.py | Implements zipping logic and updates read-only permission handling to work on files or directories. |
| vandockit/tests/test_converters.py | Adds a unit test validating zip_dir() creates a zip and deletes the original directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
08f7f15 to
9c5e5e2
Compare
Fixes #13. - Add a `--zip` / `-z` option flag to the convert command that zips the AM transfers after they are created - Update the `make_read_only()` method so it can accept a file path or a directory path - Update check for an existing transfer to look for a zip file or a directory
9c5e5e2 to
c148087
Compare
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.
Fixes #13.
--zip/-zoption flag to the convert command that zips the AM transfers after they are createdmake_read_only()method so it can accept a file path or a directory path