-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (47 loc) · 1.45 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
53
CUR_DIR := ${CURDIR}
OS := $(shell uname)
.PHONY: clean
clean:
@echo "cleaning up..."
@rm -rf ${CUR_DIR}/data/input
poetry env remove --all
@rm -rf ${CUR_DIR}/.venv ${CUR_DIR}/build ${CUR_DIR}/.pytest_cache
.PHONY: setup
setup:
@echo "setting up..."
ifeq ($(OS),Darwin)
@echo "Mac"
else
@echo "Linux"
endif
@poetry config virtualenvs.in-project true
@poetry install --only main -vvv
.PHONY: setup_all
setup_all:
@echo "setting up..."
@poetry config virtualenvs.in-project true
@poetry install --only main --only jupyter --only test --only lint -vvv
@poetry run poetry run jupyter contrib nbextension install --user
@poetry run jupyter nbextension enable --py codeium --user
@poetry run jupyter serverextension enable --py codeium --user
.PHONY: format
format:
@echo "formatting..."
@poetry install --only lint
@poetry run black .
# ruff fix
@poetry run pre-commit run --all-files --config .pre-commit-config.yaml
.PHONY: run_tests
run_tests:
@echo "running tests..."
@poetry install --only main --only test -vvv
@poetry run pytest -q tests
.PHONY: run_notebook
run_notebook:
@echo "running notebook..."
@poetry config virtualenvs.in-project true
@poetry install --only main --only jupyter -vvv
@poetry run poetry run jupyter contrib nbextension install --user
@poetry run jupyter nbextension enable --py codeium --user
@poetry run jupyter serverextension enable --py codeium --user
@poetry run jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser