forked from MiXaiLL76/faster_coco_eval
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (27 loc) · 1.02 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
all: clean format sdist wheel
ls -lah dist
wheel:
pipx run build --wheel .
sdist:
pipx run build --sdist .
whl_file = $(shell ls dist/*.whl)
install: clean wheel
pip3 install "$(whl_file)[tests]"
FORMAT_DIRS = ./faster_coco_eval ./tests setup.py
LINE_LENGTH = 80
BLACK_CONFIG = --preview --enable-unstable-feature string_processing
format:
python3 -m docformatter --in-place --recursive --blank $(FORMAT_DIRS)
python3 -m black $(BLACK_CONFIG) --line-length $(LINE_LENGTH) $(FORMAT_DIRS)
python3 -m isort --line-length $(LINE_LENGTH) --profile black $(FORMAT_DIRS)
$(MAKE) linter
linter:
python3 -m docformatter --check --recursive --blank $(FORMAT_DIRS)
python3 -m black $(BLACK_CONFIG) --line-length $(LINE_LENGTH) $(FORMAT_DIRS) --check --diff
python3 -m isort --line-length $(LINE_LENGTH) --profile black $(FORMAT_DIRS) --check --diff
flake8 --max-line-length $(LINE_LENGTH) $(FORMAT_DIRS) --ignore=E203,W503 --exclude "*/model/*"
clean:
rm -rf build
rm -rf *.egg-info
rm -rf dist
pip3 uninstall faster-coco-eval -y