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
7aacc78b
Commit
7aacc78b
authored
Dec 30, 2023
by
BO ZHANG
🏀
Browse files
add Pipeline.summary()
parent
a39acbc0
Pipeline
#2879
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_common/pipeline.py
View file @
7aacc78b
...
...
@@ -78,6 +78,9 @@ class Pipeline:
clean_output_before_run
:
bool
=
True
,
**
kwargs
:
Any
,
):
# record start time
self
.
t_start
=
Time
.
now
()
# get pipeline information from env vars
self
.
pipeline_id
:
str
=
os
.
getenv
(
"PIPELINE_ID"
,
"-"
)
self
.
build
:
str
=
os
.
getenv
(
"BUILD"
,
"-"
)
...
...
@@ -147,9 +150,11 @@ class Pipeline:
h
.
set
(
"CREATED"
,
self
.
pipeline_id
,
comment
=
"pipeline build time"
)
return
reformat_header
(
h
,
strip
=
False
,
comment
=
"Pipeline summary"
)
def
summar
ize
(
self
):
def
summar
y
(
self
):
"""Summarize this run."""
pass
t_stop
:
Time
=
Time
.
now
()
t_cost
:
float
=
(
t_stop
-
self
.
t_start
).
value
*
86400.0
self
.
pipeline_logger
.
info
(
f
"Total cost:
{
t_cost
}
sec"
)
def
clean_output
(
self
):
"""Clean output directory."""
...
...
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