You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
orpackage.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: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":
Then:
poetry install --only ruff
handles the issue.
The text was updated successfully, but these errors were encountered: