-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (48 loc) · 1.31 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
###############################################################################
# COMMANDS
###############################################################################
.PHONY: clean
## Clean python cache file.
clean:
find . -name '*.pyo' -delete
find . -name '*.pyc' -delete
find . -name __pycache__ -delete
find . -name '*~' -delete
find . -name .coverage -delete
find . -name 'coverage.*' -delete
find . -name 'requirements*.txt' -delete
find . -type d -name .pytest_cache -exec rm -r {} +
find . -type d -name .ruff_cache -exec rm -r {} +
find . -type d -name .mypy_cache -exec rm -r {} +
.PHONY: install-pdm
## install pdm before environment setup
install-pdm:
python -m pip install -U \
pip setuptools wheel pdm
.PHONY: update-lock
## update pdm.lock
update-lock:
pdm update --no-sync
.PHONY: deploy-dev-x86
## deploy x86 dev environment
deploy-dev-x86:
pdm sync -G dev -G repl -G x86 --clean
.PHONY: deploy-dev-osx
## deploy OSX dev environment
deploy-dev-osx:
pdm sync -G dev -G repl -G osx --clean
.PHONY: format
## isort and yapf formatting
format:
isort src tests
yapf -i -r src tests
.PHONY: lint
## pylint check
lint:
ruff check src/rcnn --show-source --show-fixes \
--exit-zero
.PHONY: test
test:
PYTHONPATH=. \
pytest -s -v --cov=app --cov-config=pyproject.toml \
> coverage.txt