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

Optionally only install the group holding the incoming dependencies #8363

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rjyunis
Copy link

@rjyunis rjyunis commented Aug 24, 2023

This pull request adds the --only flag to poetry add. The rationale is to counteract the following situation:

poetry install --without=somegroup
poetry add new-dependency
# Poetry now installs new-dependency as well as dependencies in somegroup

By invoking --only the group of the incoming dependencies is passed to the install command via self.installer.only_groups(group).

This is the best solution/simplicity ratio I have found to mimic the current workaround

poetry add new-dependency --lock
poetry install --without=somegroup

Tests incoming.
Doc updates incoming.

Pull Request Check List

Resolves: #issue-number-here

  • Added tests for changed code.
  • Updated documentation for changed code.

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

1 participant