@@ -4,10 +4,10 @@ UV ?= uv
44UV_PYTHON ?=
55PACKAGE ?=
66COVERAGE_FAIL_UNDER ?= 80
7- TEST_WORKERS ?= 0
7+ TEST_ARGS ?=
88RUN = $(if $(UV_PYTHON ) ,UV_PYTHON=$(UV_PYTHON ) ) $(UV ) run
99
10- .PHONY : all help install install-all install-dev install-test install-docs check verify diff-check lint format-check format fix type-check test test-serial test-parallel coverage build package-check package-verify docs docs-check linkcheck build-docs serve-docs hooks clean
10+ .PHONY : all help install install-all install-dev install-test install-test-extras install- docs check verify diff-check lint format-check format fix type-check test test-serial test-parallel coverage build package-check package-verify docs docs-check linkcheck build-docs serve-docs hooks clean
1111
1212help : # # Show available commands
1313 @awk ' BEGIN {FS = ":.*## "}; /^[a-zA-Z0-9_-]+:.*## / {printf "%-18s %s\n", $$1, $$2}' $(MAKEFILE_LIST )
@@ -23,6 +23,9 @@ install-dev: ## Install dependencies for static checks
2323install-test : # # Install dependencies for tests
2424 $(UV ) sync --group test --locked $(if $(UV_PYTHON ) ,--python $(UV_PYTHON ) )
2525
26+ install-test-extras : # # Install optional test utilities
27+ $(UV ) sync --group test --group test-extras --locked $(if $(UV_PYTHON ) ,--python $(UV_PYTHON ) )
28+
2629install-docs : # # Install dependencies for documentation
2730 $(UV ) sync --group docs --locked
2831
@@ -51,18 +54,17 @@ fix: ## Apply Ruff lint fixes and formatting
5154type-check : # # Check static types with ty
5255 $(RUN ) ty check
5356
54- test : # # Run tests
55- $(RUN ) pytest -n $( TEST_WORKERS ) -sv
57+ test : # # Run tests serially
58+ $(RUN ) pytest $( TEST_ARGS )
5659
57- test-serial : TEST_WORKERS = 0
5860test-serial : test # # Run tests without parallel workers
5961
60- test-parallel : TEST_WORKERS = auto
61- test-parallel : test # # Run independent tests with parallel workers
62+ test-parallel : # # Run independent tests with parallel workers
63+ $( RUN ) pytest -n auto $( TEST_ARGS )
6264
6365coverage : # # Enforce coverage for PACKAGE
6466 @test -n " $( PACKAGE) " || { echo " Set PACKAGE to the library import name." ; exit 2; }
65- $(RUN ) pytest -n $( TEST_WORKERS ) --cov=" $( PACKAGE) " --cov-branch --cov-report=term-missing:skip-covered --cov-fail-under=" $( COVERAGE_FAIL_UNDER) " -sv
67+ $(RUN ) pytest $( TEST_ARGS ) --cov=" $( PACKAGE) " --cov-branch --cov-report=term-missing:skip-covered --cov-fail-under=" $( COVERAGE_FAIL_UNDER) "
6668
6769build : # # Build source and wheel distributions
6870 $(UV ) build --sdist --wheel
0 commit comments