Open hynek opened 1 year ago
what about a subcommand that let's you install the dependencies of a given environment into the currently active environment? i assume that you want to work with these packages in an interactive shell. b/c everything else can be done with environments as they are designed and implemented, is my impression.
What's the reason for avoiding Hatch environments? If someone else is working on your project, they'll need Hatch on their system one way or another, so I don't see the benefit in avoiding them in favor of a dev
optional dependency group.
A dev-only optional dependency group seems more "standard-bending" than just using a Hatch environment, because the former actually changes the behavior of a standard feature, while the latter is a different thing altogether. The PDM dev-only dependencies are morally identical to (and less flexible than) having extra dependencies in a Hatch environment.
It is reasonable to offer tests
and docs
dependency groups in your published package, because downstream users might want to run tests and build docs without setting up a full dev environment. I also don't see much concern with these entering the Wheel metadata, as they explicitly are listed with an extra ==
condition.
I like using optional dependencies like
tests
ordocs
for local development.However, it has the annoying side-effect of putting that into package metadata which make it look like attrs depends on some wild stuff.
It would be nice to have dev-only dependency groups and my recent foray into PDM showed me there’s precedent for that: https://pdm.fming.dev/latest/usage/dependency/#add-development-only-dependencies
Syntax is the same, just different key:
FWIW, I’d be perfectly content with something like this which is less standard-bending:
I realize there’s certain overlap with hatch environments, but I don’t want to break the Python-standard ways of installing packages. At least for now (fact aside that I can’t use them for now :))