Skip to content

Release v0.8.1 - Quality & Stability

Choose a tag to compare

@Tok Tok released this 17 Jan 13:51
· 188 commits to main since this release
fb43cb0

Release v0.8.1 - Quality & Stability

This release focuses on code quality improvements, bug fixes, and significantly improved test coverage.

🎯 Highlights

  • Coverage improved from 76% β†’ 89% (exceeded 85% target!)
  • Modernized type hints to Python 3.10+ standards (PEP 585/604)
  • Fixed critical UI bug where interface stuck at 100% completion
  • Fixed video file locks preventing playback after processing
  • Fully suppressed library warnings for cleaner console output

✨ Features & Improvements

Code Quality

  • Migrated all type hints to modern Python syntax:
    • Dict[K, V] β†’ dict[K, V]
    • List[X] β†’ list[X]
    • Optional[X] β†’ X | None
    • Callable from typing β†’ collections.abc.Callable
  • Fixed invalid type defaults in public APIs (str = None β†’ str | None = None)
  • Reduced cyclomatic complexity in load_model() method
  • All code now passes flake8 and black formatting

Bug Fixes

  • UI Completion Fix: Added socketio.sleep() to ensure completion messages are transmitted before background thread terminates
  • Video File Locks: Added try/finally blocks to guarantee cv2.VideoCapture.release() is always called
  • Warning Suppression: Completely suppressed Depth-Anything V3 gsplat dependency warnings using stdout/stderr redirection

Testing & Coverage

  • Overall: 76% β†’ 89% coverage
  • Added 25 comprehensive tests for video_processor.py (10% β†’ 51% coverage)
  • Achieved 100% coverage on io_operations.py
  • All 541 tests passing

πŸ“Š Coverage Breakdown

Module Coverage Change
Overall 89% +13%
video_processor.py 51% +41%
io_operations.py 100% +9%
image_processing.py 100% -
video_processing.py 100% -

πŸ”§ Technical Details

Type Hints Modernization

All modules now use modern Python 3.10+ type hints following PEP 585 and PEP 604:

  • from __future__ import annotations added to all modules
  • Built-in generics preferred over typing imports
  • Union syntax using | instead of Optional

Resource Management

Improved file handle management:

  • app.py: Wrapped get_video_info() in try/finally
  • io_operations.py: Added try/finally to get_video_properties()
  • Follows RAII pattern for guaranteed cleanup

SocketIO Threading

Fixed race condition where completion messages weren't delivered:

  • Added socketio.sleep(SOCKETIO_SLEEP_YIELD) after all completion emits
  • Ensures context switch for message transmission
  • No perceptible delay (SOCKETIO_SLEEP_YIELD = 0)

πŸ“ Commits

All changes included in PR #9:

  • 15 commits total
  • All CI/CD checks passing
  • Flake8, black, and mypy compliant
  • 541/541 tests passing

πŸ™ Contributors

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com


Full Changelog: v0.8.0...v0.8.1