Fix Greek reading boundaries and add the weekday Menaion readings 2026 Issue #228 - #236
dgrahamlong wants to merge 1 commit into
Conversation
|
@dgrahamlong, sorry I failed to notice your PR. I'll try to review it in the next week or two. |
…6 hid Greek readings against goarch.org: 2024 89.5% -> 98.7%, 2025 90.3% -> 99.4%, 2026 92.9% -> 100%. Slavic output is unchanged. - 62 pericope boundaries where goarch.org and antiochian.org agree and orthocal split the passage differently. Rows are keyed by the citation they replace and carry the years each source corroborates them, and the loader stops rather than overwrite a row it does not recognise. - 11 weekday saints' readings that a 2026-only audit could not see, because each date falls on a Sunday in 2026. - Weekday cycle rows are stored twice, once per Paschal year; overrides now apply to both copies. - Chapterless books took an explicit chapter as the first verse, so "Jude 1:11-25" returned all 25 verses. - A golden-file test characterizes every harvested antiochian.org reading (2018-2026) by verse set, so a fix for one year that breaks another shows up as a diff naming the date.
0f984b7 to
f053fed
Compare
brianglass
left a comment
There was a problem hiding this comment.
Thanks for this. It's a careful piece of work, and the verse-set golden file across 2018-2026 is a great safety net. I checked the shadowing, the double-stored weekday cycle rows, the Jude 1:11-25 fix and the new antiochian.org title parsing, and they all look right. The two comments inline are about reproducing the data from the loader scripts, not about the readings themselves.
🤖 Review prepared with Claude Code
| 'Luke 10:38-42, 11:27-28 in every year from 2022 through 2026, which ' | ||
| 'goarch.org corroborates for 2026. Taking the later, stable value'), | ||
| (5, 7, 'Epistle', 'Acts 26.1-5, 12-20', 'Appearance of the Cross over Jerusalem', | ||
| (5, 7, 'Epistle', 'Acts 26.1, 12-20', 'Appearance of the Cross over Jerusalem', |
There was a problem hiding this comment.
This row (and the new (9, 12) Autonomos row asking for 'John 11.47-54') now looks up a pericope that doesn't exist on main. Only load_exact_boundaries.py creates Acts 26.1, 12-20 and John 11.47-54. So running this script against a pre-PR database raises Pericope.DoesNotExist from Pericope.objects.get(sdisplay=...) (line 106) at the May 7 row, before any of the new weekday-Menaion rows are written. And because the loop isn't in a transaction, the rows before it stay applied.
Could you either document the run order (README and docstring: load_exact_boundaries.py first), or have this script create any missing pericope the way exact_pericope() does? Wrapping the loop in transaction.atomic() would also stop a failed run from leaving the database half-updated.
|
|
||
| def exact_pericope(base, title): | ||
| display, sdisplay = normalized_displays(title) | ||
| if found := Pericope.objects.filter(sdisplay=sdisplay).first(): |
There was a problem hiding this comment.
exact_pericope() reuses any existing pericope with the same sdisplay, but the committed fixtures/calendarium.json has two grk pericopes that duplicate existing ones:
- pk 1064 (
311grk, Matthew,Matt 16.13-19) duplicates pk 72 - pk 1017 (
312grk, Matthew,Matt 27.62-66) duplicates pk 124
Both are new in this PR (main stops at pk 1013). So the fixture isn't what this script produces: rerunning it against the committed fixture would point Reading 1814 (Holy Friday) and the new 9/13 Gospel at pk 124 and pk 72, and orphan the two grk copies. That contradicts the "a second run changes nothing" promise in the docstring. Could you regenerate the fixture from the script, or repoint those readings at pk 72/124 and drop the duplicates?
Fix Greek reading boundaries and add the weekday Menaion readings 2026 hid
Problem
Comparing orthocal's Greek tradition with goarch.org and antiochian.org for 2026 showed 45 Epistle and Gospel fields on 44 dates where the passage was split differently: the same opening verse, a different closing one (e.g.
Acts 15:5-34where both sources printActs 15:5-12). Extending the comparison to other years showed the same pattern across the cycle, plus a second class of misses that 2026 could not reveal.What this does
Pericope boundaries. 62 readings where goarch.org and antiochian.org agree with each other and orthocal split the passage differently. Each gets a
greek-tagged row in the same slot, so thecommonrow still serves Slavic callers.tools/greek/load_exact_boundaries.pyholds the table; every row names the citation it replaces and the years each source corroborates it, and the loader stops if a slot no longer reads what the row expects instead of overwriting it.Weekday Menaion readings. Feb 15, Aug 2, Aug 9, Aug 16, Sep 6, Sep 12, Sep 20, Oct 11, Nov 22 and Dec 20 all fall on a Sunday in 2026, so the Sunday readings masked eleven saints' readings orthocal never carried for Greek use (Philemon for Onesimus and Philemon, Ignatius on Dec 20, the relics of Stephen, Matthias, the Holy Image, the Miracle at Colossae, Autonomos, Eustathius, Philip the Deacon). Added to
tools/greek/load_shared_menaion.pyin its existing format; all eleven pericopes already existed. The Feb 15 Philemon also explains the two "stale" Philemon years in the Prodigal Son Saturday note indocs/greek-commons.md: those were Feb 15 landing on that Saturday.Two bugs found along the way.
Verse.objects.lookup_referencetook an explicit chapter on a chapterless book as the first verse, soJude 1:11-25returned all 25 verses.Testing.
calendarium/tests/data/antiochian-readings.tsvcharacterizes every harvested antiochian.org reading from 2018 to 2026 (3,095 lines) as exact, boundary, different or unresolved, comparing verse sets rather than strings soGal 5:22-26; 6:1-2andGal 5.22-6.2count as equal. The test regenerates the lines and fails with a diff naming the date, so a fix for one year that breaks another is visible.tools/greek/antiochian_characterize.py --writeregenerates the file. The 45 fields from the original report are also asserted directly.The comparison parser in
ingest_antiochian.pynow reads the remaining antiochian.org title shapes (ST. JAMES' UNIVERSAL LETTER,ST. PAUL TO THE HEBREWS, a bare range after;), which had been scoring orthocal as wrong on days it was right.Results
Greek readings against goarch.org, by verse set:
Antiochian.org golden file, 2018-2026: exact 3029, different 63, boundary 2, unresolved 1. "Different" includes days the two sources disagree with each other, so it cannot reach zero.
Slavic output on every affected date is byte-for-byte unchanged (checked 2024-2027 and 2031). Greek fasting was audited at the same time and needs nothing: 99.7-100% per year against goarch.org, and the residual days are ones
docs/fasting-refactor-scope.mdalready declines to change.Left alone
Verification
Full suite passes (204 tests). Both loaders re-run as no-ops on the resulting fixture, and loading the boundary table from
mainproduces the same rows as the previous version did.