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
86cff58d
Commit
86cff58d
authored
Jul 15, 2025
by
BO ZHANG
🏀
Browse files
add get_proc_info
parent
ad677026
Pipeline
#9242
passed with stage
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
csst_common/io.py
View file @
86cff58d
...
...
@@ -195,7 +195,7 @@ def delete_section(
def
get_proc_info
(
**
kwargs
):
cards
=
[(
"BUILD"
,
os
.
getenv
(
"BUILD"
),
""
)]
cards
=
[(
"BUILD"
,
os
.
getenv
(
"BUILD"
,
default
=
"-"
),
""
)]
for
k
,
v
in
kwargs
.
items
():
cards
.
append
((
k
,
v
,
""
))
header
=
fits
.
Header
(
cards
=
cards
)
...
...
tests/test_fits_header_ops.py
View file @
86cff58d
...
...
@@ -13,7 +13,7 @@ import unittest
from
astropy.io
import
fits
from
csst_common.io
import
append_header
,
reformat_header
,
delete_section
from
csst_common.io
import
append_header
,
reformat_header
,
delete_section
,
get_proc_info
class
TestFitsHeaderOps
(
unittest
.
TestCase
):
...
...
@@ -118,3 +118,7 @@ class TestFitsHeaderOps(unittest.TestCase):
h_del
=
delete_section
(
h
,
title
=
"WCS"
)
self
.
assertEqual
(
len
(
h_del
.
cards
),
7
)
def
test_get_proc_info
(
self
):
proc_info
=
get_proc_info
()
self
.
assertEquals
(
proc_info
[
"BUILD"
],
"-"
)
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