Skip to content

Replace optional dependencies with dependency groups #688

@sverhoeven

Description

@sverhoeven

Checklist before submitting an issue

  • I have checked the existing issues and couldn't find an issue about this bug.

Issue details

At

dev = [
"build", # build is not only used in publishing (below), but also in the template's test suite
"bump-my-version",
{%- if AddLocalTests %}
"coverage [toml]",
"pytest",
"pytest-cov",
{%- endif %}
"ruff",
{%- if AddLocalDocumentation %}
"sphinx",
"sphinx_rtd_theme",
"sphinx-autoapi",
{%- endif %}
"tox",
"myst_parser",
]
{%- if AddLocalDocumentation %}
docs = [
"sphinx",
"sphinx_rtd_theme",
"sphinx-autoapi",
"myst_parser",
]
{%- endif %}
publishing = [
"build",
"twine",
"wheel",
]
we are defining optional dependencies that can be installed with pip install -e .[dev].

These optional dependencies are meant for the package developer not for someone installing the package from PyPi.

Recently (Oct 2024) dependency groups where introduced and now most package managers (like pip and uv) can use it.

As someone that installs package via PyPi I would like it that any optional dependencies are useful and usable for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    generated-packageRelated to the generated package, i.e. after running cookiecutter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions