Skip to content

feat(indexing): add bulk video indexing command and coordinator (#68) - #157

Open
aimerscrypto wants to merge 1 commit into
grayhatdevelopers:mainfrom
aimerscrypto:feat-bulk-video-indexing
Open

feat(indexing): add bulk video indexing command and coordinator (#68)#157
aimerscrypto wants to merge 1 commit into
grayhatdevelopers:mainfrom
aimerscrypto:feat-bulk-video-indexing

Conversation

@aimerscrypto

Copy link
Copy Markdown

Closes #68

Summary

Adds bulk indexing capabilities to VidXP for both selected media assets and all eligible catalog items.

Changes

  1. Bulk Indexing Coordinator (src/vidxp/bulk_indexing.py):

    • Added run_bulk_index coordinator with BulkIndexItemResult and BulkIndexSummary data models.
    • Paginates catalog records via application.list_media to resolve all eligible items when --all is requested.
    • Inspects active_snapshot.generations to skip previously indexed media unless re-indexing is explicitly forced.
    • Runs indexing sequentially with ApplicationError isolation so single item failures do not halt remaining jobs.
    • Supports progress hooks (on_item_start, on_item_progress, on_item_complete) and --detach queueing.
  2. CLI Command (src/vidxp/cli_commands/index.py):

    • Added vidxp index bulk command supporting positional media IDs, --all, --reindex, --detach, --json, and standard index options (--modality, --frame-stride, etc.).
    • Interactive Rich progress tracking and summary table rendering.
    • Emits clean JSON when machine-readable output is requested.
    • Exits with status code 1 if any items fail.
  3. Tests (tests/test_bulk_indexing.py):

    • Added 26 unit and CLI tests covering pagination, skip detection, error resilience, forced re-indexing, and Typer runner execution.

Verification

  • uv run --with ruff ruff check . passed cleanly.
  • uv run --no-sync python -m pytest -q tests/test_bulk_indexing.py passed (26/26 tests).
  • Verified input guards, --help, and non-existent media error handling locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add bulk video indexing

1 participant