forked from Amsterdam/django-gisserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (24 loc) · 1.18 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
.PHONY: help install test retest coverage dist docs format
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
help:
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/##//'
install: ## Install the package into the current virtualenv
pip install -e .[tests]
pip install pre-commit
pre-commit install
test: ## Run the tests
PYTHONPATH=. GISSERVER_USE_DB_RENDERING=1 pytest -vs
PYTHONPATH=. GISSERVER_USE_DB_RENDERING=0 pytest -vs
docker-test: ## Run the tests against Linux GIS library versions
docker build . -t django-gisserver
docker run -v $(ROOT_DIT):/host/ -e GISSERVER_USE_DB_RENDERING=1 --rm -it django-gisserver pytest -vvs
docker run -v $(ROOT_DIT):/host/ -e GISSERVER_USE_DB_RENDERING=0 --rm -it django-gisserver pytest -vvs
retest: ## Rerun the last failed tests.
PYTHONPATH=. pytest -vs --lf
coverage: ## Run the tests with coverage
PYTHONPATH=. pytest --cov=gisserver --cov-report=term-missing --cov-report=html
dist: ## Generate the sdist/wheel (can be uploaded with twine)
rm -rf build/ dist/
./setup.py sdist bdist_wheel
format: ## Fix code formatting using pre-commit hooks
pre-commit run -a