From 7a8643f72f297dbb0585fcc51186d715f169ab2f Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 26 Feb 2026 20:43:18 -0800 Subject: [PATCH] Justfile now uses uv, docs gets a dependency group --- Justfile | 30 +++++++++++------------------- pyproject.toml | 13 ++++++++++++- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/Justfile b/Justfile index b3cc38a..8904d06 100644 --- a/Justfile +++ b/Justfile @@ -1,37 +1,29 @@ # Run tests and linters @default: test lint -# Install dependencies and test dependencies -@init: - pipenv run pip install -e '.[test]' - # Run pytest with supplied options @test *options: - pipenv run pytest {{options}} + uv run pytest {{options}} # Run linters @lint: echo "Linters..." - echo " Black" - pipenv run black . --check echo " cog" - pipenv run cog --check README.md docs/*.md - echo " ruff" - pipenv run ruff . + uv run cog --check README.md docs/*.md + echo " ruff check" + uv run ruff check . + echo " ruff format" + uv run ruff format . --check # Rebuild docs with cog @cog: - pipenv run cog -r docs/*.md + uv run cog -r docs/*.md # Serve live docs on localhost:8000 @docs: cog - cd docs && pipenv run make livehtml + cd docs && uv run make livehtml -# Apply Black -@black: - pipenv run black . - -# Run automatic fixes +# Apply ruff fixes and formatting @fix: cog - pipenv run ruff . --fix - pipenv run black . + uv run ruff check . --fix + uv run ruff format . diff --git a/pyproject.toml b/pyproject.toml index 946fdd1..3028b99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ dclient = "dclient.cli:cli" client = "dclient.plugin" [dependency-groups] -dev = [ +test = [ "pytest", "pytest-asyncio", "pytest-httpx", @@ -34,6 +34,17 @@ dev = [ "pytest-mock", "datasette>=1.0a25", ] +docs = [ + "furo", + "sphinx-autobuild", + "sphinx-copybutton", + "myst-parser", + "cogapp", +] +dev = [ + {include-group = "test"}, + {include-group = "docs"}, +] [tool.uv.build-backend] module-root = ""