From a café topic, @ca-scribner reported that the way we currently set up our test dependencies in pyproject.toml is incorrect.
There's a distinction between:
dependency-groups: test dependencies that won't ship with the code
optional-dependencies: deps that ship with the code as optional additional installs (e.g., mypackage[extra-thing])
We currently use optional-dependencies to capture our test dependencies. As part of this issue, we should go through all of our charms (and probably projects in general) to make sure we start using dependency-groups instead.
Note: this also require a CI / tox change; instead of installing things with the --extra X or --all-extras flag, we should change that to --group X or --all groups.
More context: https://discourse.charmhub.io/t/charm-techs-positive-experience-with-uv-tox-uv/18059/3
From a café topic, @ca-scribner reported that the way we currently set up our test dependencies in
pyproject.tomlis incorrect.There's a distinction between:
dependency-groups: test dependencies that won't ship with the codeoptional-dependencies: deps that ship with the code as optional additional installs (e.g., mypackage[extra-thing])We currently use
optional-dependenciesto capture our test dependencies. As part of this issue, we should go through all of our charms (and probably projects in general) to make sure we start usingdependency-groupsinstead.Note: this also require a CI / tox change; instead of installing things with the
--extra Xor--all-extrasflag, we should change that to--group Xor--all groups.More context: https://discourse.charmhub.io/t/charm-techs-positive-experience-with-uv-tox-uv/18059/3