forked from cp818/at
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (45 loc) · 1.34 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
help:
@echo "make"
@echo " install"
@echo " Install all requirements for running the bot."
@echo " install-dev"
@echo " Install all requirements for development."
@echo " clean"
@echo " Remove Python/build artifacts."
@echo " formatter"
@echo " Apply black formatting to code."
@echo " lint"
@echo " Lint code with flake8, and check if black formatter should be applied."
@echo " types"
@echo " Check for type errors using pytype."
@echo " test-actions"
@echo " Run custom action unit tests"
install:
python -m pip install --upgrade "pip<20"
pip install -r requirements.txt
python -m spacy download en_core_web_md
python -m spacy link en_core_web_md en
pip install -e .
install-dev:
python -m pip install --upgrade "pip<20"
pip install -r requirements-dev.txt
python -m spacy download en_core_web_md
python -m spacy link en_core_web_md en
pip install -e .
clean:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
rm -rf build/
rm -rf .pytype/
rm -rf dist/
rm -rf docs/_build
formatter:
black --verbose --config pyproject.toml actions tests
lint:
flake8 actions tests
black --check --verbose --config pyproject.toml actions tests
types:
pytype --keep-going actions tests
test-actions:
pytest . -vv