Skip to content

Add a convert option to zip the AM transfers#14

Merged
djjuhasz merged 1 commit intomainfrom
dev/issue-13-zip-am-transfers
Apr 24, 2026
Merged

Add a convert option to zip the AM transfers#14
djjuhasz merged 1 commit intomainfrom
dev/issue-13-zip-am-transfers

Conversation

@djjuhasz
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/-z Click 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.

Comment thread vandockit/converters.py Outdated
Comment thread vandockit/converters.py
Comment thread vandockit/converters.py Outdated
Comment thread vandockit/__main__.py Outdated
Comment thread vandockit/converters.py Outdated
Comment thread vandockit/converters.py Outdated
Comment thread vandockit/converters.py Outdated
Comment thread vandockit/converters.py Outdated
Comment thread vandockit/tests/test_converters.py Outdated
Comment thread vandockit/tests/test_converters.py Outdated
@djjuhasz djjuhasz force-pushed the dev/issue-13-zip-am-transfers branch 2 times, most recently from 08f7f15 to 9c5e5e2 Compare April 24, 2026 04:07
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
@djjuhasz djjuhasz force-pushed the dev/issue-13-zip-am-transfers branch from 9c5e5e2 to c148087 Compare April 24, 2026 04:11
@djjuhasz djjuhasz requested a review from jraddaoui April 24, 2026 04:12
@djjuhasz djjuhasz self-assigned this Apr 24, 2026
@djjuhasz djjuhasz added the enhancement New feature or request label Apr 24, 2026
@djjuhasz djjuhasz removed this from Enduro Team Apr 24, 2026
Copy link
Copy Markdown
Collaborator

@jraddaoui jraddaoui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@djjuhasz djjuhasz merged commit e3ff3ca into main Apr 24, 2026
1 check passed
@djjuhasz djjuhasz deleted the dev/issue-13-zip-am-transfers branch April 24, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add an option to zip the converted AM transfers

3 participants