Skip to content
Snippets Groups Projects
Select Git revision
  • 3e3424aa174b4b1bf87cce7b14d3ba00f30fa82a
  • test default protected
  • master protected
  • original
  • pirati-backup protected
  • beta-2
  • beta-1
  • v3.1.4
  • v3.1.3
  • v3.1.2
  • v3.1.1
  • v3.1.0
  • v3.0.16
  • v3.0.15
  • v3.0.14
  • v3.0.13
  • v3.0.12
  • v3.0.11
  • v3.0.10
  • v3.0.9
  • v3.0.8
  • v3.0.7
  • v3.0.6
  • v3.0.5
  • v3.0.4
25 results

single-ballot-verify.html

Blame
  • Makefile 1.62 KiB
    #!/usr/bin/make -f
    
    PYTHON = python
    VENV   = .venv
    PORT   = 8006
    
    help:
    	@echo "Setup:"
    	@echo "  venv           Setup virtual environment"
    	@echo "  install        Install dependencies to venv"
    	@echo "  install-hooks  Install pre-commit hooks"
    	@echo "  hooks          Run pre-commit hooks manually"
    	@echo "  upgrade        Upgrade requirements"
    	@echo ""
    	@echo "Application:"
    	@echo "  run            Run the application on port ${PORT}"
    	@echo "  shell          Run Django shell"
    	@echo "  worker         Run Celery worker"
    	@echo ""
    	@echo "Database:"
    	@echo "  migrations     Generate migrations"
    	@echo "  migrate        Run migrations"
    	@echo ""
    	@echo "Testing:"
    	@echo "  test           Run tests"
    	@echo "  coverage       Coverage report"
    	@echo ""
    
    venv: .venv/bin/python
    .venv/bin/python:
    	${PYTHON} -m venv ${VENV}
    
    install: venv
    	${VENV}/bin/pip install -r requirements/base.txt -r requirements/dev.txt
    
    install-hooks:
    	pre-commit install --install-hooks
    
    hooks:
    	pre-commit run -a
    
    run: venv
    	${VENV}/bin/python manage.py runserver ${PORT}
    
    shell: venv
    	${VENV}/bin/python manage.py shell_plus
    
    worker: venv
    	${VENV}/bin/celery -A majak worker --pool solo -E -l INFO
    
    migrations: venv
    	${VENV}/bin/python manage.py makemigrations
    
    migrate: venv
    	${VENV}/bin/python manage.py migrate
    
    test:
    	${VENV}/bin/pytest
    
    coverage:
    	${VENV}/bin/pytest --cov --cov-report term-missing
    
    upgrade:
    	(cd requirements && pip-compile -U base.in)
    	(cd requirements && pip-compile -U dev.in)
    	(cd requirements && pip-compile -U production.in)
    
    
    .PHONY: help venv install install-hooks hooks run shell upgrade
    .PHONY: migrations migrate test coverage
    
    # EOF