version: '3'
env:
VENV_ACTIVATE: "/{{ .TASKFILE_DIR }}/backend/.venv/bin/activate"
tasks:
bootstrap:
internal: true
cmds:
- . script/bootstrap
dir: backend
lint:
desc: "Lints /backend using black + pylint."
deps: [bootstrap]
cmd: source {{ .VENV_ACTIVATE }} && black . --check && pylint ./rotini
lintfix:
desc: "Lints and fixes /backend using black + pylint."
cmd: source {{ .VENV_ACTIVATE }} && black . && pylint ./rotini
test:
desc: "Run the test suites."
cmd: . script/test
start:
desc: "Starts the backend application."
dotenv:
- "../.env"
cmd: source {{ .VENV_ACTIVATE }} && python -m uvicorn main:app
dir: backend/rotini
start-db:
desc: "Provisions a local Postgres database."
- ".env"
cmd: . script/provision-db
migrate:
desc: "Applies migrations. Usage: be:migrate -- <up|down>"
- "../../.env"
- source {{ .VENV_ACTIVATE }} && python migrate.py {{.CLI_ARGS}}
dir: backend/rotini/migrations
lock-deps:
desc: "Locks production and development dependencies"
- source {{ .VENV_ACTIVATE }} && . script/requirements-lock