Skip to content

πŸš‚ pyRail v0.4.0: Streamlined and Smarter!

Compare
Choose a tag to compare
@tjorim tjorim released this 28 Jan 00:41
· 8 commits to main since this release
161e295

✨ What's New

  • Improved Documentation & Code Clarity:
    Enhanced the iRail class documentation and refactored code for better readability and maintainability. #45
  • README Updates:
    Improved language selection and session management sections for a better user experience. #42
  • Dependency Updates:
    Bumped ruff from 0.9.2 to 0.9.3 for the latest fixes and improvements. #44

⚠️ Breaking Changes

  1. Data Models:

    • Introduced OccupancyName enum, replacing string types for occupancy names.
    • Updated data structures to replace wrapper classes with direct lists:
      • LiveboardDepartures β†’ list[LiveboardDeparture]
      • LiveboardArrivals β†’ list[LiveboardArrival]
      • ConnectionStops β†’ list[ConnectionStop]
      • CompositionSegments β†’ list[Segment]
      • CompositionUnits β†’ list[Unit]
      • DescriptionLinks β†’ list[DescriptionLink]
  2. Response Structure:

    • Simplified nested responses for easier access:
      • LiveboardApiResponse.departures and arrivals are now optional (None).
      • Removed nested access for lists (e.g., .departure and .arrival).
  3. Type Hint Changes:

    • Modernized type hints throughout the codebase:
      • Dict β†’ dict
      • List β†’ list

Full Changelog: v0.3.0...v0.4.0