Skip to content

Name a genre once when two sources attest it - #381

Open
davidfdriscoll wants to merge 1 commit into
masterfrom
daviddriscoll-codaio/duplicate-genre
Open

davidfdriscoll wants to merge 1 commit into
masterfrom
daviddriscoll-codaio/duplicate-genre

Conversation

@davidfdriscoll

Copy link
Copy Markdown
Collaborator

genres.csv is one row per citation, not per genre, so a poet attested in the same genre by two sources has two rows. createGenreString() joined the names straight off the rows, so such a poet would be described as:

Genres: Dithyramb, Dithyramb

and the count choosing between "Genre" and "Genres" counted rows rather than names. The line names the genres a poet worked in and shows none of the citations behind them, so a name repeated is only ever a repetition.

No poet triggers this today

The only pair the data has ever had was Kinesias 14 against Cinesias 4, and #364 archived the Kinesias row rather than merging it, so the two Dithyramb citations stayed apart.

Worth fixing anyway. Adding a second source for a genre a poet already has is an ordinary editorial act — the file is organised to invite it — and the failure would be silent, in the poet's own popup, with nothing to catch it.

The tests build the case rather than find it

By doubling one poet's entry in genresByPoetId and rendering through createDetailedListOfPoets(), which needs no change to the module surface. The first fails without the fix; the second holds the other side, that distinct genres are all still named and still pluralised.

Also: a comment #356 made false

The BUG: test for the eighteen incomplete citations still said renderReference() prints (trans. ) for them. It stopped doing that in #356. The note now records what the eighteen actually are — seventeen Pindar titles that are meant to carry no translator per the December 2015 corrections, and Stesandros at Ath. 14.638b, which is a real omission — and why the count is still worth pinning now that it is invisible on the page. See #378.

check result
npm test 129 pass
npm run lint clean
npm run format:check clean
npm run typecheck clean
npm run test:browser 28 pass

🤖 Generated with Claude Code

genres.csv is one row per citation, not per genre, so a poet attested in the
same genre by two sources has two rows. createGenreString() joined the names
straight off the rows, so such a poet would be described as

    Genres: Dithyramb, Dithyramb

and the count that chooses between "Genre" and "Genres" counted rows rather than
names. The line names the genres a poet worked in and shows none of the
citations behind them, so a name repeated is only ever a repetition.

No poet triggers this today. The only pair the data has ever had was Kinesias 14
against Cinesias 4, and #364 archived the Kinesias row rather than merging it,
so the two Dithyramb citations stayed apart. This is worth fixing anyway,
because adding a second source for a genre a poet already has is an ordinary
editorial act -- the file is organised to invite it -- and the failure would be
silent and in the poet's own popup.

The tests build the case rather than find it, by doubling one poet's entry in
genresByPoetId and rendering through createDetailedListOfPoets. The first fails
without the change; the second holds the other side, that distinct genres are
all still named and still pluralised.

Also corrects a comment that #356 made false. The BUG test for the eighteen
incomplete citations still said renderReference() prints `(trans. )` for them.
It stopped doing that in #356, which is why the note now records what the
eighteen are -- seventeen Pindar titles that are meant to carry no translator,
and Stesandros at Ath. 14.638b, which is a real omission -- and why the count is
still worth pinning now that it is invisible on the page.

npm test (129 pass), lint, format:check, typecheck and test:browser (28 pass)
are clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant