Adding handoff functionality for reviews
This commit is contained in:
+7
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from .cache import resolve_with_cache
|
||||
from .errors import ValidationError, ValidationIssue
|
||||
from .models import (
|
||||
ProjectConfig,
|
||||
@@ -98,6 +99,7 @@ def validate_project(
|
||||
|
||||
for slide_id, slide_def in slides.items():
|
||||
image_path = slides_dir / slide_def.image
|
||||
image_path, _ = resolve_with_cache(image_path, project_path)
|
||||
if not image_path.exists():
|
||||
issues.append(
|
||||
ValidationIssue(
|
||||
@@ -142,6 +144,7 @@ def validate_project(
|
||||
base_dir = videos_dir
|
||||
|
||||
video_path = base_dir / video_source.source_file
|
||||
video_path, _ = resolve_with_cache(video_path, project_path)
|
||||
if not video_path.exists():
|
||||
issues.append(
|
||||
ValidationIssue(
|
||||
@@ -153,6 +156,7 @@ def validate_project(
|
||||
# Check preprocessed output exists if filters are defined
|
||||
if video_source.filter and video_source.output_file:
|
||||
output_path = base_dir / video_source.output_file
|
||||
output_path, _ = resolve_with_cache(output_path, project_path)
|
||||
if not output_path.exists():
|
||||
issues.append(
|
||||
ValidationIssue(
|
||||
@@ -168,9 +172,11 @@ def validate_project(
|
||||
if bg_file:
|
||||
# Check in project folder first, then parent (for shared_assets)
|
||||
bg_path = project_path / bg_file
|
||||
bg_path, _ = resolve_with_cache(bg_path, project_path)
|
||||
if not bg_path.exists():
|
||||
# Try parent directory (shared_assets at repo root)
|
||||
bg_path = project_path.parent / bg_file
|
||||
bg_path, _ = resolve_with_cache(bg_path, project_path.parent)
|
||||
if not bg_path.exists():
|
||||
issues.append(
|
||||
ValidationIssue(
|
||||
@@ -188,7 +194,7 @@ def validate_project(
|
||||
|
||||
# Check resolution is reasonable
|
||||
width, height = config.resolution
|
||||
if width < 100 or height < 100:
|
||||
if width < 50 or height < 50:
|
||||
issues.append(
|
||||
ValidationIssue(
|
||||
f"Resolution too small: {width}x{height}", project_path / "project.json"
|
||||
|
||||
Reference in New Issue
Block a user