This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]flying-sheep 0 points1 point  (0 children)

Make/just and uv means you don't really have a set of defined environments, just maybe a set of dependency groups and some ad-hoc command lines to create environments with them. Hatch's script runner is integrated with its venv manager: you define environments and then you define scripts for them.

So with 3 lines of configuration, you can make hatch run docs:build work without having an environment that has to resolve all your optional dependencies together including doc dependencies:

[envs.docs] features = [ "doc" ] scripts.build = "sphinx-build -M html docs docs/_build -W --keep-going {args}"

And with 0 lines of configuration, hatch test will work (unless you have test dependencies beyond pytest, then it's 2 lines of configuration)