-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
48 lines (37 loc) · 1.27 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
BUILDDIR?='build'
PG_ETOOLS_PARAMS?=-U postgres -p 15432 -h 127.0.0.1
.mkbuilddir:
mkdir -p ${BUILDDIR}
help:
@echo ""
@echo "Usage:"
@echo " make develop build dev environment "
@echo " make test run tests "
@echo " make lint run lint checks "
@echo " make clean remove generated files "
@echo " make fullclean clean + remove cache "
@echo " make docs generate docs "
@echo " make run run app "
develop:
pipenv sync --dev
test:
pipenv run py.test -v --create-db
lint:
pipenv run flake8 src/ tests/; exit 0;
pipenv run isort . --check-only; exit 0;
clean:
rm -fr ${BUILDDIR} dist *.egg-info .coverage coverage.xml .eggs
find src -name __pycache__ -o -name "*.py?" -o -name "*.orig" -prune | xargs rm -rf
find tests -name __pycache__ -o -name "*.py?" -o -name "*.orig" -prune | xargs rm -rf
rm -f db/clean.sql db/etools.dump db/public.sqldump db/tenant.sql
fullclean:
rm -fr .cache .pytest_cache
$(MAKE) clean
sync-etools:
sh src/etools_datamart/apps/multitenant/postgresql/dump.sh ${PG_ETOOLS_PARAMS}
docs:
.mkbuilddir
mkdir -p ${BUILDDIR}/docs
sphinx-build -aE docs/ ${BUILDDIR}/docs
run:
docker-compose up