raimon49 / pip-licenses

Dump the license list of packages installed with pip.
MIT License
314 stars 45 forks source link

feat: add filtering of input data #76

Closed pohlt closed 4 years ago

pohlt commented 4 years ago

Some package data contains Unicode characters which might cause problems for certain output formats (in particular ReST tables). This commit adds filtering functionality by introducing two new options.

codecov[bot] commented 4 years ago

Codecov Report

Merging #76 into master will increase coverage by 0.06%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   98.45%   98.52%   +0.06%     
==========================================
  Files           1        1              
  Lines         323      338      +15     
==========================================
+ Hits          318      333      +15     
  Misses          5        5              
Impacted Files Coverage Ξ”
piplicenses.py 98.52% <100.00%> (+0.06%) :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 6d1f8ea...e64b72c. Read the comment docs.

raimon49 commented 4 years ago

@pohlt Thanks!!

I've confirmed that your implementation of --filter-strings provides great behavior. πŸ‘

$ pip-licenses -d --format=rest
+------+---------+---------+-----------------------------------------+
| Name | Version | License | Description                             |
+------+---------+---------+-----------------------------------------+
| poyo | 0.5.0   | MIT     | A lightweight YAML Parser for Python. πŸ“ |
+------+---------+---------+-----------------------------------------+

$ pip-licenses -d --format=rest --filter-strings
+------+---------+---------+----------------------------------------+
| Name | Version | License | Description                            |
+------+---------+---------+----------------------------------------+
| poyo | 0.5.0   | MIT     | A lightweight YAML Parser for Python.  |
+------+---------+---------+----------------------------------------+

After merging this P-R I plan on shipping the next version 2.3.0.