-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
71 lines (53 loc) · 1.89 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
SHELL=bash
all: install check check-cli
version: install
python -m seguid --version
#---------------------------------------------------------------
# Install package
#---------------------------------------------------------------
install-deps:
python -m pip install pytest pydivsufsort
install:
python -m pip install .
#---------------------------------------------------------------
# Build documentation (drop?!?)
#---------------------------------------------------------------
docs-install-deps:
python -m pip install sphinx numpydoc sphinx-autobuild sphinx-rtd-theme
docs: .PHONY
cd docs; \
make html
#---------------------------------------------------------------
# Check package
#---------------------------------------------------------------
check:
python -m pytest
#---------------------------------------------------------------
# Estimate test code coverage
#---------------------------------------------------------------
coverage:
python -m pytest --cov=src/
coverage-html:
pytest --cov=src/ --cov-report=html; xdg-open htmlcov/index.html
#---------------------------------------------------------------
# Miscellaneous
#---------------------------------------------------------------
cleanup:
find . -type d -name "__pycache__" -exec rm -rf {} + || true
[[ -d .pytest_cache ]] && rm -rf .pytest_cache || true
[[ -f .coverage ]] && rm .coverage || true
[[ -d htmlcov ]] && rm -rf htmlcov || true
#---------------------------------------------------------------
# Check CLI using 'seguid-tests' test suite
#---------------------------------------------------------------
add-submodules:
git submodule add https://github.com/seguid/seguid-tests seguid-tests
seguid-tests: .PHONY
git submodule init
git submodule update
cd "$@" && git pull origin main
check-cli: seguid-tests
$(MAKE) -C "$<" check-cli/seguid-python
check-api: seguid-tests
$(MAKE) -C "$<" check-api/seguid-python
.PHONY: