Add Mishnah Entities knowledge base spec adapted to repo conventions - #43
Merged
Merged
Conversation
- entities/schema: claim, source, person, place, plant JSON Schemas - entities/data: sources.yaml, vocab (sedarim/generations/halachic/regions), and three validating exemplars (akiva, tzippori, chitah) - scripts/kb-validate.py: JSON Schema + semantic cross-checks (source existence, canonical appearance slugs, filename<->slug) - pre-commit hook + GitHub Actions CI; gitignore derived knowledge.db/conflicts.log
- Flattened tables: source, entity, claim, appearance, external_id (claim extras like candidate ids preserved in extra_json; mishnah refs parsed to masechet slug) - Derived tables built at compile time: contemporaries, cooccurrence, region_rollup - Deterministic & idempotent: rebuilt from scratch, byte-identical across runs - knowledge.db stays gitignored (derived artifact)
- scripts/kb_lib.py: comment-preserving (ruamel) round-trip + §8 merge rules (additive/idempotent upserts, confirmed-protection -> conflicts.log, appearance dedupe, single vs multi-valued claim modes) - scripts/kb-import-wikidata.py: enrich people/places/plants (plants via --qid, since the taxon QID lives on the candidate); fetch or --input - scripts/kb-import-pleiades.py: place coordinate claims; fetch or --input - scripts/kb-selftest.py: offline assertions of the merge-rule invariants - entities/fixtures/: API-shaped JSON so the full pipeline runs offline - CI now runs validate + selftest + build; requirements add ruamel.yaml
70 stdlib-unittest tests under tests/, one module per deliverable: D1-2 schemas (27) · D3 registries/vocab (9) · D4 validator (5) D5 exemplars (4) · D6 build (10) · D7 engine+importers (15) Each module is independently runnable; CI runs the full suite.
- scripts/kb-render.py: renders entities/site/ from the YAML source of truth
(index + who's-who + places map + flora gallery + one page per entity)
- house-style self-contained HTML; contested candidates/coordinates stay
visible; appearances deep-link into masechot/{slug}.html#mishna-N-M
- reads YAML (full fidelity) not the lossy query DB; reconciled display spec §4
- tests/test_render.py (7); entities/site/ gitignored
- 77 tests total green
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.