-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (42 loc) · 1.14 KB
/
Makefile
File metadata and controls
52 lines (42 loc) · 1.14 KB
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
.PHONY: default
default: help
.PHONY: help
help:
@echo "Usage: make <target>"
@echo ""
@echo "Targets:"
@echo " format Format code with isort and black"
@echo " lint Lint code with flake8, isort and black"
@echo " format-black Format code with black"
@echo " lint-black Lint code with black"
@echo " format-isort Format code with isort"
@echo " lint-isort Lint code with isort"
@echo " lint-flake8 Lint code with flake8"
@echo " test Run tests"
@echo " test-update-snapshots"
@echo " Run tests and update snapshots"
.PHONY: format
format: format-isort format-black
.PHONY: lint
lint: lint-flake8 lint-isort lint-black
.PHONY: format-black
format-black:
black -l 100 .
.PHONY: lint-black
lint-black:
black -l 100 --check .
.PHONY: format-isort
format-isort:
isort --force-sort-within-sections --profile=black .
.PHONY: lint-isort
lint-isort:
isort --force-sort-within-sections --profile=black --check .
.PHONY: lint-flake8
lint-flake8:
flake8
.PHONY: test
test:
TZ=UTC LC_ALL=C pytest .
.PHONY: test-update-snapshots
test-update-snapshots:
TZ=UTC LC_ALL=C pytest --snapshot-update .