This repository has been archived on 2021-12-24. You can view files and clone it, but cannot push or open issues/pull-requests.
jos/Makefile

42 lines
712 B
Makefile

# =====CONFIG=====
PYTHON := python3.9
# This can't contain spaces (I think)
VENV := venv
# By default, just create the venv when needed
all: venv
# Create the venv
$(VENV)/bin/activate: requirements.txt requirements-dev.txt
@ '$(PYTHON)' -m venv '$(VENV)'
@ '$(VENV)'/bin/pip install -r requirements.txt -r requirements-dev.txt
# Convenient alias for the venv
venv: $(VENV)/bin/activate
.PHONY: venv
# Remove the venv
clean:
@ rm -rf '$(VENV)'
# Run the Flask server
# TODO
run: venv
# Format the codebase using black
format: venv
@ '$(VENV)/bin/python' -m black src
# Lint the codebase using flake8
lint: venv
@ '$(VENV)/bin/python' -m flake8 src
# Run rests using pytest
# TODO
test: venv