Skip to content

v2.0.3

Choose a tag to compare

@devinslick devinslick released this 06 Nov 19:14
· 48 commits to main since this release
Immutable release. Only release title and notes can be modified.

🎯 Highlights

  • Test coverage increased from 81% to 98% with comprehensive unit tests
  • Pre-commit hooks for local code quality enforcement
  • Improved CI/CD workflows to prevent publish conflicts

✨ Testing Improvements

  • Added 45+ new unit tests covering edge cases and error handling paths in client.py and device.py
  • Comprehensive coverage of:
    • Authentication flows and password hashing
    • Connection error retry logic with backoff/jitter
    • HTTP 429/5xx retry handling with Retry-After header parsing
    • JSON parsing fallbacks and error handling
    • Export data ZIP generation with picture format detection
    • Device photo download and history decryption error paths
    • Stream response handling

πŸ”§ Developer Experience

  • Pre-commit hooks configured with:
    • flake8 for linting (catch CI errors locally!)
    • black for code formatting
    • mypy for type checking
    • File cleanup (trailing whitespace, line endings, etc.)
  • Setup: pip install -e ".[dev]" then python -m pre_commit install

πŸš€ CI/CD Enhancements

  • Simplified publish workflow: Only publishes to PyPI from main branch or GitHub releases
  • Manual TestPyPI workflow: New workflow for controlled pre-release testing (trigger from Actions UI)
  • Fixed version conflicts: Removed automatic TestPyPI publishing from PRs to avoid duplicate version errors

πŸ“Š Coverage Metrics

  • Overall: 98% (512 statements, 10 missed)
  • client.py: 97%
  • device.py: 100%
  • All tests pass: 104 unit tests

πŸ› Bug Fixes

  • Fixed packaging version alignment between pyproject.toml and _version.py
  • Resolved flake8 linting issues (import ordering, whitespace)

πŸ“¦ What's Changed

  • Version bumped to 2.0.3
  • Added pre-commit to dev dependencies
  • Updated documentation and line endings normalization