mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-11-14 18:24:37 -06:00
The toolchain folder is now binder/, and the root ./binder symlink is gone. The command is ./binder/binder: a plain path to the script, with no link and no install step. Every invocation moved with it: pre-commit entries, workflow steps, the VS Code extension's command palette, help text, and docs. - bindery/ paths and bindery.* imports, including the chapter code cells that import binder.tools.figures, now name binder/. - Binder (mybinder.org) reads its configuration from a root binder/ folder and refuses to build when binder/ and .binder/ both exist. .binder/postBuild and .binder/requirements.txt move into binder/, so the TinyTorch "Launch Binder" buttons keep working; binder/README.md records which file names the toolchain must not use there. - contributors/projects.json still pointed the book's contributor record at publishing/; it now names binder/, where that .all-contributorsrc lives. - The margin-figure reader-link audit report linked its 222 figures through the retired quarto/ tree; the links now resolve under books/. The hooks reformatted hidden Python cells and trimmed whitespace in the Volume II chapters whose figure imports this rename touches. Checks: ./binder/binder check cli passes (contract and canonical hooks), binder.tools.figures imports, and every workflow YAML file parses. binder test suite, excluding the four modules that cannot import mlsysim through the root symlink (fixed separately): 7 failed, 346 passed. The GitHub repository variables BOOK_ROOT, BOOK_TOOLS, BOOK_DEPS, and BOOK_DOCKER still name the retired book/ layout and must change when this reaches origin.
34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
import sys
|
|
from pathlib import Path
|
|
|
|
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "tools/audit/fmt"))
|
|
|
|
from spurious_zero import find_spurious_zeros # noqa: E402
|
|
|
|
|
|
def test_unit_bearing_dot_zero_is_not_blanket_suppressed():
|
|
text = "The ridge is 153.0 FLOP/byte and the transfer rate is 0.0 MB/s."
|
|
hits = find_spurious_zeros(text)
|
|
values = [value for value, _ in hits]
|
|
assert "153.0" in values
|
|
assert "0.0" in values
|
|
|
|
|
|
def test_product_versions_remain_false_positives():
|
|
assert find_spurious_zeros("PyTorch 2.0 introduced compiler support.") == []
|
|
|
|
|
|
def test_crisp_dm_version_title_is_false_positive():
|
|
text = "CRISP-DM 1.0: Step-by-Step Data Mining Guide."
|
|
assert find_spurious_zeros(text) == []
|
|
|
|
|
|
def test_standards_version_is_false_positive():
|
|
text = "The MPI Forum's standards history records Version 1.0 in May 1994."
|
|
assert find_spurious_zeros(text) == []
|
|
|
|
|
|
def test_reference_family_identifier_is_false_positive():
|
|
text = "Hardware Requirements for a Device Identifier Composition Engine. Family 2.0, Level 00, Revision 78."
|
|
assert find_spurious_zeros(text) == []
|