GithubHelp home page GithubHelp logo

bagit-split's Issues

RuntimeError exposed to user

When running bag-split.py in unsplit mode, a RuntimeError is raised and exposed to the user:

python bag-split.py unsplit /home/mark/Downloads/bagsplittest/marksbag_split/
Validating bag marksbag_2... success.
Validating bag marksbag_1... success.
Validating bag marksbag_0... success.
Copying payload from marksbag_0...
Copying payload from marksbag_1...
Copying payload from marksbag_2...
New manifest does NOT appear consistent with the split manifests!
Traceback (most recent call last):
File "bag-split.py", line 344, in <module>
unsplit(bag_path, args.output_dir, args.no_verify)
File "bag-split.py", line 237, in unsplit
raise RuntimeError("merged bag manifest inconsistent with split " \
RuntimeError: merged bag manifest inconsistent with split manifests 

It might be worth using a try/except around lines 321-238 or some other way of printing a more friendly form of the message to the user (similar to the "New manifest does NOT appear consistent with the split manifests!" message).

Manifest mismatches

In both the spit and unsplit operations, it appears that manifest mismatches are always reported:

python bag-split.py split /home/mark/Downloads/bagsplittest/marksbag
Verifying bag marksbag_2... success.
Verifying bag marksbag_1... success.
Verifying bag marksbag_0... success.
Verifying original bag integrity... success.
Original manifest does NOT appear consistent with the split manifests! Diff:
set([])
set([])
Creating metadata bag: marksbag_metadata
Found file: manifest-md5.txt
Found file: bag-info.txt
Found file: data
Found file: bagit.txt
Found file: tagmanifest-md5.txt 

and

python bag-split.py unsplit /home/mark/Downloads/bagsplittest/marksbag_split/
Validating bag marksbag_2... success.
Validating bag marksbag_1... success.
Validating bag marksbag_0... success.
Copying payload from marksbag_0...
Copying payload from marksbag_1...
Copying payload from marksbag_2...
New manifest does NOT appear consistent with the split manifests!
Traceback (most recent call last):
File "bag-split.py", line 344, in <module>
unsplit(bag_path, args.output_dir, args.no_verify)
File "bag-split.py", line 237, in unsplit
raise RuntimeError("merged bag manifest inconsistent with split " \
RuntimeError: merged bag manifest inconsistent with split manifests

(I'll open a separate issue for the RuntimeError).

The code that compares the manifests lives around line 130.

Bag Splitting post Bag-it 5.x

LOC is removing the CLI tools from bagit-java in version 5, essentially breaking this script. Since bagit-python, bagit ruby (https://github.com/tipr/bagit), and bagger all do not have bag splitting capability, the only way for institutions to split bags is to write JAVA code, which is not feasible for all dev shops. Any thought to updating this script to make direct use of the Java library?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.