prequ icon indicating copy to clipboard operation
prequ copied to clipboard

"prequ add"

Open frwickst opened this issue 6 years ago • 1 comments

Add a package to setup.cfg.

Would work like yarn in the sense that when prequ add is being ran the package is added to setup.cfg/requirements files and be installed. By default the packages should be added under the requirements section of the settings, but there should be a flag that can be set for selecting a specific requirements label.

Example:

$ cat setup.cfg
[prequ]
requirements =
    Django

$ prequ add pytest-django

$ cat setup.cfg
[prequ]
requirements =
    Django
    pytest-django

Arguments: -l --label : Specifies the requirement file label. Example: prequ add -l dev pytest-django would add pytest-django under requirements-dev

-a --only-add : Only adds the package to setup.cfg and updates the requirements files

Edit: Added arguments and better explanation of how the adding should work :)

frwickst avatar Mar 21 '18 12:03 frwickst

Thanks!

I think it should also update the generated txt file and install the new package (with its requirements) too.

There should also be a flag for selecting the "label", e.g. "dev" or "test".

suutari-ai avatar Mar 21 '18 12:03 suutari-ai