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

test: Improves coverage by adding missing unittests #545

Merged
merged 5 commits into from
Oct 26, 2021

Conversation

fg-mindee
Copy link
Contributor

This PR generally improves coverage by introducing the following modifications:

  • renamed doctr/models/recognition/predictor/base.py → doctr/models/recognition/predictor/_utils.py
  • added unittest for PyTorch recognition predictor inference
  • added unittest for file_utils
  • added unittest for crop split/merge

Any feedback is welcome!

@fg-mindee fg-mindee added type: enhancement Improvement module: models Related to doctr.models ext: tests Related to tests folder labels Oct 26, 2021
@fg-mindee fg-mindee added this to the 0.4.1 milestone Oct 26, 2021
@fg-mindee fg-mindee self-assigned this Oct 26, 2021
@codecov
Copy link

codecov bot commented Oct 26, 2021

Codecov Report

Merging #545 (a07ba71) into main (bf327eb) will increase coverage by 0.59%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #545      +/-   ##
==========================================
+ Coverage   95.36%   95.95%   +0.59%     
==========================================
  Files         109      109              
  Lines        4182     4182              
==========================================
+ Hits         3988     4013      +25     
+ Misses        194      169      -25     
Flag Coverage Δ
unittests 95.95% <100.00%> (+0.59%) ⬆️

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

Impacted Files Coverage Δ
doctr/models/recognition/predictor/_utils.py 100.00% <ø> (ø)
doctr/models/recognition/predictor/pytorch.py 90.90% <100.00%> (+3.03%) ⬆️
doctr/models/recognition/predictor/tensorflow.py 91.17% <100.00%> (ø)
doctr/models/predictor/pytorch.py 100.00% <0.00%> (+33.33%) ⬆️

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 bf327eb...a07ba71. Read the comment docs.

Copy link
Collaborator

@charlesmindee charlesmindee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fg-mindee fg-mindee merged commit 2d2a979 into main Oct 26, 2021
@fg-mindee fg-mindee deleted the coverage-improvement branch October 26, 2021 10:47
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: models Related to doctr.models type: enhancement Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants