zimeon / ocfl-py

OCFL tools in Python
MIT License
20 stars 6 forks source link

good-storage-roots/reg-extension-dir-root is not valid #102

Closed srerickson closed 2 years ago

srerickson commented 2 years ago

One of the fixtures, good-storage-roots/reg-extension-dir-root, is not valid as expected because the storage layout doesn't conform with the declared extension.

I think the correct storage location for ark:123/abc is a47/817/83d/cec/ark%3a123%2fabc

zimeon commented 2 years ago

Thank you @srerickson ! I agree on both counts.

I think I got this digest wrong because I did:

> echo "ark:123/abc" | shasum -a 256
b02c71b67afeeb7adcf12259e94f909bdc9c95e29c9f180f466e10a96420f6f4  -

when I should have done:

> echo -n "ark:123/abc" | shasum -a 256
a4781783dceceffe7af9af3fc4299cc6c93dc87754d6353d31a9e44e8a2838a0  -

or

> python -c 'import hashlib; print(hashlib.sha256(b"ark:123/abc").hexdigest())'
a4781783dceceffe7af9af3fc4299cc6c93dc87754d6353d31a9e44e8a2838a0
zimeon commented 2 years ago

Example file dir and name fixed but I note there isn't yet code in ocfl/store.py so that ocfl-validate.py will check any of this