Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_common
Commits
62331c40
Commit
62331c40
authored
Sep 05, 2023
by
BO ZHANG
🏀
Browse files
add CsstResult
parent
dd81962a
Pipeline
#1192
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_common/status.py
View file @
62331c40
...
...
@@ -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
"""
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment