xdl.readwrite.validation module
- xdl.readwrite.validation.check_attrs_are_valid(attrs: Dict[str, str], target_class: type) None [source]
Check that attrs can be passed into
target_class
liketarget_class(**attrs)
.- Parameters
attrs (Dict[str, str]) – Attribute dict to check all keys are args of
target_class.__init__
method.target_class (type) –
target_class
to check attrs are args of__init__
method.
- Raises
XDLError – Error raised if any of attrs aren’t args of
target_class.__init__
method.
- xdl.readwrite.validation.check_reagents_are_all_declared(steps: List[xdl.steps.core.step.Step], reagents: List[xdl.reagents.Reagent]) None [source]
Check all reagents used in steps are declared in Reagents section.
- xdl.readwrite.validation.check_vessels_are_all_declared(steps: List[xdl.steps.core.step.Step], components: List[xdl.hardware.Component]) None [source]
Check all components used in steps are declared in Hardware section.
- xdl.readwrite.validation.get_valid_attrs(target_class: type) List[str] [source]
Get valid attrs for passing to
target_class.__init__
methods.- Parameters
target_class (type) – Class to get valid attrs for
__init__
method.- Returns
List of arg names for
target_class.__init__
method.- Return type
List[str]