-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
86 lines (56 loc) · 1.88 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
SHELL = /usr/bin/env bash -eo pipefail
.PHONY: clean pytest compile protocompile vulture vulture-allowlist
DIRS = scratch web/static/js
compile: protocompile pytest
dist-compile: compile
@python -m compileall .
protocompile:
@./tools/protobuf/compile.sh
docker-protocompile:
@./scripts/dev/compile_protobuf_in_docker.sh
clean-test-pycache:
@./scripts/dev/clean_test_pycache.sh
ensure-test-inits:
@./scripts/dev/ensure_inits.sh test/integration
setup-integration-tests: clean-test-pycache ensure-test-inits protocompile
clean-py:
@find . -name '*.pyc' -delete
@./scripts/dev/clean_pycache.sh .
clean: clean-py
@git clean -fdX src/python/zigopt/protobuf/gen
@git clean -fdX web/js/zigopt
pytest: clean-test-pycache protocompile
@./test/unit_tests.sh
test: pytest
computetest:
@./pp pytest -rw --durations=5 test/python/testcompute
auxtest:
@./pp pytest -rw --durations=5 test/python/testaux
vulture:
@./tools/dead-code/run_vulture.py
vulture-allowlist:
@./tools/dead-code/run_vulture.py --make-whitelist
web-dead-code:
@./tools/dead-code/web_resources.py
setup-filestorage:
@./scripts/launch/compose.sh run --rm init-minio-filestorage
fix-db: docker-protocompile
@./scripts/dev/createdb_in_docker.sh config/development/ --fake-data --drop-tables
setup-cookiejar:
@./scripts/launch/compose.sh run --rm init-minio-cookiejar
setup-hooks: python-requirements
@pre-commit install --install-hooks
mkdirs: $(DIRS)
$(DIRS): %:
@mkdir -p "$*"
js-requirements:
@NODE_ENV=development yarn install
python-requirements:
@pip install --upgrade pipenv
@pipenv install --dev
playwright-install: python-requirements
@playwright install chromium
local-requirements: js-requirements python-requirements
submodules:
@git submodule init && git submodule update
update: mkdirs submodules docker-protocompile local-requirements playwright-install setup-hooks setup-cookiejar setup-filestorage