4 Commits

Author SHA1 Message Date
5860b3d25c Improve code quality across the codebase
- Add comprehensive type hints to MyTimeline.py methods
  - Add type hints to __init__, change_db, and tooltip formatting methods
  - Use Any for Gramps-specific types that aren't easily importable

- Refactor generate_demo_family.py to use ElementTree
  - Replace string concatenation with xml.etree.ElementTree for proper XML generation
  - Add compatibility handling for Python < 3.9 (ET.indent)
  - Add EventData, PersonData, and FamilyData dataclasses for better structure
  - Add comprehensive type hints to all functions

- Extract magic numbers to named constants
  - Add constants for UI dimensions, timeline heights, dialog sizes
  - Add constants for date calculations and genealogical year ranges
  - Improve code readability and maintainability

- Refactor duplicated code in filter dialog handlers
  - Extract common checkbox handler logic into reusable methods
  - Create _make_group_toggle_handler and _make_child_toggle_handler
  - Eliminate code duplication between event type and family filters

- Improve shell scripts with better error handling
  - Add validation for Gramps installation
  - Improve error messages with actionable troubleshooting steps
  - Use set -euo pipefail for better error detection
  - Add better user guidance in error scenarios
2025-11-29 22:49:16 +01:00
0abe20849c Fix demo family generation: add diverse events and fix missing event references
- Added 12 different event types (Baptism, Education, Occupation, etc.)
- Fixed missing event references by storing and reusing original events
- Made event generation deterministic with random seed
- Updated gen_person to return both XML and tuple format for event reuse
- All event references now properly defined and validated
- Demo family now includes 240+ additional events for comprehensive testing
2025-11-28 23:19:09 +01:00
b3488a29e8 Fix bidirectional family references in demo family generator
- Add parentin references for fathers and mothers
- Add childof references for children
- Regenerate person XMLs with correct family relationships
- Fixes import errors about missing bidirectional references
2025-11-28 22:14:03 +01:00
da620972a6 Add huge demo family for testing MyTimeline plugin
- Add generate_demo_family.py script to generate demo data
- Add demo_family.gramps with large family tree:
  * 2 parents (John and Mary Smith)
  * 15 children
  * 5 spouses
  * ~20 grandchildren
  * Multiple families with marriage events
  * Birth and death events for all members
- Perfect for testing the MyTimeline plugin with real data
2025-11-28 22:09:31 +01:00