2022-06-09 22:20:40 +01:00
|
|
|
set dotenv-load
|
|
|
|
|
|
|
|
# Load virtualenv
|
|
|
|
export PATH := justfile_directory() + "/env/bin:" + env_var('PATH')
|
2022-06-30 21:27:30 +01:00
|
|
|
export PYTHONUNBUFFERED := "true"
|
2022-06-09 22:20:40 +01:00
|
|
|
|
|
|
|
# Dev environment
|
|
|
|
export DEBUG := "true"
|
|
|
|
export SECRET_KEY := "super-secret-key"
|
|
|
|
|
|
|
|
# Recipes
|
|
|
|
@default:
|
|
|
|
just --list
|
|
|
|
|
|
|
|
install:
|
|
|
|
python -m venv env
|
|
|
|
pip install -r dev-requirements.txt
|
2022-06-14 19:14:25 +01:00
|
|
|
npm ci
|
2022-06-09 22:20:40 +01:00
|
|
|
|
|
|
|
@start:
|
|
|
|
honcho start
|
|
|
|
|
|
|
|
@manage +ARGS:
|
|
|
|
./manage.py {{ ARGS }}
|
|
|
|
|
2022-06-12 15:17:28 +01:00
|
|
|
@pip +ARGS:
|
|
|
|
pip {{ ARGS }}
|
|
|
|
|
2022-06-10 16:22:20 +01:00
|
|
|
test *ARGS:
|
|
|
|
./manage.py test {{ ARGS }}
|
2022-06-12 15:17:28 +01:00
|
|
|
|
|
|
|
format:
|
|
|
|
black website
|
|
|
|
isort website
|
2022-06-12 19:35:06 +01:00
|
|
|
npm run format
|
2022-06-12 15:17:28 +01:00
|
|
|
|
2022-06-12 19:35:06 +01:00
|
|
|
lint: lint_python lint_node
|
|
|
|
|
|
|
|
lint_python:
|
2022-06-12 15:17:28 +01:00
|
|
|
black --check website
|
|
|
|
isort --check website
|
|
|
|
flake8 website
|
2022-07-10 18:39:06 +01:00
|
|
|
mypy website --show-error-codes
|
2022-06-12 19:35:06 +01:00
|
|
|
|
|
|
|
@lint_node:
|
|
|
|
npm run lint
|