.PHONY: install test lint format typecheck check build clean changelog-draft changelog

install:
	uv sync --all-extras

test:
	uv sync --all-extras --reinstall-package intpot
	uv run pytest tests/ -v

lint:
	uv run ruff check src/ tests/ examples/semantic_schema.py examples/definition_bindings.py examples/diagnostic_context.py examples/source_provenance.py examples/binding_chains.py examples/reference_locations.py examples/batch_quote.py examples/application_conformance.py examples/storage_quote.py examples/api_application_conformance.py examples/inventory_reservation.py examples/mcp_application_conformance.py examples/external_csv2vcard.py examples/external_trkit.py examples/external_docling.py examples/external_cruft.py examples/enum_collection_conformance.py examples/informational_text/ examples/informational_application_conformance.py examples/enum_export/ examples/convert_enum_export.py examples/selected_tools.py examples/convert_selected_tools.py examples/convert_informational.py examples/call_converted_mcp.py examples/project_workflow.py examples/file_manifest.py examples/convert_file_manifest.py scripts/verify_generated_examples.py scripts/verify_installed_artifacts.py
	uv run ruff format --check src/ tests/ examples/semantic_schema.py examples/definition_bindings.py examples/diagnostic_context.py examples/source_provenance.py examples/binding_chains.py examples/reference_locations.py examples/batch_quote.py examples/application_conformance.py examples/storage_quote.py examples/api_application_conformance.py examples/inventory_reservation.py examples/mcp_application_conformance.py examples/external_csv2vcard.py examples/external_trkit.py examples/external_docling.py examples/external_cruft.py examples/enum_collection_conformance.py examples/informational_text/ examples/informational_application_conformance.py examples/enum_export/ examples/convert_enum_export.py examples/selected_tools.py examples/convert_selected_tools.py examples/convert_informational.py examples/call_converted_mcp.py examples/project_workflow.py examples/file_manifest.py examples/convert_file_manifest.py scripts/verify_generated_examples.py scripts/verify_installed_artifacts.py

format:
	uv run ruff check --fix src/ tests/ examples/semantic_schema.py examples/definition_bindings.py examples/diagnostic_context.py examples/source_provenance.py examples/binding_chains.py examples/reference_locations.py examples/batch_quote.py examples/application_conformance.py examples/storage_quote.py examples/api_application_conformance.py examples/inventory_reservation.py examples/mcp_application_conformance.py examples/external_csv2vcard.py examples/external_trkit.py examples/external_docling.py examples/external_cruft.py examples/enum_collection_conformance.py examples/informational_text/ examples/informational_application_conformance.py examples/enum_export/ examples/convert_enum_export.py examples/selected_tools.py examples/convert_selected_tools.py examples/convert_informational.py examples/call_converted_mcp.py examples/project_workflow.py examples/file_manifest.py examples/convert_file_manifest.py scripts/verify_generated_examples.py
	uv run ruff format src/ tests/ examples/semantic_schema.py examples/definition_bindings.py examples/diagnostic_context.py examples/source_provenance.py examples/binding_chains.py examples/reference_locations.py examples/batch_quote.py examples/application_conformance.py examples/storage_quote.py examples/api_application_conformance.py examples/inventory_reservation.py examples/mcp_application_conformance.py examples/external_csv2vcard.py examples/external_trkit.py examples/external_docling.py examples/external_cruft.py examples/enum_collection_conformance.py examples/informational_text/ examples/informational_application_conformance.py examples/enum_export/ examples/convert_enum_export.py examples/selected_tools.py examples/convert_selected_tools.py examples/convert_informational.py examples/call_converted_mcp.py examples/project_workflow.py examples/file_manifest.py examples/convert_file_manifest.py scripts/verify_generated_examples.py

typecheck:
	uv run pyright src/ tests/ examples/semantic_schema.py examples/definition_bindings.py examples/diagnostic_context.py examples/source_provenance.py examples/binding_chains.py examples/reference_locations.py examples/batch_quote.py examples/application_conformance.py examples/storage_quote.py examples/api_application_conformance.py examples/inventory_reservation.py examples/mcp_application_conformance.py examples/external_csv2vcard.py examples/external_trkit.py examples/external_docling.py examples/external_cruft.py examples/enum_collection_conformance.py examples/informational_text/ examples/informational_application_conformance.py examples/enum_export/ examples/convert_enum_export.py examples/selected_tools.py examples/convert_selected_tools.py examples/convert_informational.py examples/call_converted_mcp.py examples/project_workflow.py examples/file_manifest.py examples/convert_file_manifest.py scripts/verify_generated_examples.py scripts/verify_installed_artifacts.py

check: lint typecheck test

changelog-draft:
	uv run towncrier build --draft --version $$(uv version --short)

changelog:
	uv run towncrier build --yes --version $$(uv version --short)

build:
	uv build

clean:
	rm -rf dist/ build/ *.egg-info .pytest_cache .ruff_cache .mypy_cache
	find . -type d -name __pycache__ -exec rm -rf {} +
