# Every uv command in this Makefile uses the repository's declared Python version.
export UV_PYTHON := $(or $(shell cat ../.python-version 2>/dev/null),$(error ../.python-version not found))

DIST_DIR ?= ../.dist

.PHONY: test test-core test-core-buyer test-core-storefront test-core-storefront-client typecheck typecheck-core typecheck-core-registry-client

test: test-core test-core-buyer test-core-storefront test-core-storefront-client

typecheck: typecheck-core typecheck-core-registry-client

test-core:
	uv run --find-links $(DIST_DIR) pytest tests/unit -q

typecheck-core:
	uv run mypy src

typecheck-core-registry-client:
	cd registry-client && make typecheck

test-core-buyer:
	cd buyer && make test

test-core-storefront:
	cd storefront && make test

test-core-storefront-client:
	cd storefront-client && make test
