python-package example is a normal uv package (src layout, pyproject.toml, tests) whose bakefile.py inherits PythonSpace instead of writing tasks from scratch:
What it shows
- Inheriting a Space:
lint,test,setup-dev,tools,update,version,clean, and more arrive preconfigured (ruff, ty, deptry, pytest with coverage, uv). - Overriding one inherited task.
testreuses the space’s own_testhelper withextra_args="-x"to stop at the first failure. No@command()needed, the inherited registration carries over. - Adding a project-specific task (
build) with@command()as usual. - A private hook tweak:
_get_mise_toolsdropspipx:bakefilebecause this project gets bakefile from its own venv (bakefile[lib]inpyproject.toml), so the pipx copy would be redundant.