forked from chanzuckerberg/miniwdl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
86 lines (66 loc) · 2.7 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
SHELL := /bin/bash
export TMPDIR = /tmp
test: check_check check unit_tests integration_tests
# fail fast
qtest:
python3 tests/no_docker_services.py
pytest -vx -n `python3 -c 'import multiprocessing as mp; print(mp.cpu_count())'` --dist=loadscope tests
prove -v tests/{check,runner}.t
python3 tests/no_docker_services.py
unit_tests:
pytest -v -n `python3 -c 'import multiprocessing as mp; print(mp.cpu_count())'` --dist=loadscope --cov=WDL tests
python3 tests/no_docker_services.py
integration_tests:
prove -v tests/{check,runner,cromwell}.t
python3 tests/no_docker_services.py
skylab_bulk_rna:
prove -v tests/applied/skylab_bulk_rna.t
DVGLx:
prove -v tests/applied/DVGLx.t
viral_assemble:
prove -v tests/applied/viral_assemble.t
ci_housekeeping: sopretty check_check check doc
ci_unit_tests: unit_tests
coveralls
check:
pyre \
--search-path stubs \
--typeshed `python3 -c 'import site; print(site.getuserbase())'`/lib/pyre_check/typeshed \
--show-parse-errors check
# no-member disabled due to https://github.com/PyCQA/pylint/issues/3137
pylint -j `python3 -c 'import multiprocessing as mp; print(mp.cpu_count())'` --errors-only WDL -d no-member
check_check:
# regression test against pyre doing nothing (issue #100)
echo "check_check: str = 42" > WDL/DELETEME_check_check.py
$(MAKE) check > /dev/null 2>&1 && exit 1 || exit 0
rm WDL/DELETEME_check_check.py
# uses black to rewrite source files!
pretty:
black --line-length 100 --target-version py36 WDL/
# no-member disabled due to https://github.com/PyCQA/pylint/issues/3137
pylint -d cyclic-import,empty-docstring,missing-docstring,invalid-name,bad-continuation --exit-zero WDL -d no-member
# for use in CI: complain if source code isn't at a fixed point for black
sopretty:
@git diff --quiet || (echo "ERROR: 'make sopretty' must start with a clean working tree"; exit 1)
$(MAKE) pretty
@git diff --quiet || (echo "ERROR: source files were modified by black; please fix up this commit with 'make pretty'"; exit 1)
# build docker image with current source tree, poised to run tests e.g.:
# docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp miniwdl
docker:
docker build -t miniwdl .
# push to pypi test
pypi_test: bdist
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
# push to pypi live
pypi: bdist
echo -e "\033[0;31;5m -- Not a test: pushing $$(basename `ls -1 dist/*.tar.gz` .tar.gz) to PyPI! -- \033[0m"
twine upload dist/*
# build dist
bdist:
rm -rf dist/
python3 setup.py sdist bdist_wheel
# sphinx
doc:
$(MAKE) -C docs html
docs: doc
.PHONY: check check_check sopretty pretty test qtest docker doc docs pypi_test pypi bdist ci_housekeeping unit_tests integration_tests skylab_bulk_rna DVGLx viral_assemble