initial commit

This commit is contained in:
Mandel WebGUI Bot
2026-02-22 05:22:01 +01:00
commit d6dc3278b3
23 changed files with 624 additions and 0 deletions

59
Makefile Normal file
View File

@@ -0,0 +1,59 @@
.PHONY: fail-if-no-virtualenv all install loaddata test lint black debug undebug
all: install migrate loaddata collectstatic
fail-if-no-virtualenv:
ifndef VIRTUAL_ENV # check for a virtualenv in development environment
ifndef PYENVPIPELINE_VIRTUALENV # check for jenkins pipeline virtualenv
$(error this makefile needs a virtualenv)
endif
endif
ifndef PIP_INDEX_URL
PIP_INDEX_URL=https://pypi.mandelblog.com/mandel/testing/+simple/
endif
ifndef EXTRAS
EXTRAS="[test]"
endif
install: fail-if-no-virtualenv
PIP_INDEX_URL=${PIP_INDEX_URL} pip install --pre --editable .${EXTRAS} setuptools wheel --upgrade --upgrade-strategy=eager --use-deprecated=legacy-resolver
migrate:
manage.py migrate --no-input
loaddata:
-manage.py loaddemodata
collectstatic:
manage.py collectstatic --no-input --verbosity=0
lint: fail-if-no-virtualenv
cat success_20260222052159/ocyan.json |python3 -m json.tool 1>/dev/null
pylint setup.py success_20260222052159/
black:
@echo "No formatter configured in template; add your preferred formatter here."
test: fail-if-no-virtualenv
@coverage run --source='success_20260222052159' `which manage.py` test
@coverage report
@coverage xml
@coverage html
run: fail-if-no-virtualenv lint test migrate collectstatic
manage.py runserver
debug: fail-if-no-virtualenv
PIP_INDEX_URL=${PIP_INDEX_URL} pip install --pre ocyan.plugin.debug
undebug:
PIP_INDEX_URL=${PIP_INDEX_URL} pip uninstall -y ocyan.plugin.debug
live:
@echo "Did you update the version in setup.py? [y/N]" && read ans && [ $$ans = y ]
rm -fr dist
rm -fr build*
version --plugin=wheel --skip-tag
devpi --index=projects/production upload dist/*