-
Notifications
You must be signed in to change notification settings - Fork 154
Expand file tree
/
Copy pathMakefile
More file actions
133 lines (106 loc) Β· 4.75 KB
/
Copy pathMakefile
File metadata and controls
133 lines (106 loc) Β· 4.75 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
.PHONY: install
install: ## Install the virtual environment and install the prek hooks
@echo "π Creating virtual environment using uv"
@uv sync
@uv run prek install
.PHONY: skills-install
skills-install: ## Install recommended agent skills from skills-lock.json
@echo "π Installing recommended agent skills"
@npx skills experimental_install
@echo "Restart Codex to pick up new skills."
.PHONY: check
check: ## Run code quality tools.
@echo "π Checking lock file consistency with 'pyproject.toml'"
@uv lock --locked
@echo "π Linting code: Running prek"
@uv run prek run -a
@echo "π Static type checking: Running ty"
@uv run ty check
.PHONY: test
test: ## Test the code with pytest
@echo "π Testing code: Running pytest"
@uv run python -m pytest --doctest-modules
.PHONY: unit-test
unit-test: ## Run tests that do not cross the Server boundary end to end.
@uv run python -m pytest --doctest-modules --ignore=tests/e2e
.PHONY: e2e-test
e2e-test: ## Run CLI to Client SDK to Server end-to-end tests.
@uv run python -m pytest tests/e2e
.PHONY: real-e2e-test
real-e2e-test: ## Run opt-in real Codex Experience/Skill tests; REAL_E2E_MODE defaults to all.
@uv run python -m pytest -s tests/e2e/real_experience_skill --run-real-e2e \
--real-e2e-mode="$${REAL_E2E_MODE:-all}" \
--real-codex-timeout="$${REAL_CODEX_TIMEOUT:-600}" \
--real-e2e-env-file="$${REAL_E2E_ENV_FILE:-.env}"
.PHONY: harness-sync
harness-sync: ## Install the Bub replay harness environment.
@uv sync --project e2e/bub
.PHONY: harness-check
harness-check: ## Validate the Bub replay harness and committed scenarios.
@uv run ruff check e2e/bub
@uv run ruff format --check e2e/bub
@uv run ty check --project e2e/bub --python e2e/bub/.venv e2e/bub/src integrations/bub/src
@uv run --project e2e/bub python -m pytest e2e/bub/tests
@uv run --project e2e/bub powercontext-e2e --help >/dev/null
.PHONY: harness-acceptance
harness-acceptance: ## Evaluate workloads by ID or category against an existing Server.
@uv run --project e2e/bub powercontext-e2e acceptance \
--output "$${POWERCONTEXT_E2E_OUTPUT:-e2e/bub/results}" $(ARGS)
.PHONY: harness-rescore
harness-rescore: ## Rescore REPLAY without rerunning Bub or PowerContext.
@test -n "$${REPLAY:-}" || { echo "REPLAY is required" >&2; exit 2; }
@uv run --project e2e/bub powercontext-e2e rescore "$${REPLAY}" \
--output "$${POWERCONTEXT_E2E_OUTPUT:-e2e/bub/results/rescore}"
.PHONY: harness-compose-check
harness-compose-check: ## Validate the SQLite and OceanBase Compose environments.
@POWERCONTEXT_E2E_DATABASE=sqlite e2e/bub/run.sh check
@POWERCONTEXT_E2E_DATABASE=oceanbase e2e/bub/run.sh check
.PHONY: harness-compose-acceptance
harness-compose-acceptance: ## Build and evaluate workloads by ID or category in the fixed harness.
@e2e/bub/run.sh acceptance $(ARGS)
.PHONY: harness-compose-down
harness-compose-down: ## Stop the selected isolated harness environment and remove its volumes.
@e2e/bub/run.sh down
.PHONY: contract-test
contract-test: api-generate-check js-api-generate-check ## Verify generated API code and contract bindings.
@uv run python -m pytest tests/test_api_contract.py tests/test_js_operations.py
.PHONY: api-generate
api-generate: ## Generate API models and operations from OpenAPI.
@uv run python scripts/generate_api.py
.PHONY: api-generate-check
api-generate-check: ## Verify generated API code is current.
@uv run python scripts/generate_api.py --check
.PHONY: js-api-generate
js-api-generate: ## Generate the DeepSeek Harness operations table from OpenAPI.
@uv run python scripts/generate_js_operations.py
.PHONY: js-api-generate-check
js-api-generate-check: ## Verify generated JS operations are current.
@uv run python scripts/generate_js_operations.py --check
.PHONY: js-test
js-test: ## Run DeepSeek Harness plugin unit tests.
@pnpm --dir integrations/dsh/plugins/powercontext test
.PHONY: build
build: clean-build ## Build wheel file
@echo "π Creating wheel file"
@uv build
.PHONY: clean-build
clean-build: ## Clean build artifacts
@echo "π Removing build artifacts"
@uv run python -c "import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"
.PHONY: publish
publish: ## Publish a release to PyPI.
@echo "π Publishing."
@uv publish dist/*
.PHONY: build-and-publish
build-and-publish: build publish ## Build and publish.
.PHONY: docs-test
docs-test: ## Test if documentation can be built without warnings or errors
@uv run zensical build -s
.PHONY: docs
docs: ## Build and serve the documentation
@uv run zensical serve
.PHONY: help
help:
@uv run python -c "import re; \
[[print(f'\033[36m{m[0]:<20}\033[0m {m[1]}') for m in re.findall(r'^([a-zA-Z0-9_-]+):.*?## (.*)$$', open(makefile).read(), re.M)] for makefile in ('$(MAKEFILE_LIST)').strip().split()]"
.DEFAULT_GOAL := help