Skip to content

Commit ec399bf

Browse files
fix CI bug and added 8 copy
1 parent dc48f61 commit ec399bf

7 files changed

Lines changed: 13 additions & 9 deletions

File tree

185 KB
Loading
167 KB
Loading
209 KB
Loading

docs/PROCESS_FRAMES_ALGORITHM.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ frame_processor/
2525
pipeline.py ← file discovery & orchestration
2626
processor.py ← core image analysis (DeviceFrameProcessor)
2727
indexer.py ← generates device-frames-output/index.json
28-
readme.py ← updates README device list section
28+
readme_updater.py ← updates README device list section
2929
models.py ← ScreenBounds, FrameTemplate dataclasses
3030
common.py ← shared logger & constants
3131
```

frame_processor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from .indexer import generate_index_file
44
from .pipeline import discover_unprocessed_frames, process_frame_list
5-
from .readme import update_readme
5+
from .readme_updater import update_readme
66

77
__all__ = [
88
"discover_unprocessed_frames",

process_frames.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,20 @@ def main() -> int:
8686
png_paths = _resolve_explicit_files(args.files)
8787
mode_label = f"{len(png_paths)} explicit file(s)"
8888
else:
89-
# Check CHANGED_FILES env var (set by GitHub Actions)
90-
env_files = os.environ.get("CHANGED_FILES", "").strip()
91-
if env_files and not args.force_all:
92-
file_list = env_files.splitlines() if "\n" in env_files else env_files.split()
93-
png_paths = _resolve_explicit_files([f.strip() for f in file_list if f.strip()])
89+
# Check CHANGED_FILES env var (set by GitHub Actions).
90+
# Use `get` with sentinel to distinguish "not set" from "set but empty":
91+
# None → local dev, fall back to mtime-based discovery
92+
# "" → CI run where no raw files changed; process nothing
93+
# "..." → CI run with specific changed files
94+
env_value = os.environ.get("CHANGED_FILES") # None if var is absent
95+
if env_value is not None and not args.force_all:
96+
file_list = [f.strip() for f in env_value.splitlines() if f.strip()]
97+
png_paths = _resolve_explicit_files(file_list)
9498
mode_label = f"{len(png_paths)} file(s) from CHANGED_FILES"
9599
else:
96-
# Auto-discover: changed only (default) or all (--all flag)
100+
# Local dev: mtime-based discovery (or --all to skip mtime check)
97101
png_paths = discover_unprocessed_frames(FRAMES_INPUT, FRAMES_OUTPUT, force=args.force_all)
98-
mode_label = "all frames" if args.force_all else "changed frames"
102+
mode_label = "all frames" if args.force_all else "changed frames (mtime)"
99103

100104
logger.info(f"Mode: {mode_label}")
101105

0 commit comments

Comments
 (0)