~sirodoht/mataroa

mataroa/Makefile -rw-r--r-- 850 bytes
521adb51Theodore Keloglou fix page ul ol serif theme 4 days ago
                                                                                
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
.PHONY: all
all: format lint cov

.PHONY: format
format:
	@echo Formating Python code
	black --exclude '/(\.direnv|\.pyenv)/' .
	isort --skip-glob .pyenv --profile black .

.PHONY: lint
lint:
	@echo Linting Python code
	flake8 --exclude=.pyenv/,.direnv/ --ignore=E203,E501,W503
	isort --check-only --skip-glob .pyenv --profile black .
	black --check --exclude '/(\.direnv|\.pyenv)/' .
	shellcheck -x *.sh

.PHONY: cov
cov:
	coverage run --source='.' --omit '.pyenv/*' manage.py test
	coverage report -m

.PHONY: pginit
pginit:
	PGDATA=postgres-data/ pg_ctl init
	PGDATA=postgres-data/ pg_ctl start
	createuser mataroa
	psql -U postgres -c "ALTER USER mataroa CREATEDB;"
	psql -U mataroa -d postgres -c "CREATE DATABASE mataroa;"

.PHONY: pgstart
pgstart:
	PGDATA=postgres-data/ pg_ctl start

.PHONY: pgstop
pgstop:
	PGDATA=postgres-data/ pg_ctl stop