-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (20 loc) · 862 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
.PHONY: deps lint shell server server_headless test docker_up docker_down
deps:
poetry install
./clone_github_deps.sh
lint:
poetry run ruff check .
shell:
poetry run python
server:
poetry run python prepare_data.py && poetry run streamlit run app.py
server_headless:
poetry run python prepare_data.py && poetry run streamlit run app.py --browser.serverAddress 0.0.0.0 --server.headless true
test:
poetry run -- ptw -- -s -vv $(args)
test_once:
poetry run pytest -s
docker_up:
docker build -t customer-behaviour . && docker run -d -e STREAMLIT_SERVER_COOKIE_SECRET=$${STREAMLIT_SERVER_COOKIE_SECRET} -e STREAMLIT_SERVER_PORT=$${STREAMLIT_SERVER_PORT} -p $${STREAMLIT_SERVER_PORT}:$${STREAMLIT_SERVER_PORT} customer-behaviour
docker_down:
docker ps -a -q --filter ancestor=customer-behaviour | xargs -I {} sh -c 'docker stop {} && docker rm {}'