ifeq ($(PYTHONPATH),)
	PYTHONPATH := src
else
	PYTHONPATH := src:$(PYTHONPATH)
endif
export PYTHONPATH

.PHONY: all
all : format lint check test

.PHONY: help
help :
	@echo
	@echo 'Commands:'
	@echo
	@echo '  make test                  run tests'
	@echo '  make lint                  run linter'
	@echo '  make format                run code formatter'
	@echo '  make type-check            run static type checker'
	@echo

.PHONY: test
test :
	pytest -v --cov=sgn_gwframe --cov-report=term-missing .

.PHONY: lint
lint :
	ruff check

.PHONY: format
format :
	ruff format
	ruff check --fix

.PHONY: type-check
check :
	mypy src

.PHONY: docs
docs :
	mkdocs build -c
