# Generated by yggtools — do not remove this line.

.PHONY: check ci test format lint typecheck metrics security build check-dist publish-test publish clean

clean:
	mkdir -p work
	find work -mindepth 1 ! -name .gitkeep -exec rm -rf {} +

format:
	uv run ruff format src tests

check: clean
	PYTHONPATH=src uv run python -m yggtools.cli pipeline

ci: check

test: clean
	uv run pytest

lint: clean
	uv run ruff check src tests

typecheck: clean
	uv run mypy src tests

metrics: clean
	PYTHONPATH=src uv run python -m yggtools.cli run metrics

security: clean
	PYTHONPATH=src uv run python -m yggtools.cli run security-code
	PYTHONPATH=src uv run python -m yggtools.cli run security-deps

build: clean
	rm -rf dist
	uv build --out-dir dist/

check-dist: clean
	uv build --out-dir work/dist
	uv run twine check work/dist/*

publish-test: check-dist
	uv run twine upload --repository testpypi work/dist/*

publish: check-dist
	uv run twine upload work/dist/*
