Seed repository: rev-8.0.0 reference, frozen oracle, toolchain, test harness
Reference implementation of the strap-beam generators at revision 8.0.0, kept so the acceptance oracle can be regenerated. Not a live target; the running application has no OpenSCAD dependency. The oracle holds 123 frozen cases, 113 accepted and 10 rejected, produced by OpenSCAD 2021.01 with BOSL2 at 92d697c2. The ten rejections are part of the contract: a port that accepts them is wrong. tests/test_oracle.py specifies the port API and was written before the port, so the interface follows from what must be verified rather than what is convenient to implement. Proven by adversarial stub: a build() that rejects everything passes all 10 rejection tests and fails all 226 acceptance tests.
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# Entry points. Every target is safe to run more than once.
|
||||
|
||||
PY ?= venv/bin/python
|
||||
PIP ?= venv/bin/pip
|
||||
|
||||
.PHONY: help venv deps deps-nocad toolchain verify-oracle regenerate-oracle test test-nocad clean
|
||||
|
||||
help:
|
||||
@echo "venv create the virtualenv (Python 3.11)"
|
||||
@echo "deps install base + CAD requirements"
|
||||
@echo "deps-nocad install base requirements only"
|
||||
@echo "toolchain build the pinned reference toolchain image"
|
||||
@echo "verify-oracle check the committed oracle is intact"
|
||||
@echo "regenerate-oracle rebuild the oracle inside the pinned image"
|
||||
@echo "test pytest -n auto"
|
||||
@echo "test-nocad the separability check: suite must pass without CAD"
|
||||
|
||||
venv:
|
||||
test -d venv || python3 -m venv venv
|
||||
$(PIP) install --upgrade pip
|
||||
|
||||
deps: venv
|
||||
$(PIP) install -r requirements-base.txt -r requirements-cad.txt
|
||||
$(PIP) install -e .
|
||||
|
||||
deps-nocad: venv
|
||||
$(PIP) install -r requirements-base.txt
|
||||
$(PIP) install -e .
|
||||
|
||||
toolchain:
|
||||
docker build -t mechcomp/reference-toolchain:8.0.0 tools/reference-toolchain
|
||||
|
||||
verify-oracle:
|
||||
python3 fixtures/strap-beam-8.0.0/make_fixtures.py --verify
|
||||
|
||||
regenerate-oracle: toolchain
|
||||
./tools/reference-toolchain/verify.sh --full
|
||||
|
||||
test:
|
||||
$(PY) -m pytest -n auto
|
||||
|
||||
test-nocad:
|
||||
$(PY) -m pytest -n auto -k "not cad"
|
||||
|
||||
clean:
|
||||
rm -rf .pytest_cache src/*.egg-info
|
||||
find . -name __pycache__ -type d -prune -exec rm -rf {} +
|
||||
Reference in New Issue
Block a user