-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
52 lines (36 loc) · 1.7 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.DEFAULT_GOAL := test
.PHONY: help build pull down restart shell up clean requirements requirements test quality validate
# Generates a help message. Borrowed from https://github.com/pydanny/cookiecutter-djangopackage.
help: ## Display this help message
@echo "Please use \`make <target>\` where <target> is one of"
@perl -nle'print $& if m{^[\.a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'
docker.build: ## Build the Docker containers
docker-compose build
docker.pull: ## Pull the Docker containers
docker-compose pull
docker.down: ## Stop the Docker containers
docker-compose -f docker-compose.yml down
docker.restart: ## Restart the Docker containers
docker-compose -f docker-compose.yml restart
docker.shell: ## Open a shell into the app Docker container
docker-compose -f docker-compose.yml exec realtimefmri /bin/bash
docker.up: ## Start the Docker containers
docker-compose -f docker-compose.yml up
docker.prune:
docker image prune -f && docker volume prune -f && docker network prune -f
docker.develop: docker.down docker.build docker.up
clean: ## Delete generated byte code and coverage reports
find . -name '*.pyc' -delete
coverage erase
requirements: ## Install requirements for local development
pipenv install --dev
production-requirements: ## Install requirements for production
pipenv install
test: clean ## Run tests and generate coverage report
coverage run -m pytest --durations=25 -v
coverage report -m
quality: ## Run pep8 and Pylint
isort --check-only --recursive realtimefmri/
pycodestyle realtimefmri *.py
pylint --rcfile=pylintrc realtimefmri *.py
validate: quality test ## Run tests and quality checks