zimeon / ocfl-py

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

Fix handling of spec version in standalone inventory check #91

Closed zimeon closed 2 years ago

zimeon commented 2 years ago

To replicate example:

(py38) simeon@RottenApple ocfl-py> ./ocfl-validate.py extra_fixtures/1.1/good-objects/empty_fixity
INFO:ocfl.object:OCFL object at extra_fixtures/1.1/good-objects/empty_fixity is VALID
(py38) simeon@RottenApple ocfl-py> ./ocfl-validate.py extra_fixtures/1.1/good-objects/empty_fixity/inventory.json
[E038] OCFL Object standalone inventory `type` attribute has wrong value (see https://ocfl.io/1.0/spec/#E038)
INFO:ocfl.object:Standalone OCFL inventory at extra_fixtures/1.1/good-objects/empty_fixity/inventory.json is INVALID

Inventory is good, it is just v1.1

zimeon commented 2 years ago

Now happy with both 1.0 and 1.1 standalone inventory:

(py3) simeon@Cyser ocfl-py> ./ocfl-validate.py fixtures/1.0/good-objects/minimal_no_content/inventory.json
INFO:ocfl.object:Standalone OCFL inventory at fixtures/1.0/good-objects/minimal_no_content/inventory.json is VALID
(py3) simeon@Cyser ocfl-py> ./ocfl-validate.py fixtures/1.1/good-objects/minimal_no_content/inventory.json
INFO:ocfl.object:Standalone OCFL inventory at fixtures/1.1/good-objects/minimal_no_content/inventory.json is VALID