Skip to content

Add a dev dependency group to get test dependencies installed by default. - #1219

Open
tapetersen wants to merge 1 commit into
agronholm:masterfrom
tapetersen:add-dev-group
Open

Add a dev dependency group to get test dependencies installed by default.#1219
tapetersen wants to merge 1 commit into
agronholm:masterfrom
tapetersen:add-dev-group

Conversation

@tapetersen

Copy link
Copy Markdown
Collaborator

Changes

uv and some other tools install the dependency-group dev by default when working locally on the package. This allows running uv run pytest or and tox or pre-commit by default without externally adding them.

This adds a dependency-group named dev to pyproject.toml which includes the test and doc group as well as tox and pre-commit to get these installed by default when checking out to work on the project.

This shouldn't impact downstream users but mainly make it more convenient for developers to get started running necessary tests.

Checklist

I'm a bit unsure which docs if any I should update or if developer only changes should be included in changelog.

  • You've updated the documentation (in docs/), in case of behavior changes or new
    features
  • You've added a new changelog entry (in docs/versionhistory.rst).

Updating the changelog

…lled by default.

``uv`` and some other tools install the dependency-group ``dev`` by
default when working locally on the package. This allows running ``uv run
pytest`` or other tools without having to manually add ``--group test``
Comment thread pyproject.toml
Comment on lines +50 to +54
"trio>=0.32.0",
"tox >= 4.22",
"pre-commit>=4.6.0",
{include-group = "test"},
{include-group = "doc"},

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's mainly including test (and to some degree trio) here that has the most benefit here.

To be able to use uv run -p 3.11 pytest ... for example to quickly check in different version without needing to add --group test --extra trio as well on every invocation.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can already do that with tox -e py311.

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.

2 participants