11 Commits

Author SHA1 Message Date
kennethreitz 6a2212d078 Restore validate_data.py script
Accidentally deleted in previous cleanup. Required by test_data_validation.py.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 10:49:47 -05:00
kennethreitz 818c702ef0 Clean up scripts 2025-12-09 10:26:20 -05:00
kennethreitz dab9706743 Expand featured verses to 365 with daily devotionals
- Add 365 verses organized by monthly themes:
  - January: New Beginnings
  - February: Love
  - March: Growth/Spiritual Disciplines
  - April: Resurrection/Hope
  - May: Guidance
  - June: Faith/Trust
  - July: Freedom
  - August: Provision
  - September: Wisdom
  - October: Spiritual Warfare/Protection
  - November: Gratitude
  - December: Advent/Joy

- Each verse includes devotional with title, theme, opening,
  meditation, application, and prayer

- Update validation schema to include Devotional model with
  proper field validation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 14:17:58 -05:00
kennethreitz 34b7e16bea Fix poetry loader and validation for "all" chapters
- Add pytest-xdist to dev dependencies for parallel test execution
- Handle "all" string value in is_poetry_chapter() for fully poetic books
- Update PoetryBookData model to accept "all" or list of ints
- Expand valid poetry books list to include all Bible books with poetic sections

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 20:25:03 -05:00
kennethreitz c28376e761 Add Pydantic schema for poetry_formatting.json
Validates:
- books dict contains only valid poetry books
- poetry_chapters are sorted and unique
- stanza_breaks have valid chapter keys with sorted verse lists

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 14:44:47 -05:00
kennethreitz 2d7e9843b0 updates to data storage 2025-11-30 21:26:59 -05:00
kennethreitz 79f5ea890a Fix verse commentary validation and field names
- Update Pydantic model to match nested JSON structure (Book → Chapter → Verse)
- Rename field: historical_context → historical (11,950 entries)
- Remove unused application field
- Update VerseCommentary schema with nested VersesDict and ChaptersDict
- All 18 data validation tests now passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:08:03 -05:00
kennethreitz f46f51b8f4 Fix red letter verses and add validation
- Fix 98 verses with narrative introductions (e.g., 'And he said unto them')
  Only the spoken words of Jesus are now marked, not narrative text
- Add JSON Schema for red_letter_verses.json validation
- Add RedLetterVerses Pydantic model to validate_data.py
- Add test_red_letter_verses_structure test
- Update data directory README with red letter section

Changes ensure accurate red letter edition rendering where only
Jesus' actual words appear in red, not narrative introductions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 15:26:03 -05:00
kennethreitz 54e3b932d4 Fix verse commentary validator to allow apostrophes and verse ranges
Updated the VerseCommentary validation regex pattern to support:
- Apostrophes in book names (e.g., "Solomon's Song")
- Verse ranges (e.g., "Genesis 1:4-5")

This brings the validator in line with other validators in the codebase
and fixes failing data validation tests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 14:48:32 -05:00
kennethreitz c226c4bbbf Add JSON schema validation for 66 book introduction files
This commit adds comprehensive validation for all book introduction files
in data/books/ using Pydantic models and JSON Schema.

Changes:
- Added BookIntroduction Pydantic model with nested models:
  - OutlineSection: Validates book outline sections
  - KeyTheme: Validates key themes with descriptions
  - KeyVerse: Validates key verses with references and text
- Added validate_all_books() function to validate all 66 book files
- Added validate_book_file() helper function
- Added --books CLI flag to validate book files separately
- Generated book_introduction.schema.json JSON Schema file
- Fixed KeyVerse model field name from 'verse' to 'reference'
- Added 4 new tests to validate book directory and all 66 books

All 66 book files now validate successfully against the schema.
Test suite updated: 268 tests passing (added 4 book validation tests).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 18:42:20 -05:00
kennethreitz 8a03d22b9a Add JSON schema validation with Pydantic
- Add Pydantic models for all 6 main data files:
  - bible_metadata.json
  - word_studies.json
  - study_guides.json
  - verse_commentary.json
  - featured_verses.json
  - resource_slugs.json

- Add BookIntroduction schema for book JSON files

- Create scripts/validate_data.py:
  - Validates JSON data using Pydantic models
  - Can generate JSON schemas from Pydantic models
  - CLI with --verbose and --generate-schemas flags

- Add test suite (tests/test_data_validation.py):
  - 12 tests validating data file structure
  - Parametrized tests for all data files
  - Integrated into existing test suite

All validation tests pass. JSON schemas auto-generated from Pydantic models.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 18:34:44 -05:00