88 lines
2.3 KiB
Python
88 lines
2.3 KiB
Python
"""Test doubles for the tools that read a plan: a goals file, a decision log and plans in todo.md's shapes."""
|
|
|
|
# Voids code health, so these tests weigh only the project's own goals; class CodeHealth weighs it.
|
|
VOID = "**Void:** code health, since a test project has no code to read.\n\n"
|
|
|
|
README = "# P\n\n## Goals\n\n" + VOID + "1. **Achieve:** Fast.\n2. **Maintain:** Correct.\n 1. **Achieve:** Tested.\n\n## Audience\n\nMe.\n"
|
|
|
|
DECISIONS = "## A choice\n\nStands until `todo.md` item 5 ends it.\n"
|
|
|
|
TODO = """# todo
|
|
|
|
## Scoring
|
|
|
|
`Score = 100 * V / 2**S`
|
|
|
|
`Bar = 2`
|
|
|
|
`Next ID = 6`
|
|
|
|
## Items
|
|
|
|
| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
| 1 | 0.2.0 | | | **Ship the later thing.** | 1 | 1 | 1 | 1 | 1 | 1 by 9 | 0 |
|
|
| 2 | 0.1.0 | | | **Tighten the tests.** | 1 | 2 | 1 | 2 | 4 | 2.1 by 1 | 0 |
|
|
| 3 | 0.1.0 | | | **Make it fast, `a \\| b`.** | 2 | 1 | 2 | 3 | 7 | 2.1 by 8, 1 by 6 | 0 |
|
|
| 4 | 0.1.0 | | security | **Rotate the leaked key.** | 3 | 3 | 5 | 9 | 2 | 2.1 by 1 | 0 |
|
|
| 5 | 0.1.0 | | decision | **Move the writes out.** | 1 | 1 | 4 | 5 | 5 | 2.1 by 1 | 0 |
|
|
|
|
## Details
|
|
|
|
### 1. stale heading
|
|
|
|
Later detail.
|
|
|
|
### 3. Make it fast.
|
|
|
|
Fast detail.
|
|
|
|
## Notes
|
|
|
|
Kept as written.
|
|
"""
|
|
|
|
OLD_SHAPE = """# todo
|
|
|
|
## Scoring
|
|
|
|
`Score = -R - S/4 + 2*A + 2*G*W`
|
|
|
|
`Bar = 9`
|
|
|
|
`Next ID = 6`
|
|
|
|
| Goal | W |
|
|
|---|---|
|
|
| 1 | 1.00 |
|
|
| 2 | 0.67 |
|
|
| 2.1 | 0.33 |
|
|
|
|
## Items
|
|
|
|
| ID | Release | Blocked by | Exempt | Item | R | S | C | A | G | Goals | Score |
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
| 1 | 0.2.0 | | | **Ship the later thing.** | 1 | 1 | 3 | 9 | 9 | 1 | 0 |
|
|
| 2 | 0.1.0 | | | **Tighten the tests.** | 2 | 4 | 3 | 5 | 5 | 2.1 | 0 |
|
|
| 3 | 0.1.0 | | | **Make it fast, `a \\| b`.** | 3 | 8 | 3 | 6 | 8 | 2.1, 1 | 0 |
|
|
| 4 | 0.1.0 | | security | **Rotate the leaked key.** | 9 | 2 | 3 | 1 | 1 | 2.1 | 0 |
|
|
| 5 | 0.1.0 | | decision | **Move the writes out.** | 5 | 5 | 3 | 4 | 5 | 2.1 | 0 |
|
|
|
|
## Details
|
|
|
|
### 1. stale heading
|
|
|
|
Later detail.
|
|
|
|
### 3. Make it fast.
|
|
|
|
Fast detail.
|
|
|
|
## Notes
|
|
|
|
Kept as written.
|
|
"""
|
|
|
|
# A scoring run of the project whose overall mean is {overall}.
|
|
SCORED = "# Comprehension history\n\n## 2026-10-08T12:00:00Z, PR #1 at aaaaaaa\n\n| Seat | Overall |\n|---|---|\n| Mid A | 6 |\n| Mean | {overall} |\n"
|