-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (33 loc) · 878 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
44
45
## CONFIG
PYTHONPATH := $(PYTHONPATH):$(pwd)
SHELL := /bin/bash -v
## VARIABLES
VIRTUAL_ENV_NAME := $(shell poetry env info -p | rev | cut -d'/' -f1 | rev)
## COMMANDS
kernel-install:
@poetry run python -m ipykernel install --user --name $(VIRTUAL_ENV_NAME)
install:
@poetry install
@make kernel-install
cleanup:
@rm .coverage
@rm -rf **/__pycache__
@rm -rf ~/Library/Jupyter/kernels/$(VIRTUAL_ENV_NAME)
@poetry env remove python
shell:
@poetry shell
run:
@poetry run python src/main.py
watch:
@watchman-make -p 'src/**/*.py' -r 'make run'
test:
@poetry run pytest src/ -vv -s
test-coverage:
@poetry run pytest src/ -vv -s --cov=src --cov-report=term-missing
test-watch:
@watchman-make -p 'src/**/*.py' -r 'make test'
test-coverage-watch:
@watchman-make -p 'src/**/*.py' -r 'make test-coverage'
.PHONY: notebook
notebook:
@poetry run jupyter notebook