-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (29 loc) · 945 Bytes
/
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
THIS_FILE := $(lastword $(MAKEFILE_LIST))
FOLDER_PROJECT = ./
FOLDER_CONFIGS = scripts/configs/
.PHONY: clean
clean:
@find . -type d -name '*.pyc' | xargs rm -rf
@find . -type d -name '*.coverage.*' | xargs rm -rf
@find . -type d -name '__pycache__' | xargs rm -rf
@find . -type d -name 'build' | xargs rm -rf
@find . -type d -name 'dist' | xargs rm -rf
@find . -type d -name '*.egg*' | xargs rm -rf
@find . -type d -name 'docs/build/' | xargs rm -rf
@find . -type d -name '.pytest_cache' | xargs rm -rf
.PHONY: build
build:
@poetry shell
@poetry install
update:
@poetry update
black:
@black $(FOLDER_PROJECT) --config pyproject.toml $(args)
lint:
@find $(FOLDER_PROJECT) -type f -name "*.py" | xargs pylint --rcfile=${FOLDER_CONFIGS}/.pylintrc $(args)
isort:
@isort $(FOLDER_PROJECT)
code-review:
$(MAKE) -f $(THIS_FILE) isort args=--check-only
$(MAKE) -f $(THIS_FILE) black args=--check
$(MAKE) -f $(THIS_FILE) lint