Skip to content
This repository was archived by the owner on Nov 14, 2022. It is now read-only.

Commit 5df9cca

Browse files
author
Dagonite
committed
Add dunder methods to ReductionScript class
1 parent 34d68f6 commit 5df9cca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

autoreduce_qp/queue_processor/reduction/service.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,12 @@ def run(self, input_files: List[Datafile], output_dir):
205205
with TimeOut(SCRIPT_TIMEOUT):
206206
return self.module.main(input_file=final_input_files, output_dir=str(output_dir.path))
207207

208+
def __str__(self):
209+
return self.script_path
210+
211+
def __repr__(self):
212+
return 'ReductionScript(instrument={instrument}, script_path={script_path}, module={module})'
213+
208214

209215
def reduce(reduction_dir, temp_dir, datafiles: List[Datafile], script, reduction_arguments, log_stream):
210216
"""

0 commit comments

Comments
 (0)