.PHONY: all clean venv run format format-check lint mypy test dist reformat dev PYTHON := venv/bin/python PIP := venv/bin/pip all: run clean: rm -rf venv build dist .pytest_cache .mypy_cache *.egg-info DB_PATH=scipaperloader/papers.db reset-db: rm -f $(DB_PATH) flask db init || true flask db migrate -m "Initial migration" flask db upgrade venv: python3 -m venv venv && \ $(PIP) install --upgrade pip setuptools && \ $(PIP) install --editable ".[dev]" run: venv venv/bin/flask --app scipaperloader --debug run format: venv/bin/black . venv/bin/isort . format-check: venv/bin/black --check . venv/bin/isort --check . reformat: format lint lint: venv/bin/flake8 . mypy: venv/bin/mypy scipaperloader test: venv/bin/pytest dist: format-check lint mypy test $(PIP) wheel --wheel-dir dist --no-deps . dev: clean venv