Commit d3db8ac
authored
Feature/containerized tests (#25)
* feat: containerize QA test execution
- Add tests/Dockerfile (Python 3.11-slim) with test deps baked in
- Refactor Taskfile.yml: test tasks now run via docker with bind mounts
- Replace test:install with test:build (builds test runner image)
- Update README.md task runner table and QA section
- Update about-src.html QA section with Docker note
No local Python environment is needed to run tests anymore.
* fix: add per-chapter progress logging and unbuffered stdout
- Set PYTHONUNBUFFERED=1 in tests/Dockerfile
- Add [n/total] progress output per chapter in algorithmic_checker.py
- All print() calls use flush=True for container environments
* feat: incremental test report with same-commit resume
- Add --report flag to write PDF_TEXT_TESTS.md incrementally per chapter
- Parse existing report to skip already-tested chapters on same commit
- Include git commit hash and timestamp in report header
- Rolling summary updated after each chapter completes
- PYTHONUNBUFFERED=1 in Dockerfile for streaming output
- Per-chapter progress logging with flush in console output
* fix: pass GIT_COMMIT env var into container for report commit hash
* fix: strip XML tags from PDF text and skip empty diffs
- Add _XML_TAG_RE to strip embedded HTML/XML tags from PDF text
(e.g. <ahref='...'>, </a>) before comparison
- Skip diffs where both sides are empty after stripping
- Eliminates false HIGH severity reports from PDF markup artifacts
* docs: update tests/README.md + fix page header stripping
- Rewrite tests/README.md with Docker workflow, incremental reporting,
XML tag stripping, --report flag, severity rules, and resume feature
- Generalize _PDF_FOOTER_RE to match any page header/footer pattern
(e.g. 'Introduction : 1 01/28/2021'), not just 'Chapter' prefix
* refactor: reorganize test tasks — test:unit, test:pdf, test:all
- test:unit → runs CompendiumUI Vitest suite
- test:pdf → runs PDF↔HTML text comparison (Docker)
- test:all → runs both unit + pdf tests
- test:chapter, test:llm unchanged1 parent 5febfa1 commit d3db8ac
File tree
8 files changed
+315
-57
lines changed- CompendiumUI/public
- tests
8 files changed
+315
-57
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | | - | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
78 | 85 | | |
79 | | - | |
| 86 | + | |
80 | 87 | | |
81 | 88 | | |
82 | | - | |
| 89 | + | |
| 90 | + | |
83 | 91 | | |
84 | | - | |
| 92 | + | |
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
| 96 | + | |
88 | 97 | | |
89 | | - | |
| 98 | + | |
90 | 99 | | |
91 | 100 | | |
92 | | - | |
| 101 | + | |
93 | 102 | | |
94 | | - | |
| 103 | + | |
| 104 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | | - | |
9 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | | - | |
12 | | - | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | | - | |
15 | | - | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
18 | 32 | | |
19 | 33 | | |
20 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
21 | 42 | | |
22 | 43 | | |
23 | 44 | | |
| |||
26 | 47 | | |
27 | 48 | | |
28 | 49 | | |
| 50 | + | |
29 | 51 | | |
30 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
31 | 58 | | |
32 | 59 | | |
33 | | - | |
34 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
35 | 63 | | |
36 | 64 | | |
37 | 65 | | |
38 | 66 | | |
39 | 67 | | |
40 | 68 | | |
41 | | - | |
| 69 | + | |
42 | 70 | | |
43 | 71 | | |
44 | 72 | | |
| |||
47 | 75 | | |
48 | 76 | | |
49 | 77 | | |
50 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
51 | 91 | | |
52 | 92 | | |
53 | 93 | | |
| |||
57 | 97 | | |
58 | 98 | | |
59 | 99 | | |
60 | | - | |
| 100 | + | |
61 | 101 | | |
62 | 102 | | |
63 | 103 | | |
| |||
67 | 107 | | |
68 | 108 | | |
69 | 109 | | |
| 110 | + | |
70 | 111 | | |
71 | 112 | | |
72 | 113 | | |
73 | 114 | | |
74 | 115 | | |
75 | 116 | | |
| 117 | + | |
76 | 118 | | |
77 | | - | |
| 119 | + | |
78 | 120 | | |
79 | 121 | | |
80 | 122 | | |
| |||
83 | 125 | | |
84 | 126 | | |
85 | 127 | | |
86 | | - | |
| 128 | + | |
87 | 129 | | |
88 | 130 | | |
89 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| |||
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
121 | | - | |
122 | | - | |
123 | | - | |
| 127 | + | |
124 | 128 | | |
125 | 129 | | |
126 | 130 | | |
| |||
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
158 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
159 | 165 | | |
160 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
161 | 175 | | |
162 | | - | |
| 176 | + | |
163 | 177 | | |
164 | 178 | | |
0 commit comments