Makefile 1.52 KB
Newer Older
1
2
3
PYTHON ?= python
PYTEST ?= pytest
CTAGS ?= ctags
4
PIP ?= pip
5

6
7
8
# .PHONY defines parts of the makefile that are not dependant on any specific file
# This is most often used to store functions
.PHONY = help test tags clean
9

10
11
12
# Defines the default target that `make` will to try to make, or in the case of a phony target, execute the specified commands
# This target is executed whenever we just type `make`
.DEFAULT_GOAL = help
Pradat Yoann's avatar
Pradat Yoann committed
13

14
15
16
17
18
19
20
21
# The @ makes sure that the command itself isn't echoed in the terminal
help:
	@echo "---------------HELP-----------------"
	@echo "make setup to setup the project"
	@echo "make test to run the tests"
	@echo "make clean to remove build/dev files"
	@echo "make install to install"
	@echo "------------------------------------"
Pradat Yoann's avatar
Pradat Yoann committed
22

23
test:
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
	$(PIP) install --upgrade pytest pytest-cov
	$(PYTEST) --cov-config=.coveragerc --cov-report term-missing --cov . . 

build:
	@echo "---------------Build variant_annotator-----------------"
	$(PYTHON) -m pip install --user --upgrade setuptools wheel
	$(PYTHON) setup.py sdist bdist_wheel

install:
	@echo "---------------Install variant_annotator-----------------"
	$(PIP) install --upgrade pip setuptools wheel
	$(PIP) install -r reqs/requirements.txt
	$(PIP) install .

update:
	@echo "---------------Update vcf2maf-----------------"
	cd tools/vcf2maf
	git pull
	cd ../..
	@echo "---------------Update ensembl-vep-----------------"
	cd tools/ensembl-vep
	git pull
	cd ../..
tags:
	$(CTAGS) --python-kinds=-i --exclude=*/tests/* -R .
49

50
clean:
51
	rm -f tags
52
53
54
	rm -rf build
	rm -rf dist
	rm -rf *.egg-info