atlanhq / camelot

Camelot: PDF Table Extraction for Humans
https://camelot-py.readthedocs.io
Other
3.62k stars 350 forks source link

[MRG] Fix #303 #311

Closed niazangels closed 4 years ago

niazangels commented 5 years ago

Optimizes camelot.handlers.PdfHandler._save_page to avoid hitting disk multiple times.

The modified camelot.handlers.PdfHandler._save_pages function reads the file one time and uses the PdfFileReader object to write out all the pages passed to it.

codecov-io commented 5 years ago

Codecov Report

Merging #311 into master will increase coverage by 0.01%. The diff coverage is 90.32%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #311      +/-   ##
==========================================
+ Coverage   87.44%   87.45%   +0.01%     
==========================================
  Files          13       13              
  Lines        1497     1499       +2     
  Branches      346      346              
==========================================
+ Hits         1309     1311       +2     
  Misses        131      131              
  Partials       57       57
Impacted Files Coverage Δ
camelot/handlers.py 90.47% <90.32%> (+0.23%) :arrow_up:

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 ecf6feb...01f958e. Read the comment docs.