Establish Milestone 0 compatibility and quality gates
This commit is contained in:
parent
15a913003c
commit
8ebb78a71d
15 changed files with 1114 additions and 27 deletions
52
Makefile
Normal file
52
Makefile
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
PYTHON := .venv/bin/python
|
||||
PYRIGHT := pyright
|
||||
UV := uv
|
||||
NPM := npm
|
||||
PYTHONPYCACHEPREFIX := /tmp/docforge-quality-pycache
|
||||
PYTEST_BASETEMP := /tmp/docforge-quality-pytest
|
||||
|
||||
.PHONY: benchmark benchmark-smoke build compile contract dependencies format-check gate lint lock test type
|
||||
|
||||
format-check:
|
||||
$(PYTHON) -m ruff format --check src tests tools
|
||||
|
||||
lint:
|
||||
$(PYTHON) -m ruff check src tests tools
|
||||
$(NPM) run lint:web
|
||||
|
||||
type:
|
||||
$(PYRIGHT) --pythonpath .venv/bin/python
|
||||
|
||||
compile:
|
||||
PYTHONPYCACHEPREFIX=$(PYTHONPYCACHEPREFIX) $(PYTHON) -m compileall -q src tests tools
|
||||
|
||||
contract:
|
||||
PYTHONPYCACHEPREFIX=$(PYTHONPYCACHEPREFIX) $(PYTHON) -m pytest -q \
|
||||
-p no:cacheprovider --basetemp=$(PYTEST_BASETEMP) \
|
||||
tests/test_public_contract.py \
|
||||
tests/test_adapter_contract.py::AdapterContractTests::test_no_ast_index_policy_rejects_logic_publication \
|
||||
tests/test_adapter_contract.py::AdapterContractTests::test_no_ast_index_accepts_legacy_and_non_logic_incremental_adapters \
|
||||
tests/test_adapter_contract.py::AdapterContractTests::test_no_ast_rejects_preexisting_logic_index_and_viewer_snapshot \
|
||||
tests/test_mcp_server.py::DocForgeMcpTests::test_no_ast_binding_preserves_adapter_and_blocks_logic
|
||||
|
||||
test:
|
||||
PYTHONPYCACHEPREFIX=$(PYTHONPYCACHEPREFIX) $(PYTHON) -m pytest -q \
|
||||
-p no:cacheprovider --basetemp=$(PYTEST_BASETEMP)
|
||||
|
||||
lock:
|
||||
$(UV) lock --check
|
||||
|
||||
dependencies:
|
||||
$(NPM) ls --all
|
||||
|
||||
build:
|
||||
$(UV) build
|
||||
|
||||
benchmark-smoke:
|
||||
$(PYTHON) tools/milestone0_baseline.py --nodes 25 --samples 1 --cold-samples 1 \
|
||||
--output /tmp/docforge-milestone0-smoke.json > /dev/null
|
||||
|
||||
benchmark:
|
||||
$(PYTHON) tools/milestone0_baseline.py --nodes 1000 --samples 10 --cold-samples 3
|
||||
|
||||
gate: format-check lint type compile contract test lock dependencies build benchmark-smoke
|
||||
Loading…
Add table
Add a link
Reference in a new issue