Commit 62331c40 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

add CsstResult

parent dd81962a
Pipeline #1192 passed with stage
in 0 seconds
......@@ -30,3 +30,25 @@ class CsstStatus(IntEnum):
WARNING = 1
ERROR = 2
# status list to be completed
class CsstResult:
"""
Examples
--------
>>> CsstResult(CsstStatus.PERFECT, ["file1.fits", "file2.fits"])
"""
def __init__(self, status: CsstStatus = CsstStatus.ERROR, file_list=[], **additional_output):
assert isinstance(status, CsstStatus)
assert type(file_list) is list
self.status = status
self.file_list = file_list
self.additional_output = additional_output
def __repr__(self):
return f""" <CsstResult status={self.status}>
- file_list: {self.file_list}
- addtional_output: {self.additional_output} \n
"""
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment