Implements complete integration test suite that validates the entire video processing system in a containerized environment. ## Core Features - **Video Processing Pipeline Tests**: Complete E2E validation including encoding, thumbnails, sprites, and metadata extraction - **Procrastinate Worker Integration**: Async job processing, queue management, and error handling with version compatibility - **Database Migration Testing**: Schema creation, version compatibility, and production-like migration workflows - **Docker Orchestration**: Dedicated test environment with PostgreSQL, workers, and proper service dependencies ## Test Infrastructure - **43 integration test cases** covering all major functionality - **Containerized test environment** isolated from development - **Automated CI/CD pipeline** with GitHub Actions - **Performance benchmarking** and resource usage validation - **Comprehensive error scenarios** and edge case handling ## Developer Tools - `./scripts/run-integration-tests.sh` - Full-featured test runner - `Makefile` - Simplified commands for common tasks - `docker-compose.integration.yml` - Dedicated test environment - GitHub Actions workflow with test matrix and artifact upload ## Test Coverage - Multi-format video encoding (MP4, WebM, OGV) - Quality preset validation (low, medium, high, ultra) - Async job submission and processing - Worker version compatibility (Procrastinate 2.x/3.x) - Database schema migrations and rollbacks - Concurrent processing scenarios - Performance benchmarks and timeouts Files Added: - tests/integration/ - Complete test suite with fixtures - docker-compose.integration.yml - Test environment configuration - scripts/run-integration-tests.sh - Test runner with advanced options - .github/workflows/integration-tests.yml - CI/CD pipeline - Makefile - Development workflow automation - Enhanced pyproject.toml with integration test dependencies Usage: ```bash make test-integration # Run all integration tests ./scripts/run-integration-tests.sh -v # Verbose output ./scripts/run-integration-tests.sh -k # Keep containers for debugging make docker-test # Clean Docker test run ```
120 lines
2.7 KiB
TOML
120 lines
2.7 KiB
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "video-processor"
|
|
version = "0.2.0"
|
|
description = "Standalone video processing pipeline with multiple format encoding"
|
|
authors = [{name = "Video Processor", email = "dev@example.com"}]
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"ffmpeg-python>=0.2.0",
|
|
"pillow>=11.2.1",
|
|
"msprites2 @ git+https://github.com/rsp2k/msprites2.git",
|
|
"procrastinate>=2.15.1,<4.0.0", # Support both 2.x and 3.x during migration
|
|
"psycopg[pool]>=3.2.9",
|
|
"python-dateutil>=2.9.0",
|
|
"pydantic>=2.0.0",
|
|
"pydantic-settings>=2.0.0",
|
|
"exifread>=3.5.1",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"ruff>=0.1.0",
|
|
"mypy>=1.7.0",
|
|
"pytest>=7.0.0",
|
|
"pytest-cov>=4.0.0",
|
|
"pytest-asyncio>=0.21.0",
|
|
# Integration testing dependencies
|
|
"docker>=6.1.0",
|
|
"psycopg2-binary>=2.9.0",
|
|
]
|
|
|
|
# Core 360° video processing
|
|
video-360 = [
|
|
"py360convert>=0.1.0", # 360° projection conversions
|
|
"opencv-python>=4.5.0", # Advanced image processing
|
|
"numpy>=1.21.0", # Mathematical operations
|
|
"scipy>=1.7.0", # Scientific computing for spherical geometry
|
|
]
|
|
|
|
# Spatial audio processing for 360° videos
|
|
spatial-audio = [
|
|
"librosa>=0.9.0", # Audio analysis and processing
|
|
"soundfile>=0.11.0", # Multi-channel audio I/O
|
|
]
|
|
|
|
# Enhanced metadata extraction for 360° videos
|
|
metadata-360 = [
|
|
"exifread>=3.0.0", # 360° metadata parsing
|
|
]
|
|
|
|
# Complete 360° video package
|
|
video-360-full = [
|
|
"video-processor[video-360,spatial-audio,metadata-360]"
|
|
]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/video_processor"]
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
include = [
|
|
"/src",
|
|
"/tests",
|
|
"/README.md",
|
|
"/pyproject.toml",
|
|
]
|
|
|
|
[tool.hatch.metadata]
|
|
allow-direct-references = true
|
|
|
|
[tool.ruff]
|
|
target-version = "py311"
|
|
line-length = 88
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # pyflakes
|
|
"I", # isort
|
|
"B", # flake8-bugbear
|
|
"C4", # flake8-comprehensions
|
|
"UP", # pyupgrade
|
|
]
|
|
ignore = [
|
|
"E501", # line too long (handled by formatter)
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/*" = ["S101"] # Allow assert in tests
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "double"
|
|
indent-style = "space"
|
|
|
|
[tool.mypy]
|
|
python_version = "3.11"
|
|
strict = true
|
|
warn_return_any = true
|
|
warn_unused_configs = true
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py"]
|
|
python_classes = ["Test*"]
|
|
python_functions = ["test_*"]
|
|
asyncio_mode = "auto"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"mypy>=1.17.1",
|
|
"pytest>=8.4.2",
|
|
"pytest-asyncio>=0.21.0",
|
|
"pytest-cov>=6.2.1",
|
|
"ruff>=0.12.12",
|
|
]
|