compare view
This commit is contained in:
@@ -30,12 +30,21 @@ class ConfigUpdate(BaseModel):
|
||||
preprocessing: dict | None = None
|
||||
|
||||
|
||||
class StageOutputHintInfo(BaseModel):
|
||||
key: str
|
||||
type: str
|
||||
label: str = ""
|
||||
default_opacity: float = 0.5
|
||||
src_format: str = "png"
|
||||
|
||||
|
||||
class StageConfigInfo(BaseModel):
|
||||
name: str
|
||||
label: str
|
||||
description: str
|
||||
category: str
|
||||
config_fields: list[dict]
|
||||
output_hints: list[StageOutputHintInfo] = []
|
||||
reads: list[str]
|
||||
writes: list[str]
|
||||
|
||||
@@ -121,6 +130,13 @@ def _stage_to_info(stage) -> StageConfigInfo:
|
||||
}
|
||||
for f in stage.config_fields
|
||||
],
|
||||
output_hints=[
|
||||
StageOutputHintInfo(
|
||||
key=h.key, type=h.type, label=h.label,
|
||||
default_opacity=h.default_opacity, src_format=h.src_format,
|
||||
)
|
||||
for h in getattr(stage, "output_hints", [])
|
||||
],
|
||||
reads=stage.io.reads,
|
||||
writes=stage.io.writes,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user