refactor: unify data preparations and research input snapshots
Deploy production / deploy (push) Successful in 53s

This commit is contained in:
yuxuanhui
2026-09-12 01:24:02 +08:00
parent 849f86fef7
commit 394438e753
82 changed files with 4146 additions and 2076 deletions
+17
View File
@@ -7,6 +7,7 @@ from pydantic import Field, model_validator
from ..backtests.contracts import Candidate, SimulationSettings
from ..catalog.contracts import CatalogFilters, Scope
from ..preparations.contracts import PreparationReference
from ..research.workspace_contracts import TemplateSpec
from ..schemas import Contract
@@ -54,8 +55,24 @@ class Provenance(Contract):
parent_run_id: RunId | None = None
class PreparationSearch(Contract):
q: str = Field(default="", max_length=300)
scope_key: str | None = None
limit: int = Field(default=25, ge=1, le=100)
offset: int = Field(default=0, ge=0)
class PreparationRead(Contract):
id: str = Field(min_length=1, max_length=36)
version: int = Field(ge=1)
q: str = Field(default="", max_length=300)
limit: int = Field(default=25, ge=1, le=100)
offset: int = Field(default=0, ge=0)
class Submit(Contract):
name: str = Field(min_length=1, max_length=200)
preparation_refs: list[PreparationReference] = Field(default_factory=list, max_length=20)
candidates: list[DirectCandidate] = Field(min_length=1, max_length=100)
idempotency_key: Identifier
duplicate_policy: Literal["reject", "rerun"] = "reject"