forked from RasaHQ/rasa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
90 lines (73 loc) · 2.63 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
.PHONY: clean test lint init
JOBS ?= 1
help:
@echo "make"
@echo " clean"
@echo " Remove Python/build artifacts."
@echo " install"
@echo " Install rasa."
@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 " prepare-tests-ubuntu"
@echo " Install system requirements for running tests on Ubuntu and Debian based systems."
@echo " prepare-tests-macos"
@echo " Install system requirements for running tests on macOS."
@echo " prepare-tests-files"
@echo " Download all additional project files needed to run tests."
@echo " test"
@echo " Run pytest on tests/."
@echo " Use the JOBS environment variable to configure number of workers (default: 1)."
@echo " doctest"
@echo " Run all doctests embedded in the documentation."
@echo " livedocs"
@echo " Build the docs locally."
@echo " release"
@echo " Prepare a release."
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
install:
poetry run python -m pip install -U 'pip<20'
poetry install
install-mitie:
poetry run python -m pip install -U git+https://github.com/tmbo/MITIE.git#egg=mitie
install-full: install install-mitie
poetry install -E full
formatter:
poetry run black rasa tests
lint:
poetry run flake8 rasa tests
poetry run black --check rasa tests
types:
poetry run pytype --keep-going rasa -j 16
prepare-tests-files:
poetry install --extras spacy
poetry run python -m spacy download en_core_web_md
poetry run python -m spacy download de_core_news_sm
poetry run python -m spacy link en_core_web_md en --force
poetry run python -m spacy link de_core_news_sm de --force
wget --progress=dot:giga -N -P data/ https://s3-eu-west-1.amazonaws.com/mitie/total_word_feature_extractor.dat
prepare-wget-macos:
brew install wget || true
prepare-tests-macos: prepare-wget-macos prepare-tests-files
brew install graphviz || true
prepare-tests-ubuntu: prepare-tests-files
sudo apt-get -y install graphviz graphviz-dev python-tk
test: clean
# OMP_NUM_THREADS can improve overral performance using one thread by process (on tensorflow), avoiding overload
OMP_NUM_THREADS=1 poetry run pytest tests -n $(JOBS) --cov rasa
doctest: clean
cd docs && poetry run make doctest
livedocs:
cd docs && poetry run make livehtml
release:
poetry run python scripts/release.py