-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
43 lines (31 loc) · 993 Bytes
/
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
sources = lrp_relations
.PHONY: test format lint unittest coverage pre-commit clean
test: format lint unittest
format:
isort $(sources) tests
black $(sources) tests
lint:
flake8 $(sources) tests
pyright $(sources) tests
unittest:
pytest
coverage:
pytest --cov=$(sources) --cov-branch --cov-report=html --cov-report=term-missing tests
pre-commit:
pre-commit run --all-files
clean:
rm -rf .pytest_cache
rm -rf *.egg-info
rm -rf .tox dist site
rm -rf coverage.xml .coverage
download_clevr:
mkdir -p ../data/clevr
cd ../data/clevr && \
wget https://dl.fbaipublicfiles.com/clevr/CLEVR_v1.0.zip && \
unzip CLEVR_v1.0.zip
nltk:
# which python /srv/data/leonsixt/lrp_fails_the_sanity_check/venv/nltk_data
python -m nltk.downloader all -d "`dirname \`which python\``/../nltk_data"
install_mac:
brew install graphviz
pip install --global-option=build_ext --global-option="-I$(brew --prefix graphviz)/include" --global-option="-L$(brew --prefix graphviz)/lib" pygraphviz