generated from allenai/python-package-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
52 lines (46 loc) · 1.19 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
.PHONY : clean
clean:
rm -rf ./.venv
rm -rf ./metroscore.egg-info
.PHONY : docs
docs :
rm -rf docs/build/
sphinx-build -M linkcheck docs/source/ docs/build/
sphinx-autobuild -b html --watch metroscore/ docs/source/ docs/build/
.PHONY : run-checks
run-checks :
isort --check .
black --check .
flake8 .
mypy .
CUDA_VISIBLE_DEVICES='' pytest -v --color=yes --cov --doctest-modules tests/ metroscore/
.PHONY : precommit
precommit :
isort .
black .
flake8 .
mypy .
CUDA_VISIBLE_DEVICES='' pytest -v --color=yes --cov --doctest-modules tests/ metroscore/
.PHONY : precommit-windows
precommit-windows :
isort .
black .
flake8 .
mypy .
@set CUDA_VISIBLE_DEVICES= && pytest -v --color=yes --doctest-modules tests/ metroscore/
.PHONY : setup-dev
setup-dev :
python -m venv .venv
. .venv/bin/activate && \
pip install --upgrade pip && \
pip install -r requirements.txt && \
pip install -r dev-requirements.txt && \
pip install -e .
.PHONY : setup-dev-windows
setup-dev-windows :
python -m venv .venv
call .venv/Scripts/activate && \
.venv\Scripts\python.exe -m pip install --upgrade pip && \
pip install -r requirements.txt && \
pip install -r dev-requirements.txt && \
pip install -e .