fix(salary): print the privacy footnote only when a row rendered N/A* (#475)

format_entry appended "* N/A = Too few employees to publish (privacy)"
under every category table, including one where every row has an index,
so the output asserted a suppression that never happened - the residual
noted on #470. Set a flag in the N/A* branch and print the footnote only
when it fired; a table with a suppressed row renders exactly as before.

Two FormatEntryTests cases pin both directions; the "omitted" case fails
on master.
This commit is contained in:
Ayobami Adegoke
2026-09-16 21:06:23 +02:00
committed by GitHub
parent 968fb1bd7e
commit b91c6125ec
3 changed files with 47 additions and 1 deletions
+7
View File
@@ -62,6 +62,13 @@ per-file diff commands.
### Fixed
- **`salary_lookup.py` prints the privacy footnote only when a row actually carries `N/A*`**
- the `* N/A = Too few employees to publish (privacy)` line was appended under every
category table, including one where every row has an index, so the output asserted a
suppression that never happened (the residual noted on #470). The footnote now follows a
flag set by the `N/A*` branch; a table with a suppressed row renders exactly as before.
Two `FormatEntryTests` cases pin both directions; the "omitted" one fails on master.
- **`convert_salary_excel.py` pairs a bare `Count`/`Index` column pair instead of
splitting it, so `salary_lookup.py` no longer labels a published headcount as
privacy-suppressed** - the pairing loop required a non-empty derived category name on