PYTHON=env/bin/python LIBRARY=polyphonic/interface/static DROPZONE=5.7.0 BULMA=1.0.4 ALPINE=3.15.12 VERSION=0.8.4 export DJANGO_SETTINGS_MODULE=polyphonic.config.settings.dev -include local.mk test: .coverage check: .lint pre-commit: check test .coverage: polyphonic poetry run coverage run --include "polyphonic/*" --omit "*/migrations/*" polyphonic/manage.py test polyphonic poetry run coverage html poetry run coverage report .lint: polyphonic poetry run ruff check polyphonic poetry run ruff format --check polyphonic touch $@ build: dist/polyphonic-${VERSION}-py3-none-any.whl dist/polyphonic-${VERSION}-py3-none-any.whl: polyphonic poetry build dev-setup: poetry install --with=dev poetry run manage migrate poetry run manage createsuperuser --username admin --email admin@localhost upgrade: poetry run manage migrate poetry run manage collectstatic ${MAKE} libraries #libraries: static/dropzone static/fonts/Quicksand_Book.otf libraries: ${LIBRARY}/css/bulma.min.css ${LIBRARY}/js/alpine.js ${LIBRARY}/css/material.css ${LIBRARY}/css/bulma.min.css: curl -o $@ "https://cdn.jsdelivr.net/npm/bulma@${BULMA}/css/bulma.min.css" ${LIBRARY}/js/alpine.js: curl -o $@ "https://cdn.jsdelivr.net/npm/alpinejs@${ALPINE}/dist/cdn.min.js" ${LIBRARY}/css/material.css: curl -o $@ "https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" static/dropzone: wget -O dropzone-${DROPZONE}.zip https://github.com/enyo/dropzone/archive/v${DROPZONE}.zip unzip dropzone-${DROPZONE}.zip mv dropzone-${DROPZONE}/dist static/dropzone rm -rf dropzone-${DROPZONE} dropzone-${DROPZONE}.zip static/fonts/Quicksand_Book.otf: wget -O quicksand.zip https://dl.dafont.com/dl/?f=quicksand mkdir -p static/fonts unzip -d static/fonts quicksand.zip rm quicksand.zip start_s3_storage: test -f teststore/pid && ${MAKE} stop_s3_storage || true mkdir -p teststore MINIO_ACCESS_KEY=polyphonic_test_key MINIO_SECRET_KEY=polyphonic_secret minio server teststore & echo "$$!" > teststore/pid cat teststore/pid stop_s3_storage: kill `cat teststore/pid` | true rm teststore/pid