forked from microsoft/lisa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (34 loc) · 1.21 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
# This Makefile simply automates all our tasks. Its use is optional.
all: setup run test check
# Install Python packages
setup:
@poetry install --no-ansi --remove-untracked -E "azure libvirt doc legacy aws"
# Run LISA
run:
@poetry run python -X dev lisa/main.py --debug
# Run unit tests
test:
@poetry run python -X dev -m unittest discover
# Generate coverage report (slow, reruns LISA and tests)
coverage:
@poetry run coverage erase
@poetry run coverage run lisa/main.py
@poetry run coverage run --append -m unittest discover
@poetry run coverage report --skip-empty --include=lisa*,examples*,microsoft/testsuites* --omit=lisa/tests/* --precision 2
# Run syntactic, semantic, formatting and type checkers
check: flake8 mypy
# This also runs Black and isort via plugins
flake8:
@poetry run flake8
# This runs the static type checking
mypy:
@poetry run mypy --strict --exclude '.venv/.*' --namespace-packages --implicit-reexport --config-file pyproject.toml -p docs -p lisa -p microsoft
# Print current Python virtualenv
venv:
@poetry env list --no-ansi --full-path
# Auto fix style issues.
fix: fix-isort fix-black
fix-isort:
@poetry run isort ./lisa ./microsoft
fix-black:
@poetry run black ./lisa ./microsoft