Switch to using dependency-groups#4861
Open
LecrisUT wants to merge 1 commit into
Open
Conversation
Signed-off-by: Cristian Le <git@lecris.dev>
Contributor
There was a problem hiding this comment.
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)
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",
]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moved all of the
hatch.envdependencies into thedependency-groupsand tweaked the dependent parts to follow it. The dependency-group division I've considered is:tests: All test dependencies (going throughpytest). Would be useful to further split this, we have an untracked request (from ubuntu packaging effort) to drop some paths likepytest-containerto allow downstream packaging to do some minimal testingdocs: Sphinx build stuffsphinx-lintis 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 moretype-check: Formypy,pyrightand othertypes-*dependencies. Not very sure if we should be carrying those though.dev: Everything above and any other extrasFixes #4337