Add string representations for procedures classes #43
Labels
enhancement
New feature or request
good first issue
Good for newcomers
procedures
Affects procedures or ProcLang code
We haven't defined
__str__
methods forAction
,Transition
,Step
,Procedure
, or any of the condition classes, which means that when we print them we get things like this:<topside.procedures.conditions.GreaterEqual object at 0x0000024844702688>
Action(component='c1', state='open')
ProcedureStep(step_id='s1', action=None, conditions={<topside.procedures.conditions.Immediate object at 0x0000024815FC2748>: Transition(procedure='p1', step='s2')})
Procedure(procedure_id='p1', steps={'s1': ProcedureStep(step_id='s1', action=None, conditions={<topside.procedures.conditions.Immediate object at 0x0000024815FC2748>: Transition(procedure='p1', step='s2')}), 's2': ProcedureStep(step_id='s2', action=Action(component='c1', state='open'), conditions={<topside.procedures.conditions.Immediate object at 0x0000024844DA0448>: Transition(procedure='p1', step='s3')}), 's3': ProcedureStep(step_id='s3', action=Action(component='c1', state='closed'), conditions={})})
This isn't wrong, but when we want to add logging it will definitely be more convenient to have string representations so that it's easier to read.
The text was updated successfully, but these errors were encountered: