Skip to content

Conversation

@fg-mindee
Copy link
Contributor

This PR introduces the following modifications:

  • added specific image reading errors: as pointed out by @mohamedmindee, cv2.imread yields a None whether the file is incorrectly located or of the wrong type, which is now fixed
  • added specific unittests to check the new behaviour

Any feedback is welcome!

@fg-mindee fg-mindee added type: enhancement Improvement module: io Related to doctr.io ext: tests Related to tests folder labels Feb 9, 2021
@fg-mindee fg-mindee added this to the 0.2.0 milestone Feb 9, 2021
@fg-mindee fg-mindee self-assigned this Feb 9, 2021
@codecov
Copy link

codecov bot commented Feb 9, 2021

Codecov Report

Merging #79 (f058815) into main (14279aa) will increase coverage by 0.54%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
+ Coverage   93.90%   94.44%   +0.54%     
==========================================
  Files          24       24              
  Lines         787      792       +5     
==========================================
+ Hits          739      748       +9     
+ Misses         48       44       -4     
Flag Coverage Δ
unittests 94.44% <100.00%> (+0.54%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
doctr/documents/reader.py 100.00% <100.00%> (ø)
doctr/models/core.py 85.71% <0.00%> (+8.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 14279aa...e210f5a. Read the comment docs.

@fg-mindee fg-mindee merged commit 921e228 into main Feb 9, 2021
@fg-mindee fg-mindee deleted the reader-fix branch February 9, 2021 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext: tests Related to tests folder module: io Related to doctr.io type: enhancement Improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants