-
Notifications
You must be signed in to change notification settings - Fork 8
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
Test cases for bag-info values #8
Comments
This adds tests to confirm that order is preserved across duplicate keys and for case-insensitivity for custom key values. This is only half of the test since a library would need to confirm the expected output for key access and after saving.
is this getting into too much detail of the implementation? |
@johnscancella I'm a bit mixed on that but I've been leaning case-insensitive for everything since the info file is intended to be human-managed and humans tend not to care. It seems like a bug if someone has “Crawl-date” in one bag and “Crawl-Date” in another but a program only sees one of them because it used a case-sensitive library. What do you think - play it conservatively and add a spec update before finishing this ticket? This might either be partially out of scope or otherwise incompatible with this repo currently since we only collect valid/invalid bags and this would be a discrepancy in how a tool processes the bag rather than a question of validity. |
I vote to say make a spec update and say that keys are case insensitive but the values are case sensitive since there might be some special meaning. I would also add that implementations should preserve case of the keys as entered. That way you can do something like
|
Definitely, I’m certain the intention was always that only keys were case-insensitive.
I wonder how we should recommend a test process: what we have right now is basic compliance where a bag is valid or invalid. Do you think we should specify that testing has to include a load-save cycle or have that as something like compliance levels where a level 1 implementation could just be something which validates but can’t even do anything else?
|
Yeah, we can specify that in the README and use bagit.py and bagit-java as source implementations to look at for testing. |
In discussion with @johnscancella and @reeset on reeset/bagit_sharp#1 had some additions to the duplicate metadata testcase:
The text was updated successfully, but these errors were encountered: