safety
safety copied to clipboard
Add setuptools integration.
This PR adds a setuptools command for running safety check. I'm not sure if this is something that you are interested in or not, but it makes configuration via setup.cfg possible.
Codecov Report
Merging #218 into master will increase coverage by
3.54%. The diff coverage is100%.
@@ Coverage Diff @@
## master #218 +/- ##
==========================================
+ Coverage 74.28% 77.83% +3.54%
==========================================
Files 7 8 +1
Lines 350 406 +56
==========================================
+ Hits 260 316 +56
Misses 90 90
| Impacted Files | Coverage Δ | |
|---|---|---|
| safety/command.py | 100% <100%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 3b81f90...abd3819. Read the comment docs.
It's a great feature to add :)
My understanding is that the setup command, as another interface to Safety, should be adapt itself to such context. So, instead of allowing users to pass any argument as they would to to Safety CLI, just makes it sound like having two ways of doing the same thing. What I am trying to say is that users could then just call the CLI and that's it.
So, my proposal here is to change the arguments interface, and how the command gathers options from
setupcall itself, to run the check.I will give you an example:
- Remove all options except for those changing results format and the key: bare, json, full-report and key
- Bring minimum set of options to
setupcall like: ignore, output, cache, db and files- Make sure we are running a check against
install_requiresdependencies by default.In a way or another, this already looks great! Looking forward your changes.
Using install_requires is a perfect default... not sure why I didn't think of that. The main reason that I offered all of the options is to make them configurable via the setup.cfg. It does make sense to remove some of them.
- Remove support for the proxy parameters
- Remove support for the
--stdinparameter - Initialize the list of packages with
install_requires - Add packages explicitly specified in the
filesparameter to the list of packages
Does that sound good?
That would be great, @dave-shawley
Looking forward those changes!
Hi! This looks very useful :) What's the status of this PR?