-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
47 lines (35 loc) · 1.31 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
###### Demos
demo_quick: ## Run quick start demo
@cd example_projects && docker-compose up -d
DATABASE_URL=postgresql://postgres:[email protected]:5432/postgres poetry run adev runserver example_projects/quick_start/app.py
demo_main: ## Run main demo
@cd example_projects && docker-compose up -d
@WITHOUT_UPDATE_DB=1 DATABASE_URL=postgresql://postgres:[email protected]:5432/postgres poetry run adev runserver example_projects/main/__init__.py
test: ## run tests
@docker stop $(docker ps | grep pytest | awk '{ print $1 }') | true
poetry run pytest --slow -v -s -p no:warnings
bandit:
poetry run bandit -r ./aiohttp_admin2
mypy: ## run mypy
@mypy aiohttp_admin2
lint: bandit ## check style
poetry run flake8 aiohttp_admin2 --exclude views/aiohttp/templates
build_lint:
cat README.rst > README_BUILD.rst && echo >> README_BUILD.rst && cat HISTORY.rst >> README_BUILD.rst
poetry build
poetry run python -m twine check --strict dist/*
rm README_BUILD.rst
touch README_BUILD.rst
rm -rf dist
.DEFAULT_GOAL := help
define PRINT_HELP_PYSCRIPT
import re, sys
for line in sys.stdin:
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
if match:
target, help = match.groups()
print("%-20s %s" % (target, help))
endef
export PRINT_HELP_PYSCRIPT
help:
@poetry run python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)