refactor: rename similar → nearby, so the code says what the section does
The section ranks on distance and is headed "Other schools nearby", but every identifier still called it "similar" — the exact drift that leaves a later reader trusting a name over the behaviour. Mechanical: files, the module, the payload key, the type, the components, the prop. No behaviour change; the suites are unchanged in count and still green. Free to do now because #150 has not merged, so the payload key rename needs no lockstep deploy. Uses of "similar" that are ordinary English — progress measures compared to similar pupils, and unrelated comments — are untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
179b6fec94
commit
b650df8d93
15 files changed
+102
-102
No files matched your search
@@ -73,12 +73,12 @@ There is no SWR dependency. Leaflet maps are loaded through dynamic wrappers;
|
||||
Chart.js renders performance and comparison charts.
|
||||
|
||||
`components/school/` contains detail sections, with section decisions and data
|
||||
preparation in `lib/schoolSections.ts`. The similar-schools section is selected
|
||||
in `backend/similar_schools.py` — hard filters that never relax (phase,
|
||||
provision, selectivity, gender) and soft preferences that do (religious
|
||||
character, then gender exactness) — and served on `/api/schools/{urn}`. Its
|
||||
rules are presentation logic, deliberately kept out of `marts.*` so they can be
|
||||
tuned by deploy rather than by pipeline run. `lib/types.ts` contains manually maintained
|
||||
preparation in `lib/schoolSections.ts`. The nearby-schools section is selected in
|
||||
`backend/nearby_schools.py` — hard filters decide eligibility (phase, provision,
|
||||
selectivity, gender) and distance alone decides the order, capped per phase —
|
||||
and served on `/api/schools/{urn}`. Its rules are presentation logic,
|
||||
deliberately kept out of `marts.*` so they can be tuned by deploy rather than by
|
||||
pipeline run. `lib/types.ts` contains manually maintained
|
||||
API types. `payload-types.ts` and the Payload import map are generated artifacts.
|
||||
|
||||
## Publication and caching today
|
||||
|
||||
Reference in new issue
Block a user