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
c7e3e571
Commit
c7e3e571
authored
Dec 31, 2023
by
BO ZHANG
🏀
Browse files
set Pipeline.build to int
parent
0a8ba937
Pipeline
#2894
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_common/pipeline.py
View file @
c7e3e571
...
...
@@ -16,7 +16,7 @@ import os
import
shutil
import
traceback
import
warnings
from
typing
import
Callable
,
NamedTuple
,
Optional
,
Any
from
typing
import
Callable
,
NamedTuple
,
Optional
,
Any
,
Union
from
astropy.time
import
Time
,
TimeDelta
from
astropy.io
import
fits
...
...
@@ -83,7 +83,7 @@ class Pipeline:
# get pipeline information from env vars
self
.
pipeline_id
:
str
=
os
.
getenv
(
"PIPELINE_ID"
,
"-"
)
self
.
build
:
str
=
os
.
getenv
(
"BUILD"
,
"
-
"
)
self
.
build
:
int
=
int
(
os
.
getenv
(
"BUILD"
,
"
0
"
)
)
self
.
created
:
str
=
os
.
getenv
(
"CREATED"
,
"-"
)
self
.
verbose
:
bool
=
bool
(
os
.
getenv
(
"VERBOSE"
,
""
))
...
...
@@ -123,13 +123,15 @@ class Pipeline:
# self.error_trace = ErrorTrace(os.path.join(self.dir_output, "error_trace"))
if
dfs
:
self
.
dfs
=
DFS
()
self
.
dfs
:
Union
[
DFS
|
None
]
=
DFS
()
else
:
self
.
dfs
=
None
self
.
dfs
:
Union
[
DFS
|
None
]
=
None
if
ccds
:
self
.
ccds
=
CCDS
(
ccds_root
=
ccds_root
,
ccds_cache
=
ccds_cache
)
self
.
ccds
:
Union
[
CCDS
|
None
]
=
CCDS
(
ccds_root
=
ccds_root
,
ccds_cache
=
ccds_cache
)
else
:
self
.
ccds
=
None
self
.
ccds
:
Union
[
CCDS
|
None
]
=
None
if
filter_warnings
:
self
.
filter_warnings
()
...
...
@@ -148,7 +150,7 @@ class Pipeline:
h
.
set
(
"PIPELINE_ID"
,
self
.
pipeline_id
,
comment
=
"pipeline ID"
)
h
.
set
(
"BUILD"
,
self
.
build
,
comment
=
"pipeline build number"
)
h
.
set
(
"CREATED"
,
self
.
pipeline_id
,
comment
=
"pipeline build time"
)
return
reformat_header
(
h
,
strip
=
False
,
comment
=
"Pipeline
summary
"
)
return
reformat_header
(
h
,
strip
=
False
,
comment
=
"Pipeline
info
"
)
def
summarize
(
self
):
"""Summarize this run."""
...
...
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