From 0ac1b4a3b6f545586cb2698010ccfc4efc690e55 Mon Sep 17 00:00:00 2001 From: Ankit raj <113342181+ankit-v2-3@users.noreply.github.com> Date: Wed, 22 Jul 2026 20:20:39 +0530 Subject: [PATCH] fix: move constants to constants.py --- videodb/_constants.py | 5 +++++ videodb/index.py | 5 +---- videodb/understanding.py | 9 +++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/videodb/_constants.py b/videodb/_constants.py index c16eab6..cdfcb5c 100644 --- a/videodb/_constants.py +++ b/videodb/_constants.py @@ -147,6 +147,11 @@ class Status: in_progress = "in progress" +INDEX_TERMINAL_STATUSES = {"ready", "failed"} +UNDERSTANDING_TERMINAL_STATUSES = {"done", "failed"} +ANALYZER_TERMINAL_STATUSES = {"done", "failed", "skipped", "cancelled"} + + class MeetingStatus: initializing = "initializing" processing = "processing" diff --git a/videodb/index.py b/videodb/index.py index 731bb04..9c2d93b 100644 --- a/videodb/index.py +++ b/videodb/index.py @@ -2,10 +2,7 @@ from typing import List, Optional -from videodb._constants import ApiPath - - -INDEX_TERMINAL_STATUSES = {"ready", "failed"} +from videodb._constants import ApiPath, INDEX_TERMINAL_STATUSES class FieldSchema: diff --git a/videodb/understanding.py b/videodb/understanding.py index 150e071..208c4f0 100644 --- a/videodb/understanding.py +++ b/videodb/understanding.py @@ -1,12 +1,13 @@ import time from typing import Any, Dict, List, Optional -from videodb._constants import ApiPath +from videodb._constants import ( + ApiPath, + ANALYZER_TERMINAL_STATUSES, + UNDERSTANDING_TERMINAL_STATUSES, +) -UNDERSTANDING_TERMINAL_STATUSES = {"done", "failed"} -ANALYZER_TERMINAL_STATUSES = {"done", "failed", "skipped", "cancelled"} - ANALYZER_TYPE_ALIASES = { "spoken_words": "speech_transcription", }