nirum / tableprint

Pretty console printing :clipboard: of tabular data in python :snake:
https://tableprint.readthedocs.io/
MIT License
174 stars 16 forks source link

Automatic column width #15

Closed andli closed 5 years ago

andli commented 5 years ago

I added this feature since I need it myself. I tried to match your code style and quality. I have also performed functional testing outside the source.

Hope you like the PR. :)

pep8speaks commented 5 years ago

Hello @andli! Thanks for updating the PR.

Comment last updated on September 28, 2018 at 13:03 Hours UTC
codecov-io commented 5 years ago

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #15   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines         134    141    +7     
=====================================
+ Hits          134    141    +7
Impacted Files Coverage Δ
tableprint/printer.py 100% <100%> (ø) :arrow_up:
tableprint/utils.py 100% <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 0e658c0...8df1564. Read the comment docs.

andli commented 5 years ago

Added unit tests, for science.

andli commented 5 years ago

I had a look at this, but after working on it I felt that I was refactoring too much of "your" code and I think I respectfully withdraw. Specifically, I started moving the mapdata subfunction into utils.py since I think something like that is needed. I suspect you already have a better idea of how that refactoring is best handled.