.PHONY: all
all: format lint type-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 '  make build                 build C extension in-place'
	@echo

.PHONY: test
test:
	pytest -v tests

.PHONY: lint
lint:
	flake8 .

.PHONY: format
format:
	isort .
	black .

.PHONY: type-check
type-check:
	mypy .

.PHONY: build
build:
	python setup.py build_ext --inplace
