simion / pip-upgrader

An interactive pip requirements upgrader. It also updates the version in your requirements.txt file.
Apache License 2.0
512 stars 35 forks source link

--skip-package-installation #19

Closed umeboshi2 closed 4 years ago

umeboshi2 commented 5 years ago

Thanks for making this tool! I never knew it existed until I scroll deeply down a stack overflow page.

I was wondering if the --skip-package-installation option could be set from a config file, or environment variable, since that would be my normal default usage. I have been using tjunnone/npm-check-updates to keep my package.json files up to date, and this tool only manipulates the file and instructs the user to npm install after running ncu -u.

If an environment variable is preferable, tell me the preferred name and I'll make a PR.

umeboshi2 commented 5 years ago

The environment var to override the default behavior can be queried around here. https://github.com/simion/pip-upgrader/blob/3cde8a3808ec421b92fb7c6a6f78230607c7c1e2/pip_upgrader/packages_upgrader.py#L22

simion commented 5 years ago

Hey, glad to hear the tool is usefuk for you. Yes, we can make an environment variable for this. Something like PIP_UPGRADER_SKIP_PACKAGE_INSTALLATION=1 should work :)

simion commented 5 years ago

PS: i use NCU too ;) i like how it works, i discovered it after writing pip-upgrader.

In a later version, i may change the way it works. I also need to implement pipenv support too, since we use it at work :D

umeboshi2 commented 5 years ago

I've been using ncu for a couple of years, but only found your tool today! Thanks a lot for making this, as it makes things much easier for me with multiple projects and split reqs/reqs_dev files. It's been more painful in the past. I'm using the var name you offered. Expect a PR fairly shortly after I fork, change, then test.

simion commented 4 years ago

closing this as it was implemented in https://github.com/simion/pip-upgrader/pull/20 Thanks for the contribution! 💪