Skip to content
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

Adding bare and json outputs to license command #332

Merged
merged 3 commits into from
Dec 27, 2020

Conversation

nicholasks
Copy link
Contributor

  • Removed the required from the --key because we should use a local db without it. But we still validate it when --db is not being provided.
  • Added --bare to license command, which will only report the licenses names from the packages set.
  • Also added the --json to license command, which will report the packages licenses as JSON. When a license is not available it will display as N/A.

@nicholasks nicholasks self-assigned this Dec 25, 2020
@codecov
Copy link

codecov bot commented Dec 25, 2020

Codecov Report

Merging #332 (b27a273) into master (23ac3a3) will increase coverage by 2.70%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #332      +/-   ##
==========================================
+ Coverage   68.88%   71.59%   +2.70%     
==========================================
  Files           8        8              
  Lines         495      514      +19     
==========================================
+ Hits          341      368      +27     
+ Misses        154      146       -8     
Impacted Files Coverage Δ
safety/cli.py 56.63% <50.00%> (+6.63%) ⬆️
safety/formatter.py 56.29% <93.75%> (+4.46%) ⬆️
safety/safety.py 92.96% <100.00%> (ø)
safety/util.py 80.39% <0.00%> (+2.94%) ⬆️

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 23ac3a3...b27a273. Read the comment docs.

@nicholasks nicholasks changed the title Nicholas/adding bare json to license command Adding bare and json to license command Dec 27, 2020
@nicholasks nicholasks changed the title Adding bare and json to license command Adding bare and json outputs to license command Dec 27, 2020
Copy link
Contributor

@rafaelpivato rafaelpivato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, @nicholasks -- Looks really good.

@@ -6,6 +6,7 @@ History
-------------------

* Current unstable version
* Added bare and json outputs to license command
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. You could add the "key" switch requirement thing as well.

@rafaelpivato rafaelpivato merged commit 8d25c80 into master Dec 27, 2020
@rafaelpivato rafaelpivato deleted the nicholas/adding-bare-json-to-license-command branch December 27, 2020 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants