zimeon / ocfl-py

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

Correct handling of E103 fixture #96

Closed zimeon closed 2 years ago

zimeon commented 2 years ago

Fixture https://github.com/OCFL/fixtures/pull/101 has 1.1, 1.0, 1.1 spec versions for v1,2,3. ocfl-py gives a bad error message:

> ./ocfl-validate.py fixtures/1.1/bad-objects/E103_older_spec_v2
[E038a] OCFL Object v2 inventory `type` attribute has wrong value (expected https://ocfl.io/1.1/spec/#inventory, got https://ocfl.io/1.0/spec/#inventory) (see https://ocfl.io/1.0/spec/#E038)
INFO:ocfl.object:OCFL object at fixtures/1.1/bad-objects/E103_older_spec_v2 is INVALID
zimeon commented 2 years ago

Now gives correct error:

ocfl-py> ./ocfl-validate.py fixtures/1.1/bad-objects/E103_older_spec_v2
[E103] OCFL Object v2 inventory conforms to specification version 1.0 which is an earlier version than the v1 inventory which conforms to specification version 1.1 (see https://ocfl.io/1.0/spec/#E103)
INFO:ocfl.object:OCFL object at fixtures/1.1/bad-objects/E103_older_spec_v2 is INVALID