Skip to content

Commit

Permalink
Merge remote-tracking branch 'kba/relax-ppi'
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Nov 5, 2019
2 parents 3e19ce3 + 8767e03 commit 14ed1af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ocrd_validators/ocrd_validators/workspace_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def _validate_pixel_density(self):
for k in ['xResolution', 'yResolution']:
v = exif.__dict__.get(k)
if v is None or v <= 72:
self.report.add_error("Image %s: %s (%s pixels per %s) is too low" % (f.ID, k, v, exif.resolutionUnit))
self.report.add_warning("Image %s: %s (%s pixels per %s) is too low" % (f.ID, k, v, exif.resolutionUnit))

def _validate_mets_file_group_names(self):
"""
Expand Down
8 changes: 4 additions & 4 deletions tests/validator/test_workspace_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ def test_validate_pixel_density_too_low(self):
workspace.mets.add_file('OCR-D-GT-BIN', ID='file1', mimetype='image/png', pageId='page1', url=imgpath)
workspace.save_mets()
report = WorkspaceValidator.validate(self.resolver, join(tempdir, 'mets.xml'), skip=[], download=True)
self.assertEqual(len(report.errors), 2)
self.assertIn("xResolution", report.errors[0])
self.assertIn("yResolution", report.errors[1])
self.assertEqual(len(report.warnings), 0)
self.assertEqual(len(report.warnings), 2)
self.assertIn("xResolution", report.warnings[0])
self.assertIn("yResolution", report.warnings[1])
self.assertEqual(len(report.errors), 0)
self.assertEqual(len(report.notices), 0)

def test_bad_workspace(self):
Expand Down

0 comments on commit 14ed1af

Please sign in to comment.