Commit Graph

17 Commits

Author SHA1 Message Date
kennethreitz c624c89a54 Add comprehensive utility tests and clean up about page
- Add 87 new tests covering search, books, stories, biographies,
  red letter, helpers, commentary loader, interlinear, cross-references,
  PDF generation, topics, and reading plans modules
- Coverage improved from 75% to 78% (497 tests total)
- Add pytest-cov dependency for coverage reporting
- Remove Strong's Concordance, Study Guides, and Reading Plans
  links from the About page's Explore Further section

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 10:54:56 -05:00
kennethreitz c2a274f47f Suppress FastAPI example/examples deprecation warnings
The warnings are cosmetic - we use 'example' instead of 'examples' because it works better for pre-filling Swagger UI input fields with default values.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:47:12 -05:00
kennethreitz 58b368fdd4 Remove unused biblepy dependency
- biblepy was listed in pyproject.toml but never imported or used
- Project uses custom Bible class in kjv.py instead
- Custom implementation loads from local verses-1769.json file
- Provides better control over caching, parsing, and search
- Updated CLAUDE.md and README.md to reflect custom implementation
- All 268 tests passing without biblepy

Benefits of custom implementation:
- Control over exact KJV edition (1769 Cambridge)
- Custom verse parsing and search logic
- LRU caching for performance optimization
- Pre-processed verse text on load
- No external API dependencies

🤖 Generated with Claude Code
https://claude.com/claude-code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 22:26:19 -05:00
kennethreitz 7522b27e7c Implement Phase 2 performance optimizations
1. Replace regex markdown with mistune library
   - Add mistune>=3.0.2 dependency
   - Replace custom regex patterns with proper markdown parser
   - Better performance and more robust parsing
   - Supports full markdown syntax (bold, italic, strikethrough, etc.)

2. Cache story counts
   - Cache get_story_count() and get_category_count()
   - Expected: 10-20x faster story index page loads
   - Added cache invalidation to refresh_stories()

3. Fix O(n) pattern in helpers.py
   - Replace manual chapter filtering with bible.get_chapters_for_book()
   - Uses existing @lru_cache for instant lookups

Combined expected improvement: 10-20% on story pages, faster markdown

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 12:06:13 -05:00
kennethreitz ffd9e8c187 Add PDF export for stories using WeasyPrint
- Add WeasyPrint dependency and system libs to Docker image
- Create PDF templates for adult and kids stories
- Add /stories/{slug}/pdf and /stories/{slug}/kids/pdf routes
- Add Download PDF button to story pages
- Add stories API endpoints: /api/stories and /api/stories/{slug}
- Gracefully handle missing WeasyPrint system libraries

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 00:26:25 -05:00
kennethreitz d621301b78 Consolidate resource pages into single generic template
- Created resource_index.html as a unified template for all resource pages
- Updated routes to use the generic template with configurable data
- Added link_verses and link_names filters to descriptions for automatic linking
- Added 6 new resources to /resources page (Miracles, I Am Statements,
  Beatitudes, Ten Commandments, Armor of God, Prayers)
- Deleted 6 redundant individual templates (miracles.html, prayers.html,
  beatitudes.html, ten_commandments.html, armor_of_god.html, i_am_statements.html)

This reduces code duplication and ensures consistent verse linking across
all resource pages.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 19:28:30 -05:00
kennethreitz e32bcf00ce Clean up dependencies
- Move pytest, pytest-cov, pytest-xdist to dev dependencies
- Remove redundant jinja2 and uvicorn (included in fastapi[standard])
- Update CI to use --extra dev for test dependencies

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 20:52:28 -05:00
kennethreitz 1e86c719be Use pytest-xdist for parallel test execution
Add pytest-xdist and use -n auto to run tests in parallel within
a single job instead of multiple GitHub Actions runners.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 20:45:35 -05:00
kennethreitz 6994d96f94 Add GitHub Actions CI/CD with automated testing
New workflow: test.yml
- Runs on push to main and all pull requests
- Executes full test suite with pytest
- Generates coverage report
- Includes optional code quality checks

Updated workflow: fly-deploy.yml
- Added test job that runs before deployment
- Deploy only happens if all tests pass
- Prevents deploying broken code to production

Updated dependencies:
- Added pytest-cov for coverage reporting in CI

The test suite (100+ tests) now runs automatically:
- On every push to main
- On every pull request
- Before every deployment to Fly.io

This ensures code quality and prevents regressions.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 13:03:06 -05:00
kennethreitz c753830b8c Revert to Python 3.13
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 19:24:08 -05:00
kennethreitz dfcb2640bb Update to Python 3.14
Update .python-version, pyproject.toml, and Dockerfile to use Python 3.14.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 17:00:39 -05:00
kennethreitz f6c8830bf4 Add GEDCOM file support and family tree parsing
The commit adds support for parsing GEDCOM genealogy files for the biblical
family tree, falling back to hardcoded data if parsing fails.
Add GEDCOM parsing and extended family tree data

This commit adds GEDCOM file parsing capabilities and expands the biblical
family tree implementation to include more comprehensive genealogical data from
Adam to Noah's sons.
2025-05-30 15:16:57 -04:00
kennethreitz d61c0fc5a5 Update Docker container to use FastAPI CLI directly
Remove package installation step and use FastAPI CLI with PYTHONPATH
for simpler container execution. Disable reload in main.py and include
static/templates as package data for proper distribution.
2025-05-26 13:12:08 -04:00
kennethreitz 4db70b5113 Replace pip with uv package manager in Docker build 2025-05-26 13:05:23 -04:00
kennethreitz d6e7d148b6 Update project description and configure packaging
Configure the project as a proper Python package with setuptools
build system and add CLI entry point for the application.
2025-05-26 12:54:18 -04:00
kennethreitz d776f12daf Add HTML templates and FastAPI integration for Bible browsing functionality 2025-04-24 15:13:53 -04:00
kennethreitz 3f20326cca Initialize project structure with .gitignore, Python version, and pyproject.toml 2025-04-24 14:34:20 -04:00