Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing a missing type in info.json #85

Merged
merged 6 commits into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ python:
- "3.6"
install:
- pip install tox tox-travis coveralls
- pip install setuptools -U
- python setup.py install
script:
- tox
Expand Down
2 changes: 1 addition & 1 deletion iiif_validator/tests/info_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def run(self, result):
self.validationInfo.check('type-is-int: width', type(t['width']), int, result)
# extra version 3.0 checks
if result.version[0] == "3":
self.validationInfo.check('correct-type', info['type'], "ImageService3", result, "Info.json missing required type of ImageService3.")
self.validationInfo.check('correct-type', 'type' in info and info['type'], "ImageService3", result, "Info.json missing required type of ImageService3.")
self.validationInfo.check('license-renamed', 'license' in info, False, result,'license has been renamed rights in 3.0',warning=True)
if 'rights' in info:
self.validationInfo.check('type-is-uri: rights', info['rights'].startswith('http'), True, result,'Rights should be a single URI from Creative Commons, RightsStatements.org or URIs registered as extensions.')
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
lxml
bottle
python-magic
pillow
# Versions including 7 don't support python 2.x
pillow<7
mock
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@
long_description=open('README').read(),
url='http://github.com/IIIF/image-api',
install_requires=[
"Pillow>=3.2.0",
"bottle>=0.12.1",
"python-magic>=0.4.12",
"lxml>=3.7.0"
],
extras_require={
':python_version>="3.0"': ["Pillow>=3.2.0"],
':python_version<"3.0"': ["Pillow==6.2.2"],
},
test_suite="tests",
tests_require=["mock"])