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

Enable extracting individual dependencies #9703

Closed
paduszyk opened this issue Sep 23, 2024 · 2 comments
Closed

Enable extracting individual dependencies #9703

paduszyk opened this issue Sep 23, 2024 · 2 comments
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@paduszyk
Copy link

Issue Kind

Brand new capability

Description

I have recently come up with the idea that a useful feature would be to have the possibility of "extracting" individual dependencies with the versions read from either pyproject.toml or package.lock.

poetry install --extract PACKAGE

Impact

Sometimes, one needs to install a single package, preferably with the version consistent with Poetry's files.

For example, one may need ruff to lint and format their codebase in CI. ruff does not need anything except the codebase and itself.

If you put it to dev dependencies:

[tool.poetry.group.dev.dependencies]
# ...
ruff = "^0.6.7"
# ...

then you can install it by:

poetry install --only dev

but this will unnecessarily install other dev dependencies if any.

Workarounds

A workaround here is to define a separate group for a single dependency one would to "extract":

[tool.poetry.group.ruff.dependencies]
# ...
ruff = "^0.6.7"
# ...

Then:

poetry install --only ruff

handles the issue.

@paduszyk paduszyk added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Sep 23, 2024
@finswimmer
Copy link
Member

Duplicate of #3033

@finswimmer finswimmer marked this as a duplicate of #3033 Sep 25, 2024
@finswimmer finswimmer closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants