Makefile 827 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 build . \
  24. --tag pycs:latest \
  25. --build-arg UID=${UID} \
  26. --build-arg GID=${GID}
  27. backup_db:
  28. @mkdir -p ${DB_BACKUPS}
  29. cp db/data.sqlite3 ${DB_BACKUPS}/data.${today}.sqlite3
  30. run_docker: build_docker
  31. @mkdir -p projects db external_data
  32. docker-compose up