Answer prose round 1: say NANPA may assign the codes, spell the test's exchange in full, and file the record paragraph's split

This commit is contained in:
2026-10-04 17:46:48 +02:00
committed by Lillem4n
parent 965d671707
commit 1af5abf762
4 changed files with 15 additions and 10 deletions
+3 -3
View File
@@ -90,9 +90,9 @@ replacement, and each removed path, column or flag.
and carries the same three. `person.prefix` is null where a person has no title, and carries the same three. `person.prefix` is null where a person has no title,
where it used to be an empty string, so `--format sql` writes `NULL` and a `string` where it used to be an empty string, so `--format sql` writes `NULL` and a `string`
struct field reading it becomes `*string`. struct field reading it becomes `*string`.
- `en_US.phone-exchange` draws the three digits after a US area code, as NANPA assigns - `en_US.phone-exchange` draws the three digits after a US area code from the codes
them: `200` to `999`, never `211` to `911` ending in `11`, nor `555`, `950`, `958`, NANPA may assign: `200` to `999`, except `211`, `311` … `911`, `555`, `950`, `958`,
`959` or `976`. `en_US.phone` draws its `exchange` from it. `959` and `976`. `en_US.phone` draws its `exchange` from it.
- `ErrNoColumns` is exported, so a caller can tell the one record fence a path can - `ErrNoColumns` is exported, so a caller can tell the one record fence a path can
answer from the rest. answer from the rest.
- An error names a spelling that runs: a layout is named single-quoted and free of - An error names a spelling that runs: a layout is named single-quoted and free of
+1 -1
View File
@@ -5,7 +5,7 @@ from pathlib import Path
def write(path, columns, rows): def write(path, columns, rows):
"""Write the rows as a TSV; the table needs two rows, and every cell is stripped, and must be non-empty and free of tabs, newlines and braces.""" """Write the rows as a TSV of at least two rows, each cell stripped, non-empty and free of tabs, newlines and braces."""
lines = ["\t".join(columns)] lines = ["\t".join(columns)]
for row in rows: for row in rows:
cells = [str(row[c]).strip() for c in columns] cells = [str(row[c]).strip() for c in columns]
+2 -2
View File
@@ -341,8 +341,8 @@ func TestShippedUSPhone(t *testing.T) {
if m == nil { if m == nil {
t.Fatalf("phone %q does not match %s", n, re) t.Fatalf("phone %q does not match %s", n, re)
} }
if exch := m[1]; exch[1:] == "11" || unassignable[exch] { if exchange := m[1]; exchange[1:] == "11" || unassignable[exchange] {
t.Fatalf("phone %q has the unassignable exchange %s", n, exch) t.Fatalf("phone %q has the unassignable exchange %s", n, exchange)
} }
} }
} }
+9 -4
View File
@@ -6,7 +6,7 @@
`Bar = 9` `Bar = 9`
`Next ID = 87` `Next ID = 88`
| Goal | W | | Goal | W |
|---|---| |---|---|
@@ -65,6 +65,7 @@
| 26 | 0.1.0 | defect | **Give a `sv_SE.personnummer` over 100 the `+` separator Skatteverket spells, or stop drawing birthdates that reach 100.** | 2 | 2 | 5 | 8 | 4 | 21.1 | | 26 | 0.1.0 | defect | **Give a `sv_SE.personnummer` over 100 the `+` separator Skatteverket spells, or stop drawing birthdates that reach 100.** | 2 | 2 | 5 | 8 | 4 | 21.1 |
| 34 | 0.1.0 | | **Add `{isin()}`, `{cusip()}`, `{aba()}` and `{vin()}`.** | 2 | 4 | 6 | 7 | 4 | 20.9 | | 34 | 0.1.0 | | **Add `{isin()}`, `{cusip()}`, `{aba()}` and `{vin()}`.** | 2 | 4 | 6 | 7 | 4 | 20.9 |
| 5 | 0.1.0 | | **Run the nine-seat comprehension panel after the draw restructure, and file what it names.** | 1 | 3 | 3 | 9 | 3 | 20.4 | | 5 | 0.1.0 | | **Run the nine-seat comprehension panel after the draw restructure, and file what it names.** | 1 | 3 | 3 | 9 | 3 | 20.4 |
| 87 | 0.1.0 | | **Split the README's record paragraph into one paragraph per rule, and name the shapes and the hold it refers to.** | 1 | 2 | 4 | 6 | 3, 11.3 | 17.3 |
| 71 | 0.1.0 | | **Accept a name as a `calc` operand, so `{calc(n * 2)}` computes from the pick `{n}` prints.** | 3 | 4 | 5 | 7 | 5.3 | 17.2 | | 71 | 0.1.0 | | **Accept a name as a `calc` operand, so `{calc(n * 2)}` computes from the pick `{n}` prints.** | 3 | 4 | 5 | 7 | 5.3 | 17.2 |
| 79 | 0.1.0 | decision | **Beside a `--data-path`, load in `New` the user's categories, the shipped ones they override or read, and the shipped ones whose reads reach an overridden one; load the rest on first reach.** | 6 | 6 | 7 | 8 | 12 | 13.7 | | 79 | 0.1.0 | decision | **Beside a `--data-path`, load in `New` the user's categories, the shipped ones they override or read, and the shipped ones whose reads reach an overridden one; load the rest on first reach.** | 6 | 6 | 7 | 8 | 12 | 13.7 |
| 58 | 0.2.0 | | **Ship prebuilt binaries, a container image, and packages for Homebrew, Scoop and the biggest Linux package managers, so the CLI needs no Go.** | 3 | 7 | 8 | 9 | 1.1, 7 | 29.2 | | 58 | 0.2.0 | | **Ship prebuilt binaries, a container image, and packages for Homebrew, Scoop and the biggest Linux package managers, so the CLI needs no Go.** | 3 | 7 | 8 | 9 | 1.1, 7 | 29.2 |
@@ -108,7 +109,7 @@
| 30 | 0.3.0 | | **Draw `email.local` from `username`, so the two share one handle list.** | 2 | 2 | 3 | 5 | 5.7 | 11.5 | | 30 | 0.3.0 | | **Draw `email.local` from `username`, so the two share one handle list.** | 2 | 2 | 3 | 5 | 5.7 | 11.5 |
| 40 | 0.3.0 | | **Parse `defaultTable`'s path with the library's grammar.** | 2 | 2 | 3 | 5 | 5.7 | 11.5 | | 40 | 0.3.0 | | **Parse `defaultTable`'s path with the library's grammar.** | 2 | 2 | 3 | 5 | 5.7 | 11.5 |
| 75 | 0.3.0 | | **Run every README `sh`, `go` and `text` example as a test, and compare each "Renders" line to a seeded render.** | 2 | 6 | 4 | 7 | 11.2 | 11.5 | | 75 | 0.3.0 | | **Run every README `sh`, `go` and `text` example as a test, and compare each "Renders" line to a seeded render.** | 2 | 6 | 4 | 7 | 11.2 | 11.5 |
| 86 | 0.3.0 | | **Read `en_US.phone`'s area codes from one category, as its exchange reads `en_US.phone-exchange`.** | 1 | 2 | 2 | 5 | 3.2 | 11.5 | | 86 | 0.3.0 | | **Read both `en_US.phone` formats' area codes from one category, as their exchange reads `en_US.phone-exchange`.** | 1 | 2 | 2 | 5 | 3.2 | 11.5 |
| 33 | 0.3.0 | | **Group `data/misc` into folders where a group name makes a path easier to guess.** | 4 | 5 | 4 | 5 | 5 | 10.8 | | 33 | 0.3.0 | | **Group `data/misc` into folders where a group name makes a path easier to guess.** | 4 | 5 | 4 | 5 | 5 | 10.8 |
| 47 | 0.3.0 | defect | **Refuse a category naming a hidden rows file, `"rows": ".x.tsv"`, as a rows file that is not there.** | 1 | 1 | 2 | 5 | 6 | 10.2 | | 47 | 0.3.0 | defect | **Refuse a category naming a hidden rows file, `"rows": ".x.tsv"`, as a rows file that is not there.** | 1 | 1 | 2 | 5 | 6 | 10.2 |
| 72 | 0.3.0 | principle | **Fail the merge gate when test coverage falls below the last recorded figure.** | 2 | 3 | 2 | 5 | 3 | 10.2 | | 72 | 0.3.0 | principle | **Fail the merge gate when test coverage falls below the last recorded figure.** | 2 | 3 | 2 | 5 | 3 | 10.2 |
@@ -171,7 +172,7 @@ Shape: T = table, t = template, c = choice.
|---|---|---|---| |---|---|---|---|
| `ein` valid ranges | t | IRS | facts | | `ein` valid ranges | t | IRS | facts |
| `company` names, suffix, `naics` | t+T | SEC tickers for patterns, NAICS 2022 | public domain | | `company` names, suffix, `naics` | t+T | SEC tickers for patterns, NAICS 2022 | public domain |
| `phone` NANP with valid NPA/NXX | t | NANPA rules | facts | | `phone` NANP with valid NPA (the NXX ships as `en_US.phone-exchange`) | t | NANPA rules | facts |
| `routing` ABA with check, `bankaccount` | t | Fed prefix ranges | facts | | `routing` ABA with check, `bankaccount` | t | Fed prefix ranges | facts |
| `licenseplate` per state | T | hand-authored patterns | facts | | `licenseplate` per state | T | hand-authored patterns | facts |
| `car` make, model | T | NHTSA vPIC | public domain | | `car` make, model | T | NHTSA vPIC | public domain |
@@ -241,6 +242,10 @@ The format hard-codes `-`, and the 1930 floor makes the oldest draws invalid fro
Needs item 4. Needs item 4.
### 87. Split the README's record paragraph into one paragraph per rule, and name the shapes and the hold it refers to.
Needs item 4, which rewrites the draw-group rule this paragraph states. The paragraph under Records, from "The columns are the point" to "Correlated fields", holds six rules, so "put a value two fields share in its own category" is hard to find. "Renders as either shape" names no shape nearby, and "a field hold" is no term the README defines.
### 71. Accept a name as a `calc` operand, so `{calc(n * 2)}` computes from the pick `{n}` prints. ### 71. Accept a name as a `calc` operand, so `{calc(n * 2)}` computes from the pick `{n}` prints.
`checkCalc` and the value proof read an operand as a sibling field, so `{calc(n * 2)}` is refused with `no field "n"` today. Item 4 stops an operand holding its field for the expansion, after which a name is the one way to show the operand a calc computes from, as the README's Computation example does. `checkCalc` and the value proof read an operand as a sibling field, so `{calc(n * 2)}` is refused with `no field "n"` today. Item 4 stops an operand holding its field for the expansion, after which a name is the one way to show the operand a calc computes from, as the README's Computation example does.
@@ -390,7 +395,7 @@ The CLI counts brackets of its own, so a change to the selector grammar desyncs
`readme_test.go` loads and renders each `json` block, but runs no `sh` example (CLI, Records, Table, Linked tables), no `go` example (Library) and no `text` block of error text, and compares no "Renders e.g." output, so goal 11.2 is not met. `readme_test.go` loads and renders each `json` block, but runs no `sh` example (CLI, Records, Table, Linked tables), no `go` example (Library) and no `text` block of error text, and compares no "Renders e.g." output, so goal 11.2 is not met.
### 86. Read `en_US.phone`'s area codes from one category, as its exchange reads `en_US.phone-exchange`. ### 86. Read both `en_US.phone` formats' area codes from one category, as their exchange reads `en_US.phone-exchange`.
Both phone formats carry the same 21-code `area` list, so an edit to one copy can miss the other. Both phone formats carry the same 21-code `area` list, so an edit to one copy can miss the other.