Skip to content

Support plan parameters of TypedDict, Dataclass, BaseModel that include devices, collections of devices #523

@DiamondJoseph

Description

@DiamondJoseph

Extends #506

Plans that have parameters of e.g.

def foo_plan(thing: TypedThing):
  ...

where

class TypedThing(TypedDict):
  x: Readable

or

@dataclass
class TypedThing:
  x: Readable

or

class TypedThing(BaseModel):
  x: Readable

Should be able to have their schemas generated and presented from /plans, and these plans should be runnable with x being passed as a reference to a device (i.e. parameters = {"thing": {"x": "stage_x"}})

Metadata

Metadata

Assignees

Labels

c: cliRelates to CLI codec: rest apiREST API changes

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions