-
Notifications
You must be signed in to change notification settings - Fork 50
/
Makefile
41 lines (29 loc) · 973 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
SRC=src
DMBA_BASE=dmba-base
DMBA_DEV=dmba-dev
DMBA_JUPYTER=dmba-jupyter
bash:
docker run -it --rm -v $(PWD):/code $(DMBA_BASE) bash
jupyter:
docker run --rm -v $(PWD):/code -p 8931:8931 $(DMBA_JUPYTER) jupyter-lab --allow-root --port=8931 --ip 0.0.0.0 --no-browser
tests:
docker run -it --rm -v $(PWD):/code $(DMBA_DEV) pytest src
watch-tests:
rm -f .testmondata
docker run -it --rm -v $(PWD):/code $(DMBA_DEV) ptw --runner "pytest --testmon"
rm -f .testmondata
isort:
docker run -it --rm -v $(PWD):/code $(DMBA_DEV) isort src
ruff:
docker run -it --rm -v $(PWD):/code $(DMBA_DEV) ruff --fix .
mypy:
docker run -it --rm -v $(PWD):/code $(DMBA_DEV) mypy src
# Docker container
images:
docker build -t $(DMBA_BASE) -f docker/Dockerfile.base .
docker build -t $(DMBA_DEV) -f docker/Dockerfile.devtools .
docker build -t $(DMBA_JUPYTER) -f docker/Dockerfile.jupyter .
# Virtualenv
venv:
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt