zimeon / ocfl-py

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

Storage Root `extensions/` directory flagged as validation error #76

Closed awoods closed 3 years ago

awoods commented 3 years ago

When using a custom storage layout extension, the configuration of the extension is placed in the storage root as: [storage-root]/extensions/NNNN-flat-omit-prefix-storage-layout/config.json

The ocfl-validate utility flags this as an error:

[E072] OCFL storage root hierarchy include directory /extensions/NNNN-flat-omit-prefix-storage-layout with at least one file but no object declaration. Such additional files are not allowed (see https://ocfl.io/1.0/spec/#E072)

Per the spec, I believe this should be valid. See: https://ocfl.io/1.0/spec/#storage-root-extensions

zimeon commented 3 years ago

Agree that this is a bug -- there simply isn't code to handle extensions directories in storage roots at present, will fix

I also note that while the spec https://ocfl.io/1.0/spec/#storage-root-extensions is clear that an error in the storage root extensions structure should result in E086, there is no warning code defined for use of an unregistered extension in a storage root. The code W013 is used in object roots. I will use a local code for now (W901) and file a spec issue

zimeon commented 3 years ago

--> https://github.com/OCFL/spec/issues/557