-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathMakefile
More file actions
117 lines (79 loc) · 2.56 KB
/
Copy pathMakefile
File metadata and controls
117 lines (79 loc) · 2.56 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
.PHONY: venv rebuild-venv install install-dev install-locked install-dev-locked freeze local-ci local-ci-quick local-ci-full local-ci-container local-ci-public-service preflight acceptance structure hygiene privacy governance export-lite export-hygiene lint format format-black typecheck test pre-commit build sdist wheel docs-serve clean-runtime clean-cache serve-api serve-bot container-build container-smoke container-release
PYTHON ?= python3
EXPORT_PARENT ?= /tmp/fatecat-export
venv:
$(PYTHON) -m venv .venv
rebuild-venv:
rm -rf .venv
$(PYTHON) -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
install:
$(PYTHON) -m pip install -e .
install-dev:
$(PYTHON) -m pip install -e '.[dev]'
install-locked:
$(PYTHON) -m pip install -c requirements.lock.txt -r requirements.txt
install-dev-locked:
$(PYTHON) -m pip install -c requirements-dev.lock.txt -r requirements-dev.txt
freeze:
$(PYTHON) -m pip freeze > requirements.lock.txt
local-ci: local-ci-quick
local-ci-quick:
bash scripts/local-ci.sh --profile quick
local-ci-full:
bash scripts/local-ci.sh --profile full
local-ci-container:
bash scripts/local-ci.sh --profile container
local-ci-public-service:
bash scripts/local-ci.sh --profile public-service
preflight:
bash scripts/preflight.sh --mode pure --bootstrap --pretty
acceptance:
bash scripts/acceptance.sh --with-dev
structure:
bash scripts/check-structure.sh
hygiene:
bash scripts/check-source-hygiene.sh
privacy:
bash scripts/check-privacy-fixtures.sh
governance:
python3 governance/tools/validate_governance_package.py --project-root . --strict
export-lite:
bash scripts/export-runtime.sh --output-parent $(EXPORT_PARENT) --mode lite
export-hygiene:
bash scripts/check-export-hygiene.sh $(EXPORT_PARENT)/fatecat
lint:
$(PYTHON) -m ruff check .
format:
$(PYTHON) -m ruff format .
format-black:
$(PYTHON) -m black .
typecheck:
$(PYTHON) -m mypy -p fate_core
test:
$(PYTHON) -m pytest -q
pre-commit:
$(PYTHON) -m pre_commit run --all-files
build:
$(PYTHON) -m build
sdist:
$(PYTHON) -m build --sdist
wheel:
$(PYTHON) -m build --wheel
docs-serve:
$(PYTHON) -m mkdocs serve
clean-runtime:
bash scripts/clean-runtime.sh
clean-cache:
$(PYTHON) -m pip cache purge
find . -type d \( -name __pycache__ -o -name .pytest_cache -o -name build -o -name dist -o -name '*.egg-info' \) -prune -exec rm -rf {} +
serve-api:
bash scripts/serve-api.sh
serve-bot:
bash scripts/serve-bot.sh
container-build:
bash scripts/container-build.sh
container-smoke:
bash scripts/container-smoke.sh
container-release:
bash scripts/container-release.sh