2022-04-27 11:39:20 +00:00
|
|
|
define run_migrations ## run migrations
|
|
|
|
@ . ./venv/bin/activate && python manage.py makemigrations
|
|
|
|
@ . ./venv/bin/activate && python manage.py migrate
|
|
|
|
endef
|
|
|
|
|
|
|
|
define unimplemented
|
|
|
|
@echo "ERROR: Unimplemented!" && echo -1.
|
|
|
|
endef
|
|
|
|
|
|
|
|
default: ## Run app
|
|
|
|
$(call run_migrations)
|
2022-09-11 21:27:31 +00:00
|
|
|
. ./venv/bin/activate && yes yes | python manage.py collectstatic
|
2022-04-27 11:39:20 +00:00
|
|
|
. ./venv/bin/activate && python manage.py runserver
|
|
|
|
|
|
|
|
coverage: ## Generate test coverage report
|
2022-06-17 18:37:47 +00:00
|
|
|
. ./venv/bin/activate && coverage run manage.py test
|
|
|
|
. ./venv/bin/activate && coverage report -m
|
2022-06-18 08:24:03 +00:00
|
|
|
. ./venv/bin/activate && coverage html
|
2022-04-27 11:39:20 +00:00
|
|
|
|
|
|
|
doc: ## Generates documentation
|
|
|
|
$(call unimplemented)
|
|
|
|
|
|
|
|
docker: ## Build Docker image from source
|
|
|
|
$(call unimplemented)
|
|
|
|
|
|
|
|
env: ## Install all dependencies
|
|
|
|
@-virtualenv venv
|
|
|
|
. ./venv/bin/activate && pip install -r requirements.txt
|
2022-06-26 23:06:56 +00:00
|
|
|
. ./venv/bin/activate && ./integration/ci.sh init
|
2022-07-07 08:28:53 +00:00
|
|
|
. ./venv/bin/activate && yes yes | python manage.py collectstatic
|
2022-04-27 11:39:20 +00:00
|
|
|
|
|
|
|
freeze: ## Freeze python dependencies
|
|
|
|
@. ./venv/bin/activate && pip freeze > requirements.txt
|
|
|
|
|
|
|
|
help: ## Prints help for targets with comments
|
|
|
|
@cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
|
|
|
|
2022-06-23 15:29:22 +00:00
|
|
|
integration-test: ## run integration tests
|
|
|
|
. ./venv/bin/activate && integration/tests.sh
|
|
|
|
|
2022-04-27 11:39:20 +00:00
|
|
|
lint: ## Run linter
|
2022-07-08 12:26:59 +00:00
|
|
|
@./venv/bin/black dashboard accounts dash support billing infrastructure integration
|
2022-04-27 11:39:20 +00:00
|
|
|
|
|
|
|
migrate: ## Run migrations
|
|
|
|
$(call run_migrations)
|
|
|
|
|
|
|
|
test: ## Run tests
|
2022-06-18 08:24:03 +00:00
|
|
|
@. ./venv/bin/activate && python manage.py test --parallel
|