Skip to content

Commit 5b9260f

Browse files
authored
Update create_nas_folder Method and Update Metadata Output
Why these changes are being introduced: In the last PR, an issue was raised with the create_nas_folder returning a Boolean instead of raising exceptions in the method itself. Duing testing, Joe asked that the Dropbox-style SHA256 checksum be made available to the user running the script. We agreed that it was best if that metadata was just another line in the metadata JSON file that is saved to the folder on the NAS. How this addresses that need: * Update the `create_nas_folder()` method in the Archive class to return None by switching the return statements to raise statements instead * Update the CLI commands that use this method to remove any Boolean references * Update the tests for this method to look for exceptions instead of Boolean values * Rename the static method that calculates the Dropbox-style SHA256 checksum on the file in the NAS (to make it more clear what that method is actually doing) * Update the return value for the copy from Dropbox to NAS method to return a pair of strings (the timestamp and the content_hash metadata) * Update the bulk_file_copy command to add the content_has metadata to the JSON file in the target Resolves: #9 (GH issue) Related Jira Tickets: * https://mitlibraries.atlassian.net/browse/IR-217
1 parent 7b63a62 commit 5b9260f

5 files changed

Lines changed: 295 additions & 309 deletions

File tree

0 commit comments

Comments
 (0)