forked from CamDavidsonPilon/lifelines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (33 loc) · 776 Bytes
/
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
init:
ifeq ($(TRAVIS), true)
pip install -r reqs/travis-requirements.txt
pip install pandas==${PANDAS_VERSION}
pip install numpy==${NUMPY_VERSION}
pip freeze --local
else
pip install -r reqs/dev-requirements.txt
pre-commit install
endif
test:
py.test lifelines/ -rfs --cov=lifelines --block=False --cov-report term-missing
lint:
ifeq ($(TRAVIS_PYTHON_VERSION), 2.7)
echo "Skip linting for Python2.7"
else
make black
prospector --output-format grouped
endif
black:
ifeq ($(TRAVIS_PYTHON_VERSION), 2.7)
echo "Skip linting for Python2.7"
else
black lifelines/ -l 120 --fast
endif
check_format:
ifeq ($(TRAVIS_PYTHON_VERSION), 3.6)
black . --check --line-length 120
else
echo "Only check format on Python3.6"
endif
pre:
pre-commit run --all-files