-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
98 lines (71 loc) · 1.86 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
HYPOTHESIS_PROFILE = dev
PIP = pip3
# BIN_DIR := "./bin"
PYTHON = python3
FAST_TEST_COMMAND = pytest \
--hypothesis-profile dev
PYTEST_COMMAND = pytest \
--flake8 \
--cov cortexpy \
--cov-report term-missing \
--cov-report html \
--cov-report xml \
--cov-config setup.cfg \
--hypothesis-profile $(HYPOTHESIS_PROFILE)
BASE_TEST_COMMAND = tox -- $(PYTEST_COMMAND)
TEST_COMMAND = $(BASE_TEST_COMMAND) tests/test_unit tests/test_acceptance
BENCHMARK_DIR := cortex_tools_benchmark
init: update
update:
git submodule update --init --recursive
doctest:
tox -- python -m doctest $$(find src/cortexpy/graph -type f -name '*.py' | grep -v '__*' )
fast:
$(FAST_TEST_COMMAND) tests/test_unit
unit:
$(BASE_TEST_COMMAND) tests/test_unit
acceptance:
$(BASE_TEST_COMMAND) tests/test_acceptance
fixtures:
$(MAKE) -C $(BENCHMARK_DIR) test-fixtures
pycompile:
$(PYTHON) setup.py build_ext --inplace
test:
$(MAKE) doctest
$(TEST_COMMAND)
ci:
$(TEST_COMMAND) -vv
lint:
tox -- pytest --pylint src
libs/seq_file/bin/dnacat:
$(MAKE) -C $$(dirname $$(dirname $@))
check_git_dirty:
git status --porcelain
test -z "$$(git status --porcelain)"
deploy: check_git_dirty
tox -r
$(MAKE) test
$(MAKE) build
$(MAKE) check
$(MAKE) upload
check:
twine check dist/*
upload:
twine upload dist/*
build: clean
$(MAKE) check_git_dirty
$(MAKE) dist
dist: pycompile
$(PYTHON) setup.py sdist
docs:
$(MAKE) -C docs html
setup-benchmark: dist
$(eval CORTEXPY_WHEEL := $(shell find dist/cortexpy-*.whl))
CORTEXPY_WHEEL=../$(CORTEXPY_WHEEL) $(MAKE) -C $(BENCHMARK_DIR) setup
benchmark:
$(MAKE) -C $(BENCHMARK_DIR)
lock:
conda env export | grep -v '^name:' |grep -v '^prefix:' > environment.lock.yml
clean:
rm -rf dist
.PHONY: test acceptance unit clean update pipenv compile build publish doc dist pycompile docs