-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (33 loc) · 1.32 KB
/
Makefile
File metadata and controls
42 lines (33 loc) · 1.32 KB
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
.PHONY: dev-venv test snapshot playback watch export clean help
VENV = .venv
PYTHON = $(VENV)/bin/python3
PIP = $(VENV)/bin/pip
help:
@echo "Doghouse Makefile"
@echo " dev-venv: Create venv and install dependencies"
@echo " test: Run unit tests"
@echo " snapshot [PR=id]: Capture PR state"
@echo " playback NAME=name: Run a playback fixture"
@echo " watch [PR=id]: Monitor PR live"
@echo " export [PR=id]: Create repro bundle"
dev-venv:
python3 -m venv $(VENV)
$(PIP) install --upgrade pip
$(PIP) install -e .[dev]
test:
PYTHONPATH=src $(PYTHON) -m pytest tests/doghouse
snapshot:
@if [ -z "$(PR)" ]; then PYTHONPATH=src $(PYTHON) -m doghouse.cli.main snapshot; \
else PYTHONPATH=src $(PYTHON) -m doghouse.cli.main snapshot --pr $(PR); fi
playback:
@if [ -z "$(NAME)" ]; then echo "Usage: make playback NAME=pb1_push_delta"; exit 1; fi
PYTHONPATH=src $(PYTHON) -m doghouse.cli.main playback $(NAME)
watch:
@if [ -z "$(PR)" ]; then PYTHONPATH=src $(PYTHON) -m doghouse.cli.main watch; \
else PYTHONPATH=src $(PYTHON) -m doghouse.cli.main watch --pr $(PR); fi
export:
@if [ -z "$(PR)" ]; then PYTHONPATH=src $(PYTHON) -m doghouse.cli.main export; \
else PYTHONPATH=src $(PYTHON) -m doghouse.cli.main export --pr $(PR); fi
clean:
rm -rf build/ dist/ *.egg-info
find . -type d -name "__pycache__" -exec rm -rf {} +