raimon49 / pip-licenses

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

Enable partial matching on allow-only/fail-on #186

Closed costasd closed 4 months ago

costasd commented 4 months ago

This changeset introduces a way to do partial matching on license names.

Say, to match all BSD licenses for a given --fail-on=BSD.

To do so, it:

Fixes #187

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.12%. Comparing base (6ab64cd) to head (f69136c).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #186 +/- ## ========================================== + Coverage 99.08% 99.12% +0.04% ========================================== Files 1 1 Lines 435 457 +22 ========================================== + Hits 431 453 +22 Misses 4 4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

raimon49 commented 4 months ago

Thanks for the implementation idea and code! It looks good because it's the default false, so it won't break the CI of existing users.

I would like to see the role of this option written in the README document. This feature appears to be used in combination with --fail-on or --allow-only. Users would appreciate an explanation in the "Verify options" section of the README. What do you think?

costasd commented 4 months ago

oh missed the readme, you're right, will add it there!

raimon49 commented 4 months ago

Thanks a lot! I will merge this PR and upload the next release v4.4.0 to PyPI.

raimon49 commented 4 months ago

@costasd We have the --partial-match option available in v4.4.0 🎉 https://pypi.org/project/pip-licenses/4.4.0/

Thank you for your contribution.