generated from ltsaprounis/python-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (27 loc) · 695 Bytes
/
Makefile
File metadata and controls
33 lines (27 loc) · 695 Bytes
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
.PHONY: all lint test install environment
SRC_DIR = pycpp
lint:
flake8 $(SRC_DIR)
pydocstyle $(SRC_DIR)
test:
pytest $(SRC_DIR)
install:
pip install -e ".[dev]"
environment:
(\
echo "> Creating venv"; \
python -m venv .venv; \
source .venv/bin/activate; \
echo "> Installing local package in editable mode"; \
pip install -e ".[dev]"; \
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)