Skip to content

docs: add docs about include-groups #10166

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

Merged
merged 3 commits into from
Jun 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/managing-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,30 @@ Optional group dependencies will **still** be resolved alongside other dependenc
special care should be taken to ensure they are compatible with each other.
{{% /warning %}}

### Including dependencies from other groups

You can include dependencies from one group in another group.
This is useful when you want to aggregate dependencies from multiple groups into a single group.

```toml
[tool.poetry.group.test.dependencies]
pytest = "^8.0.0"

[tool.poetry.group.lint.dependencies]
ruff = "^0.11"

[tool.poetry.group.dev]
include-groups = [
"test",
"lint",
]

[tool.poetry.group.dev.dependencies]
tox = "*"
```

In this example, the `dev` group includes all dependencies from the `test` and `lint` groups.

### Adding a dependency to a group

The [`add`]({{< relref "cli#add" >}}) command is the preferred way to add dependencies
Expand Down
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.