forked from Snakemake-Profiles/lsf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (32 loc) · 845 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
39
COVG_REPORT = tests/htmlcov/index.html
OS := $(shell uname -s)
BOLD := $(shell tput bold)
NORMAL := $(shell tput sgr0)
.PHONY: install-ci
install-ci:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install --pre -r dev-requirements.txt
.PHONY: lint
lint:
flake8 .
fmt:
black .
check-fmt:
black --check .
# TEST ########################################################################
.PHONY: test
test:
cd tests/ && pytest --cov=src --cov-branch --cov-report=html --cov-report=term && cd ..
.PHONY: test-ci
test-ci:
cd tests/ && pytest --cov=src --cov-branch --cov-report=xml --cov-report=term && cd ..
.PHONY: coverage
coverage: test
ifeq ($(OS), Linux)
xdg-open $(COVG_REPORT)
else ifeq ($(OS), Darwin)
open $(COVG_REPORT)
else
echo "ERROR: Unknown OS detected - $OS"
endif