Skip to content

Switch to using dependency groups for dev/docs/test dependencies #3634

@freakboy3742

Description

@freakboy3742

What is the problem or limitation you are having?

PEP 735 defines the concept of dependency groups - package requirements that do not form part of the published wheel. The intended use of dependency groups is docs and tests dependencies - features of the development environment that don't need to be part of the final published wheel.

Describe the solution you'd like

We should switch Toga core's dev, docs and tests optional-dependencies definitions to dependency groups.

Describe alternatives you've considered

Additional context

#3633 introduced a workaround for docs dependencies because we need to use a Git URL for the BeeWare theme, but we can't include that Git URL in an extras optional dependency list. This would be a permanent fix for this workaround.

In addition to changing the definition in pyproject.toml, this will also require:

  • Updating the tox configuration to use the dependency groups as required
  • Updating contribution documentation to describe how to install the dependency groups
  • Updating the ReadTheDocs configuration to use the dependency groups.

The last of these is the most complex, as RTD doesn't yet support dependency groups. However they do support overriding build steps; we may be able to move to using tox -e docs directly, instead of RTD's implicit build instructions. This would be a good move towards consistency between CI and dev environments; but has the added benefit that Tox does support dependency groups.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features, or improvements to existing features.good first issueIs this your first time contributing? This could be a good place to start!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions