Skip to content

Release 4.4.0: `src` Layout Migration & Integration Tests

Choose a tag to compare

@agude agude released this 19 Jan 00:27
· 74 commits to main since this release

Release Notes:

This release modernizes the repository structure by migrating to the industry-standard src layout, ensuring better isolation between the development environment and installed package. It also introduces a comprehensive end-to-end integration testing suite using golden snapshots to guarantee database consistency across versions.

There are no breaking changes to the CLI or database schema in this release.

What's New

  • src Layout Migration: Moved the package source code into a src/ subdirectory. This prevents common "double import" errors where tests run against the local directory instead of the installed package, and aligns the project with modern Python packaging standards (supported natively by uv and hatch).

  • Golden Snapshot Integration Tests: Added a new end-to-end integration test suite (tests/test_integration.py) that converts raw CSV data to SQLite and verifies the result against a golden_snapshot.json. This ensures that changes to parsers or converters do not silently alter the resulting database structure or content.

  • Test Data Extraction Tools: Added scripts/extract_test_rows.py, a utility that analyzes massive SWITRS datasets to greedily select a small subset of rows that maximize coverage of all internal value mappings (enums). This allows for high-coverage testing with minimal file size.

  • Type Hinting Improvements: Updated strict type checking configurations in mypy and added explicit return type annotations (-> None) to the test suite.