-
-
Notifications
You must be signed in to change notification settings - Fork 160
/
Makefile
73 lines (57 loc) · 1.3 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
.PHONY: all
all: dist
.PHONY: build
build: check-all docs test-all
.PHONY: check-all
check-all: check-format check-types
.PHONY: check-format
check-format:
ruff check
ruff format --check
.PHONY: format
format:
ruff check --fix
ruff format
.PHONY: check-types
check-types:
mypy mitiq --show-error-codes
.PHONY: clean
clean:
rm -rf dist
rm -rf mitiq.egg-info
rm -rf .mypy_cache .pytest_cache .ruff_cache
rm -rf htmlcov coverage.xml .coverage .coverage.*
rm -rf .ipynb_checkpoints
.PHONY: dist
dist:
python setup.py sdist
.PHONY: docs
docs:
make -C docs html
.PHONY: docs-clean
docs-clean:
make -C docs clean
make -C docs html
.PHONY: linkcheck
linkcheck:
make -C docs linkcheck
.PHONY: install
install:
pip install -e .[development]
.PHONY: install-hooks
install-hooks:
@git config --local core.hooksPath .git-hooks/
@chmod +x .git-hooks/*
@echo "Git hooks installed."
.PHONY: test
test:
pytest -n auto -v --cov=mitiq --cov-report=term --cov-report=xml --ignore=mitiq/interface/mitiq_pyquil
.PHONY: test-%
test-%:
pytest -n auto -v --cov=mitiq --cov-report=term --cov-report=xml */$(*)/*
.PHONY: test-pyquil
test-pyquil:
pytest -v --cov=mitiq --cov-report=term --cov-report=xml mitiq/interface/mitiq_pyquil
.PHONY: test-all
test-all:
pytest -n auto -v --cov=mitiq --cov-report=term --cov-report=xml