-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Extra requirement support (extras_require) #1363
Merged
Merged
Changes from 9 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0601e0f
make test_input_formats extendable
orsinium fef5d60
add --extras
orsinium 8d74a8b
test multiple -e support
orsinium 146a538
rename the function
orsinium 0a78381
rename -e/--extras into --extra
orsinium 50f29ae
black
orsinium 0dacee7
Merge branch 'master' into extras
orsinium 99719d3
fail on --extra with requirements.in
orsinium bc0c4d6
Merge branch 'extras' of github.com:orsinium-forks/pip-tools into extras
orsinium a933776
add docstrings for tests
orsinium e364b84
fix tests
orsinium 2e05053
simplify extras matching
orsinium bc24362
Merge remote-tracking branch 'jazzband/master' into extras
orsinium 3b63aa9
drop `extra` from markers
orsinium 4881ecc
workaround for coverage.py missed branch coverage
orsinium 3a8e9d9
Merge branch 'master' into extras
orsinium 37c75e8
Merge branch 'master' into extras
orsinium File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
s/n/N
--extra-only
?--extras-only
/--exclude-default-deps
or something?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 last one, default dependencies are always selected. I don't think
--exclude-default-deps
makes sense, I'd make a separate discussion for it. AFAIK, setuptools/poetry/flit/pip doesn't have a way to opt-out installing the default dependencies, so I see no reason why pip-tools should.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.
It's actually a long-standing feature request in pip and I think there's been no opposition, just nobody had time to come up with an implementation. The main motivation was that people often supply test/dev/docs extras for different processes they have and some of them don't really require the dist itself to be installed. Of course, there's another camp saying that this sort of deps should be put elsewhere because they aren't necessary for the runtime and there should be env pins anyway.
But if pip-tools were to implement this flag, it'd facilitate a hybrid of these two approaches with the direct open-ended deps in the dist metadata configs and the pins existing in separate constraints files.
But yes, this could probably be brought up in a separate discussion.
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'm from that camp too. I have a separate environment for every tool. However, most of the tools still need dependencies:
pytest
for sure,mypy
for type-checking of third-party libs usage,pylint
for inference-based tasks. In my projects, onlyflake8
works nicely without knowing the project dependencies. And I keep a separaterequirements.txt
for it. Yep, makes the root of the project a bit messier but works. This is why I made dephell a long time ago, to handle all this zoo :)