-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (44 loc) · 1.26 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
54
55
56
clean: clean-pyc clean-test
quality: set-style-dep check-quality
style: set-style-dep set-style
setup: set-precommit set-style-dep set-test-dep set-git set-dev set-mecab
test: set-test-dep set-test
##### basic #####
set-git:
git config --local commit.template .gitmessage
set-style-dep:
pip3 install isort==5.10.1 black==22.10.0 flake8==5.0.4
set-test-dep:
pip3 install pytest==7.0.1
set-precommit:
pip3 install pre-commit==2.17.0
pre-commit install
set-dev:
pip3 install -r requirements.txt
set-test:
python3 -m pytest tests/
set-style:
black --config pyproject.toml .
isort --settings-path pyproject.toml .
flake8 .
set-mecab:
apt-get update
apt-get install g++ openjdk-8-jdk python3-dev python3-pip curl git
python3 -m pip install --upgrade pip
python3 -m pip install konlpy
bash <(curl -s https://raw.githubusercontent.com/konlpy/konlpy/master/scripts/mecab.sh)
check-quality:
black --config pyproject.toml --check .
isort --settings-path pyproject.toml --check-only .
flake8 .
##### clean #####
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-test:
rm -f .coverage
rm -f .coverage.*
rm -rf .pytest_cache
rm -rf .mypy_cache