-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added --packages option #19
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19 +/- ##
=========================================
- Coverage 98.03% 93.4% -4.63%
=========================================
Files 1 1
Lines 254 182 -72
=========================================
- Hits 249 170 -79
- Misses 5 12 +7
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #19 +/- ##
==========================================
- Coverage 97.59% 93.37% -4.23%
==========================================
Files 1 1
Lines 166 181 +15
==========================================
+ Hits 162 169 +7
- Misses 4 12 +8
Continue to review full report at Codecov.
|
@LightSlayer Thank you for your feature request and implementation. I think that this option is a good proposal. In order to merge we have to solve 2 tasks.
|
Codecov Report
@@ Coverage Diff @@
## master #19 +/- ##
==========================================
+ Coverage 98.42% 98.50% +0.07%
==========================================
Files 1 1
Lines 318 334 +16
==========================================
+ Hits 313 329 +16
Misses 5 5 Continue to review full report at Codecov.
|
Thanks @raimon49 for your feedback - and apologies it has taken me about a year to return to this! I've now added some tests to cover the new functionality. On the point of loading multiple .txt or .json files, I am simply using a Hope this is now suitable for bringing into the main code repo - please just let me know if you'd like me to make any more changes or add anything further. |
Name Version License | ||
numpy 1.16.1 BSD | ||
twine 1.12.1 MIT | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation does not work as of this document.
# error with this option
$ pip-licenses --packages twine numpy
usage: piplicenses.py [-h] [-v] [--from SOURCE] [-s] [-a] [-u] [-d] [-l] [--no-license-path] [-i PKG] [-p INCLUDES] [-o COL]
[-f STYLE] [--summary] [--output-file OUTPUT_FILE]
piplicenses.py: error: unrecognized arguments: numpy
Since action='append'
is used, it must be specified multiple times. Please see docs for argpase.
# work with this option
$ pip-licenses --packages twine --packages numpy
The behavior of the existing option --ignore-packages
is also a breaking change.
Is it difficult to achieve your function with a combination of action='store'
and nargs='+'
?
ignore_pkg_name = 'PTable' | ||
else: | ||
ignore_pkg_name = 'prettytable' | ||
ignore_pkg_name = 'pytest' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this change needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to merge existing options without breaking change.
@Liam-Deacon I adopted a simpler solution, #99, and shipped pip-licenses 3.4.0. You can use pipe and shell scripts to work with the content output by pydep that fits your idea. Probably this way is more "UNIX-like". Thanks for your suggestions and attempts. |
Implemented as solution of #18