-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathMakefile
48 lines (36 loc) · 1.25 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
.phoney: install export format lint typing test app test-app build-app clean-build
help:
@echo "install - install dependencies"
@echo "export - export dependencies to requirements.txt"
@echo "format - format code with black"
@echo "lint - lint code with ruff"
@echo "typing - type check code with mypy"
@echo "test - run tests"
@echo "app - run app"
@echo "test-app - run app in test mode with test config for sargo"
@echo "build-app - build app"
@echo "clean-build - clean build"
poetry:
curl -sSL https://install.python-poetry.org | python3 -
install:
poetry install --with dev
poetry run python scripts/download-tools.py
poetry run pre-commit install
export:
poetry export -f requirements.txt --output requirements.txt
format:
poetry run black .
lint:
poetry run ruff openandroidinstaller/ --ignore E501
typing:
poetry run mypy openandroidinstaller/. --ignore-missing-imports
test: format lint
PYTHONPATH=openandroidinstaller:$(PYTHONPATH) poetry run pytest --cov=openandroidinstaller tests/
app:
poetry run python openandroidinstaller/openandroidinstaller.py
test-app:
poetry run python openandroidinstaller/openandroidinstaller.py --test --test_config sargo
build-app:
poetry run python scripts/build.py
clean-build:
rm -rf build/ dist/