# AutoAssembler Python SDK — dev tasks. Regeneration is shared: see the root Makefile.

# Files, not the _custom directory: ruff's extend-exclude on src/autoassembler/** would skip a directory.
CUSTOM := src/autoassembler/client.py src/autoassembler/operation.py src/autoassembler/_version.py $(wildcard src/autoassembler/_custom/*.py) tests examples

.PHONY: help post-generate lint typecheck test

help: ## Show this help
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
		awk 'BEGIN {FS = ":.*?## "}; {printf "  %-14s %s\n", $$1, $$2}'

post-generate: ## Surface Fern's reference.md and drop its README/CONTRIBUTING (run by the root `make generate`)
	mv -f src/autoassembler/reference.md reference.md
	rm -f src/autoassembler/CONTRIBUTING.md src/autoassembler/README.md   # Fern's; ours are python/README.md and the root's

lint: ## Ruff-check the hand-written custom code + tests
	uv run ruff check $(CUSTOM)

typecheck: ## Pyright type-check the hand-written surface (config in pyproject)
	uv run pyright

test: ## Run the test suite
	uv run pytest -q
