Skip to content

v0.3.0

Choose a tag to compare

@DavidMStraub DavidMStraub released this 07 Jun 11:26
· 7 commits to main since this release
e490053

Major Features & Changes

  • Completely refactored type casting:
    • Introduced a new gedcom7.cast module for robustly casting string values to appropriate data types, including support for booleans, integers, lists, personal names, dates, times, media types, and more.
    • The parser now attaches a typed .value attribute to each GedcomStructure, making downstream data handling easier and less error-prone.
  • Rewritten core data types:
    • Switched from custom class-based data types to Python @dataclass types in gedcom7.types, simplifying usages and improving typing.
    • Simplified and modernized the type system with clear type aliases and unions.
  • Parser improvements:
    • The main parsing routine (gedcom7.parser.loads) now uses the new type casting, returning trees with typed values.
  • Utility additions:
    • Added gedcom7.util module with utility functions to:
      • Convert GEDCOM dates/times to Python datetime.date and datetime.time objects.
      • Retrieve children by tag from a GedcomStructure.

Standards & Compatibility

  • Updated to latest GEDCOM 7 specification:
    • Grammar and constants (gedcom7.grammar, gedcom7.const) updated for full compliance.
    • Added month constants for easier date handling.
  • Expanded Python support:
    • CI now tests on Python 3.9, 3.10, 3.11, 3.12, and 3.13.
    • Added static type checking (mypy) to the CI.

Testing

  • Extensive new tests:
    • Added test/test_cast.py for comprehensive coverage of the new type casting logic.
    • Added test/test_util.py for utility function tests.
    • Removed legacy tests for old type classes.

Other

  • Project URLs and metadata:
    • Added project URL to setup.cfg.
  • Miscellaneous:
    • Various grammar and code cleanups for maintainability.

PS: Yes, these release notes are AI-generated 😊