VENV=.venv
PYTHON=$(VENV)/bin/python
PIP=$(VENV)/bin/pip
PYTEST=$(VENV)/bin/pytest
PKG=json_to_changelog

.PHONY: help venv install dev test lint clean

help:
	@echo "Targets: venv install dev test lint clean"

venv:
	python3 -m venv $(VENV)
	$(PIP) install -U pip

install: venv
	$(PIP) install -e .

dev: venv
	$(PIP) install -e .[dev]

test:
	$(PYTEST) -q

lint:
	$(PYTHON) -m py_compile $(PKG)/*.py

clean:
	rm -rf $(VENV) *.egg-info __pycache__ $(PKG)/__pycache__ tests/__pycache__
