adorn.orchestrator.orchestrator module

Coordinator between different collections of types.

class adorn.orchestrator.orchestrator.Orchestrator

Bases: object

Coordinate actions between a collection of Unit

contains(cls)

Check if Type exists in the Orchestrator

Parameters

cls (Type) – a type that is being checked to see if it exists in the Orchestrator

Raises

NotImplementedError – This method must be overriden by a subclass

Return type

bool

from_obj(cls, obj)

Generate an instance of type cls from obj

Parameters
  • cls (Type) – the type obj would be converted into

  • obj (Any) – an instance to be converted into type cls

Raises

NotImplementedError – This method must be overriden by a subclass

Return type

Any

get(cls)

Finds the Unit associated with cls

Parameters

cls (Type) – a type that you want the associated Unit of

Raises

NotImplementedError – This method must be overriden by a subclass

Return type

adorn.unit.unit.Unit

type_check(cls, obj)

Check if obj can be converted to type of cls

Parameters
  • cls (Type) – the type obj would be converted into

  • obj (Any) – an instance to be converted into type cls

Raises

NotImplementedError – This method must be overriden by a subclass

Return type

Optional[adorn.exception.type_check_error.TypeCheckError]

units: List[adorn.unit.unit.Unit]

a collection of collection of types