rebuild(stage-9): deliver deterministic intelligent screening
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class ScreenerCatalogResponse(BaseModel):
|
||||
factor_groups: dict[str, list[str]]
|
||||
factors: dict[str, str]
|
||||
stage: list[dict[str, Any]]
|
||||
curated: list[dict[str, Any]]
|
||||
|
||||
|
||||
class ScreenerWorkspaceResponse(BaseModel):
|
||||
trade_date: str | None
|
||||
message: str
|
||||
catalog: ScreenerCatalogResponse
|
||||
stage_runs: list[dict[str, Any]]
|
||||
curated_runs: list[dict[str, Any]]
|
||||
custom_strategies: list[dict[str, Any]]
|
||||
custom_runs: list[dict[str, Any]] = Field(default_factory=list)
|
||||
|
||||
|
||||
class ScreenerSyncResponse(BaseModel):
|
||||
trade_date: str
|
||||
factor_version: str
|
||||
factor_count: int
|
||||
phase: str
|
||||
stage_runs: int
|
||||
curated_runs: int
|
||||
completed: int
|
||||
failed: int
|
||||
|
||||
|
||||
class CustomStrategyInput(BaseModel):
|
||||
name: str = Field(min_length=1, max_length=30)
|
||||
formula: dict[str, Any]
|
||||
|
||||
|
||||
class TrackInput(BaseModel):
|
||||
run_id: int = Field(gt=0)
|
||||
identifier: str = Field(min_length=1, max_length=40)
|
||||
|
||||
|
||||
class IdentifierResponse(BaseModel):
|
||||
id: int
|
||||
|
||||
|
||||
class MessageResponse(BaseModel):
|
||||
message: str
|
||||
Reference in New Issue
Block a user