-
Notifications
You must be signed in to change notification settings - Fork 302
/
Makefile
48 lines (48 loc) · 1.67 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
.PHONY: cleanpyc cleanbuild clean tests coverage dockerize help pypi testdata analysis fixtures fixturize
all: clean cleanpyc cleanbuild tests
analysis:
prospector -s veryhigh flask_jsondash
clean:
rm -rf .tox/
rm -rf coverage_report
cleanbuild:
rm -rf build
rm -rf dist
cleanpyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
coverage: clean
pytest -s -v --cov-report html:coverage_report --cov=flask_jsondash tests ; open coverage_report/index.html
dockerize:
docker build --tag jsondash_base:latest -f BaseDockerfile .
docker-compose build ; docker-compose up
dropall:
python -m flask_jsondash.model_factories --delete
fixtures:
python -m flask_jsondash.model_factories --fixtures example_app/examples/config
fixturize:
mkdir -p fixtures/
python -m flask_jsondash.model_factories --dump fixtures
pypi:
python setup.py sdist upload -r pypi
sort:
# https://github.com/timothycrosley/isort
isort -rc flask_jsondash
tests:
tox
testdata:
python -m flask_jsondash.model_factories --records 10
help:
@echo "all ......... Runs cleanup and tests"
@echo "analysis .... Run prospector analysis"
@echo "clean ....... Cleanup coverage"
@echo "cleanbuild .. Cleanup build and packaging related bits"
@echo "cleanpyc .... Remove .pyc files."
@echo "coverage .... Generate coverage statistics and html"
@echo "dockerize ... Setup docker containers and initialize example apps"
@echo "dropall ..... Delete all dashboards"
@echo "fixtures .... Load all example dashboards"
@echo "fixturize ... Convert existing database records to fixtures"
@echo "tests ....... Run all tests"
@echo "testdata .... Generate some test data"