zimeon / ocfl-py

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

ocfl_layout.json created with invalid key "key" #83

Closed spikelynch closed 2 years ago

spikelynch commented 2 years ago

An OCFL store created with the --disposition flag set is invalid, as the ocfl_layout.json still has "key" rather than "extension"

Steps to reproduce:

% ocfl-store.py --init --root my_repo --disposition pairtree
INFO:root:Created OCFL storage root my_repo
% ocfl-validate.py my_repo
INFO:root:Storage root structure is INVALID (OCFL storage root my_repo has layout file that can't be read (Storage root my_repo has layout file doesn't have required extension and description string entries))
INFO:root:Objects checked: 0 / 0 are VALID
INFO:root:Storage root my_repo is INVALID
zimeon commented 2 years ago

Oops, thanks @spikelynch ! The current code certainly doesn't agree with https://ocfl.io/1.0/spec/#root-structure

zimeon commented 2 years ago

Test above (thanks for such a good way to recreate) now works:

simeon@RottenApple ocfl-py> ./ocfl-store.py --init --root my_repo --disposition pairtree
INFO:root:Created OCFL storage root my_repo
(py38) simeon@RottenApple ocfl-py> ./ocfl-validate.py my_repo
INFO:root:Storage root structure is VALID
INFO:root:Objects checked: 0 / 0 are VALID

INFO:root:Storage root my_repo is VALID

but I'll note that support for a storage root is still very limited.