services: updated file schema #5010
Annotations
8 errors and 2 warnings
Run tests:
tests/resources/test_iiif_image_api.py#L1
isort-check
from io import BytesIO
+import dictdiffer
from PIL import Image
from werkzeug.utils import secure_filename
-import dictdiffer
def publish_record_with_images(
|
Run tests:
tests/resources/test_iiif_image_api.py#L116
test_iiif_info
AssertionError: assert not [('add', '', [('width', 1280), ('height', 1024)])]
+ where [('add', '', [('width', 1280), ('height', 1024)])] = list(<generator object diff.<locals>._diff_recursive at 0x7faba134f120>)
+ where <generator object diff.<locals>._diff_recursive at 0x7faba134f120> = <function diff at 0x7fabc3778670>({'@context': 'http://iiif.io/api/image/2/context.json', '@id': 'https://127.0.0.1:5000/api/iiif/record:t8gcr-h1q70:test_image.png', 'profile': ['http://iiif.io/api/image/2/level2.json'], 'protocol': 'http://iiif.io/api/image', ...}, {'@context': 'http://iiif.io/api/image/2/context.json', '@id': 'https://127.0.0.1:5000/api/iiif/record:t8gcr-h1q70:test_image.png', 'height': 1024, 'profile': ['http://iiif.io/api/image/2/level2.json'], ...})
+ where <function diff at 0x7fabc3778670> = dictdiffer.diff
+ and {'@context': 'http://iiif.io/api/image/2/context.json', '@id': 'https://127.0.0.1:5000/api/iiif/record:t8gcr-h1q70:test_image.png', 'profile': ['http://iiif.io/api/image/2/level2.json'], 'protocol': 'http://iiif.io/api/image', ...} = <WrapperTestResponse 295 bytes [200 OK]>.json
|
Run tests:
tests/resources/test_iiif_presentation_api.py#L63
test_iiif_manifest_schema
AssertionError: assert not [ValidatorLogError('Key 'width' is required in 'canvas'', @ data['sequences'][0]['canvases'][0]['width']), ValidatorLogError('Key 'height' is required in 'canvas'', @ data['sequences'][0]['canvases'][0]['height'])]
+ where [ValidatorLogError('Key 'width' is required in 'canvas'', @ data['sequences'][0]['canvases'][0]['width']), ValidatorLogError('Key 'height' is required in 'canvas'', @ data['sequences'][0]['canvases'][0]['height'])] = <tripoli.tripoli.IIIFValidator object at 0x7faba5917520>.errors
|
Run tests:
tests/resources/test_iiif_presentation_api.py#L94
test_iiif_manifest
KeyError: 'height'
|
Run tests:
tests/resources/test_iiif_presentation_api.py#L178
test_iiif_manifest_restricted_files
AssertionError: assert {'@context': ...enioRDM', ...} == {'@context': ...enioRDM', ...}
Omitting 6 identical items, use -vv to show
Differing items:
{'sequences': [{'@id': 'https://127.0.0.1:5000/api/iiif/record:cpwws-m4p05/sequence/default', '@type': 'sc:Sequence', ...wws-m4p05/canvas/test_image.png', '@type': 'sc:Canvas', 'images': [{...}], ...}], 'label': 'Current Page Order', ...}]} != {'sequences': [{'@id': 'https://127.0.0.1:5000/api/iiif/record:cpwws-m4p05/sequence/default', '@type': 'sc:Sequence', ...:cpwws-m4p05/canvas/test_image.png', '@type': 'sc:Canvas', 'height': 1024, ...}], 'label': 'Current Page Order', ...}]}
Full diff:
{
'@context': 'http://iiif.io/api/presentation/2/context.json',
'@id': 'https://127.0.0.1:5000/api/iiif/record:cpwws-m4p05/manifest',
'@type': 'sc:Manifest',
'description': 'Manifest generated by InvenioRDM',
'label': 'A Romans story',
'metadata': [{'label': 'Publication Date',
'value': '2020-06-01'}],
'sequences': [{'@id': 'https://127.0.0.1:5000/api/iiif/record:cpwws-m4p05/sequence/default',
'@type': 'sc:Sequence',
'canvases': [{'@context': 'http://iiif.io/api/presentation/2/context.json',
'@id': 'https://127.0.0.1:5000/api/iiif/record:cpwws-m4p05/canvas/test_image.png',
'@type': 'sc:Canvas',
- 'height': 1024,
'images': [{'@context': 'http://iiif.io/api/presentation/2/context.json',
'@type': 'oa:Annotation',
'motivation': 'sc:painting',
'on': 'https://127.0.0.1:5000/api/iiif/record:cpwws-m4p05/canvas/test_image.png',
'resource': {'@id': 'https://127.0.0.1:5000/api/iiif/record:cpwws-m4p05:test_image.png/full/full/0/default.png',
'@type': 'dctypes:Image',
'format': 'image/png',
- 'height': 1024,
'service': {'@context': 'http://iiif.io/api/image/2/context.json',
'@id': 'https://127.0.0.1:5000/api/iiif/record:cpwws-m4p05:test_image.png',
- 'profile': 'http://iiif.io/api/image/2/level1.json'},
+ 'profile': 'http://iiif.io/api/image/2/level1.json'}}}],
? +++
- 'width': 1280}}],
- 'label': 'test_image.png',
+ 'label': 'test_image.png'}],
? ++
- 'width': 1280}],
'label': 'Current Page Order',
'viewingDirection': 'left-to-right',
'viewingHint': 'individuals'}],
}
|
Run tests:
tests/services/files/test_deleted_record_files.py#L55
test_deleted_records_file_flow
KeyError: 'storage_class'
|
Run tests:
tests/services/files/test_metadata_files.py#L49
test_valid_metadata_set
AssertionError: assert {} == {'charset': '...page': 1, ...}
Right contains 5 more items:
{'charset': 'utf-8',
'encoding': 'utf-8',
'language': 'en',
'page': 1,
'type': 'pdf'}
Full diff:
{
+ ,
- 'charset': 'utf-8',
- 'encoding': 'utf-8',
- 'language': 'en',
- 'page': 1,
- 'type': 'pdf',
}
|
Run tests
Process completed with exit code 1.
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Loading