Skip to content

Switch to using dependency-groups#4861

Open
LecrisUT wants to merge 1 commit into
teemtee:mainfrom
LecrisUT:fix/4337
Open

Switch to using dependency-groups#4861
LecrisUT wants to merge 1 commit into
teemtee:mainfrom
LecrisUT:fix/4337

Conversation

@LecrisUT
Copy link
Copy Markdown
Member

@LecrisUT LecrisUT commented May 6, 2026

Moved all of the hatch.env dependencies into the dependency-groups and tweaked the dependent parts to follow it. The dependency-group division I've considered is:

  • tests: All test dependencies (going through pytest). Would be useful to further split this, we have an untracked request (from ubuntu packaging effort) to drop some paths like pytest-container to allow downstream packaging to do some minimal testing
  • docs: Sphinx build stuff
    • sphinx-lint is partially out-of-place there, but I do not know where else to put it. docs-lint? Dependency-groups are cheap, so we shouldn't hesitate to add more
  • type-check: For mypy, pyright and other
    • Only added this because we had a place for the types-* dependencies. Not very sure if we should be carrying those though.
  • dev: Everything above and any other extras

Fixes #4337

Signed-off-by: Cristian Le <git@lecris.dev>
@LecrisUT LecrisUT added this to planning May 6, 2026
@LecrisUT LecrisUT added ci | full test Pull request is ready for the full test execution area | maintenance Changes important for efficiency and the long-term health of the project labels May 6, 2026
@github-project-automation github-project-automation Bot moved this to backlog in planning May 6, 2026
@LecrisUT LecrisUT moved this from backlog to review in planning May 6, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors dependency management by introducing PEP 735 dependency groups in pyproject.toml and updating .readthedocs.yaml and .pre-commit-config.yaml to use uv sync. Restore missing dependencies including readthedocs-sphinx-ext, docutils, and autopep8, and improve formatting with newlines and trailing commas for better maintainability.

I am having trouble creating individual review comments. Click here to see my feedback.

pyproject.toml (113-149)

high

Restore missing dependencies (readthedocs-sphinx-ext, docutils>=0.18.1, autopep8) and the descriptive comment. Also, add newlines between groups and trailing commas for better maintainability.

# Needed for readthedocs and man page build. Not being packaged in rpm.
[dependency-groups]
docs = [
    "renku-sphinx-theme",
    "readthedocs-sphinx-ext",
    "docutils>=0.18.1",
    "Sphinx",
    "fmf>=1.7.0",
    "sphinx-reredirects",
    "sphinx-lint",
    ]

tests = [
    "pytest",
    "pytest-container",
    "pytest-xdist",
    "requre",
    ]

type-check = [
    "mypy",
    "pyright",
    "types-Markdown",
    # prevent conflict between types-requests and urllib3
    "types-requests<2.31.0.7; python_version < '3.10'",
    "types-requests; python_version >= '3.10'",
    "types-setuptools",
    "types-jsonschema",
    "types-urllib3",
    "types-jinja2",
    "types-babel",
    "types-docutils",
    "types-lxml",
    ]

dev = [
    {include-group = "tests"},
    {include-group = "docs"},
    {include-group = "type-check"},
    "autopep8",
    "ruff",
    "pre-commit",
    "python-coveralls",
    ]

@LecrisUT LecrisUT added the status | blocking other work An important pull request, blocking other pull requests or issues label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area | maintenance Changes important for efficiency and the long-term health of the project ci | full test Pull request is ready for the full test execution status | blocking other work An important pull request, blocking other pull requests or issues

Projects

Status: review

Development

Successfully merging this pull request may close these issues.

Migrate test and docs optional dependencies to dependency groups

1 participant