[SYNPY-1799, SYNPY-1804] Add manifest generation to sync_from_synapse#1354
Open
[SYNPY-1799, SYNPY-1804] Add manifest generation to sync_from_synapse#1354
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds manifest CSV generation to StorableContainer.sync_from_synapse() so downloaded content can be re-uploaded via sync_to_synapse using an interoperable manifest.csv format (matching Synapse UI download cart / CLI column naming).
Changes:
- Added manifest CSV helpers and integrated manifest generation into
StorableContainer.sync_from_synapse_async()withmanifest={all,root,suppress}. - Deprecated legacy
synapseutils.syncFromSynapse()to steer users toStorableContainer.sync_from_synapse. - Added/updated unit tests around manifest behavior and the deprecation warning.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
synapseclient/models/mixins/storable_container.py |
Adds CSV manifest generation helpers and hooks manifest generation into sync flow. |
synapseclient/models/protocols/storable_container_protocol.py |
Updates protocol signature/docs to include manifest parameter. |
synapseutils/sync.py |
Marks syncFromSynapse as deprecated with guidance to use StorableContainer.sync_from_synapse. |
tests/unit/synapseclient/models/async/unit_test_folder_async.py |
Adds tests for manifest behavior and CSV helper functions. |
tests/unit/synapseutils/unit_test_synapseutils_sync.py |
Adds a test asserting the deprecation warning is emitted. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
andrewelamb
requested changes
Apr 13, 2026
Contributor
|
Thanks @danlu1! I left some comments. You'll also need to update the docs folder:
|
…eneration for recursive calls
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.
Problem:
StorableContainer.sync_from_synapse() does not generate a manifest file after downloading content from Synapse. We want to add manifest generation similar to synapseutils.syncFromSynapse() so users can use that manifest for uploading data via sync_to_synapse.
Solution:
_extract_entity_metadata_for_manifest_csv()— extracts per-file rows and discovers annotation column keys dynamically_write_manifest_data_csv()— writes the CSV using DictWritergenerate_manifest_csv()— public entry point, skips gracefully if path or files are absentstorable_container_protocol.pywas updated to keep the sync and async signatures in alignment.Testing:
Unit tests and integration tests were added.