6
0

Makefile 874 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. UID := $(shell id -u)
  2. GID := $(shell id -g)
  3. today := $(shell date +%Y-%m-%d)
  4. DB_BACKUPS := db.backups
  5. export UID
  6. export GID
  7. run:
  8. python app.py
  9. run_webui:
  10. @cd webui && npm run serve
  11. install:
  12. @echo "INSTALL MISSING!"
  13. run_tests:
  14. python -m unittest discover tests/
  15. run_coverage:
  16. @PYTHONWARNINGS="ignore::ResourceWarning" coverage run -m unittest discover tests/
  17. @coverage run --concurrency=eventlet --append -m unittest tests.client.pipeline_tests
  18. coverage html
  19. coverage report -m
  20. run_pylint:
  21. pylint --rcfile=.pylintrc app.py pycs
  22. build_docker:
  23. @docker pull python:3.9
  24. @docker pull node:14
  25. docker build . \
  26. --tag pycs:latest \
  27. --build-arg UID=${UID} \
  28. --build-arg GID=${GID}
  29. backup_db:
  30. @mkdir -p ${DB_BACKUPS}
  31. cp db/data.sqlite3 ${DB_BACKUPS}/data.${today}.sqlite3
  32. run_docker: build_docker
  33. @mkdir -p projects db external_data
  34. docker-compose up