-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complete and validate #13
Conversation
|
||
/** | ||
* Verifies if a bag is complete. | ||
* According to the BagIt v16 specs, a bag is complete when: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use spelled out "version 16" for the release "versions" and "V1.0", "V0.97" for main versions.
/** | ||
* Verifies if a bag is complete. | ||
* According to the BagIt v16 specs, a bag is complete when: | ||
* <ul> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Scaladoc "markdown" (?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't find it. you got a reference?
(bag / "bagit.txt").toJava should exist | ||
bag.data.toJava should exist | ||
bag.glob("manifest-*.txt").toList should not be empty | ||
bag.fetchFiles shouldBe empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to check first if your test data is correct?
Fixes #1
Implements
isComplete
isValid
...according to the BagIt specs. Both methods return
Either[String, Unit]
, meaning that if the bag is complete/valid, it returnsRight[Unit]
and if the bag is not complete/valid, it returnsLeft[String]
, with theString
containing the message why the bag is not complete/valid.@janvanmansum @lindareijnhoudt @jo-pol for review