You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9a904ee
Browse filesBrowse the repository at this point in the historyBrowse files
fix(get-municipality-by-cep): refresh the CEP ranges with the other datasets
CONTRIBUTING.md says the municipality CEP ranges are generated "the same way"
as the other datasets, but scripts/data.ts never ran municipality-cep-ranges.ts,
so the Update datasets workflow never refreshed, linted or formatted its output,
and the data-summary entry for it could never be reached. It now runs after the
other generators, since it is joined against the municipality table cities.ts
rewrites, and its output is in the list the run lints and formats.
The generator also stops reimplementing normalizeMunicipalityName: it loads the
helper through the same extensionless import hook it already registers for the
dataset, so the table is built with exactly the normalization it is read with.
The OTHER_NAMES JSDoc said the variants were recent official renames, citing the
IBGE; most are hyphen and accent spellings of the Correios CEP range mirror, which
is now what it says and cites. The getting-started tables said 5574 ranges; the
table holds 5573.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RLkm9YrtAifc6XCLFVEsdH
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,8 +94,8 @@ release-please turns merged commits into releases.
94
94
95
95
## Datasets
96
96
97
-
The tables under `src/_internals/constants/` fall in two groups, and only the first refreshes
98
-
itself:
97
+
The tables under `src/_internals/constants/` fall in three groups, and only the first two refresh
98
+
themselves:
99
99
100
100
-**Generated from an official source** by a script in `scripts/` (`npm run build:data`, run
101
101
every Monday by the `Update datasets` workflow): banks (Banco Central, `banks.ts`), CBO
@@ -104,7 +104,7 @@ itself:
104
104
`ncm.ts`). When a run changes a file, the workflow opens a pull request whose description, written
105
105
by `scripts/data-summary.ts`, lists per table how many entries were added and removed, with a
106
106
sample of each. Never edit these files by hand.
107
-
-**Generated from a fetchable mirror of an official source**, the same way, but pinned to a
107
+
-**Generated from a fetchable mirror of an official source**, by the same `npm run build:data` run (after the municipalities, which it is joined against), but pinned to a
108
108
specific revision of the mirror because the official source itself cannot be fetched by a
109
109
script: the CEP range of each municipality (Correios "Busca Faixa de CEP", via a community CSV
110
110
mirror of its answers, `municipality-cep-ranges.ts`, writing `src/get-municipality-by-cep/constants.ts`).
0 commit comments