generated from ltsaprounis/python-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (33 loc) · 912 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
.PHONY: all lint test install environment
SRC_DIR = benchmarks
lint:
flake8 $(SRC_DIR)
pydocstyle $(SRC_DIR)
test:
pytest $(SRC_DIR)
install:
pip install -r requirements.dev.txt
pip install -r requirements.txt
pip install -e .
environment:
(\
echo "> Creating venv"; \
python -m venv .venv; \
source .venv/bin/activate; \
echo "> Installing dev requirements"; \
pip install -r requirements.dev.txt; \
echo "> Installing requirements"; \
pip install -r requirements.txt; \
echo "> Installing local package in editable mode"; \
pip install -e .; \
echo "> Making venv available in jupyter notebooks"; \
python -m ipykernel install --name=$(SRC_DIR); \
jupyter kernelspec list; \
echo "> Installing pre-commit"; \
pre-commit install; \
)
clean:
echo "> Removing virtual environment"
rm -r .venv
echo "> Uninstalling from jupyter"
jupyter kernelspec uninstall $(SRC_DIR)