-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (42 loc) · 1.04 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
SHELL := /bin/bash
define USAGE
Run commands for a project
Commands:
check Runs black, isort, and flake8 over all Python files but does not make changes
dev_setup Sets up development environment
fix Runs black and isort over all Python files and makes changes
test Runs tests
typehint Runs mypy over code base with --ignore-missing-imports flag
update Updates environment. Must be passed either dev or prod as the argument
endef
export USAGE
help:
@echo "$$USAGE"
.PHONY: check
check:
@echo "Checking Python files" && \
sh scripts/check \
|| exit 1
.PHONY: dev_setup
dev_setup:
@echo "Setting up dev environment" && \
sh scripts/dev_setup \
|| exit 1
.PHONY: fix
fix:
@echo "Fixing Python files" && \
sh scripts/fix \
|| exit 1
.PHONY: test
test:
@echo "Running tests" && \
sh scripts/test \
|| exit 1
.PHONY: update
update:
@echo "Updating environment" && \
sh scripts/update $(filter-out $@,$(MAKECMDGOALS)) \
|| exit 1
.PHONY: typehint
typehint:
mypy --ignore-missing-imports --exclude='$(VIRTUAL_ENV)' ./