root_dir:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))

.PHONY: test
test:
	# Test just current code / current version
	uv run --with pytest pytest $(ARGS)

.PHONY: test-all
test-all:
	uvx nox --no-venv $(ARGS)

.PHONY: build
build:
	cd ./tools/py-build/;  uv run --locked python -m build -s -w --installer uv $(ARGS) $(root_dir)

.PHONY: build-test
build-test:
	uvx --reinstall --with dist/*.whl pytest $(ARGS)

.PHONY: docs-serve
docs-serve: docs-copy-files
	cd ./tools/mkdocs-dev/;  uv run --locked mkdocs serve $(ARGS) -f $(root_dir)/mkdocs.yml

.PHONY: docs-copy-files
docs-copy-files:
	cp -v README.md FAQ.md CHANGELOG.md docs/

