[refactor] v2: use absolute imports (v2.*) everywhere instead of relative
Mechanical conversion of every relative import under v2/ to an absolute v2.* path (from .x / ..x / ...x -> from v2.<pkg>.x) so imports are unambiguous, grep-able, and stable when code is copied/moved between entrypoints (VideoGenerator, CLI, server). Surgical prefix-only rewrite: only the 'from <dots><module>' prefix changed — import names, parentheses, multi-line formatting, comments, and ordering are byte-for-byte preserved (no collapsing, no reorder, no unrelated reformatting). - 471 imports across 125 files; v2/tests/ was already absolute (untouched). - Validated: all 125 files compile, every 'from v2.* import' target resolves to a real module/package, zero relative imports remain (full sweep), CPU mini suite green (202 passed, 2 skipped).
This commit is contained in:
committed by
Peiyuan Zhang
parent
c6d2976fc2
commit
4e331eb7ff
@@ -1,7 +1,7 @@
|
||||
"""Program plane — compose a card's loops into a task (design_v3 §13)."""
|
||||
from __future__ import annotations
|
||||
|
||||
from .specs import (
|
||||
from v2.program.specs import (
|
||||
ComponentNode,
|
||||
Edge,
|
||||
EdgeKind,
|
||||
@@ -13,7 +13,7 @@ from .specs import (
|
||||
when_opt,
|
||||
when_task,
|
||||
)
|
||||
from .workflow import (
|
||||
from v2.program.workflow import (
|
||||
BestOfNWorkflow,
|
||||
ParallelWorkflow,
|
||||
Workflow,
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ from dataclasses import dataclass, field
|
||||
from enum import Enum
|
||||
from typing import Any, Callable
|
||||
|
||||
from ..request.tasks import TaskType
|
||||
from v2.request.tasks import TaskType
|
||||
|
||||
|
||||
class ProgramKind(str, Enum):
|
||||
|
||||
@@ -111,7 +111,7 @@ class ParallelWorkflow(Workflow):
|
||||
def run(self, engine: Any, **initial: Any) -> Any:
|
||||
if not self.stages:
|
||||
raise ValueError(f"workflow {self.workflow_id!r} has no stages")
|
||||
from ..request.artifacts import Output
|
||||
from v2.request.artifacts import Output
|
||||
merged: dict[str, Any] = {}
|
||||
metrics: dict[str, float] = {}
|
||||
rid = self.workflow_id
|
||||
|
||||
Reference in New Issue
Block a user