Skip to content

Add Mishnah Entities knowledge base spec adapted to repo conventions - #43

Merged
mig2 merged 7 commits into
masterfrom
claude/repo-review-wdtbtl
Jun 29, 2026
Merged

mig2 merged 7 commits into
masterfrom
claude/repo-review-wdtbtl

Conversation

@mig2

@mig2 mig2 commented Jun 29, 2026

Copy link
Copy Markdown
Owner

No description provided.

claude added 7 commits June 14, 2026 09:22
- 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
@mig2
mig2 merged commit 8971c42 into master Jun 29, 2026
2 checks passed
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.

2 participants