pyexcel / pyexcel-io

One interface to read and write the data in various excel formats, import the data into and export the data from databases
http://io.pyexcel.org
Other
58 stars 20 forks source link

🐛 fix loading CSV ‘books’ if the path contains ‘.’ #47

Closed danchr closed 6 years ago

danchr commented 6 years ago

The CSV book reader erronously split the path by all dots, instead of just the last one. This is what os.path.splitext() is for, but since it drops the leading dot, I kept the split() call to keep the change minimal.

I tried to create a testcase for this, but it turned out to be harder than expected since I don't quite understand the internal design of pyexcel.

codecov-io commented 6 years ago

Codecov Report

Merging #47 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #47   +/-   ##
=======================================
  Coverage   97.08%   97.08%           
=======================================
  Files          42       42           
  Lines        2951     2951           
=======================================
  Hits         2865     2865           
  Misses         86       86
Impacted Files Coverage Δ
pyexcel_io/readers/csvr.py 98.1% <100%> (ø) :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 8b53c16...f93d133. Read the comment docs.

chfw commented 6 years ago

OK. I will have a look.

Here is the overall architecture: http://pyexcel.readthedocs.io/en/latest/architecture.html. You are welcome to ask more questions.