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
f7e79bc6
Commit
f7e79bc6
authored
Dec 15, 2023
by
BO ZHANG
🏀
Browse files
add module headers
parent
9a499f72
Pipeline
#2422
failed with stage
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_common/__init__.py
View file @
f7e79bc6
"""
"""
Identifier:
KSC-SJ4-
csst_common/__init__.py
Identifier: csst_common/__init__.py
Name: __init__.py
Name: __init__.py
Description: csst_common package
Description: csst_common package
Author: Bo Zhang
Author: Bo Zhang
Created: 2022-09-13
Created: 2022-09-13
Modified-History:
Modified-History:
202
2-09
-1
3
, Bo Zhang, created
202
3-12
-1
5
, Bo Zhang, created
202
2-09
-1
3
, Bo Zhang,
fixed a bug
202
3-12
-1
5
, Bo Zhang,
add module header
"""
"""
from
.status
import
CsstResult
,
CsstStatus
from
.status
import
CsstResult
,
CsstStatus
...
...
csst_common/ccds/__init__.py
View file @
f7e79bc6
"""
Identifier: csst_common/ccds/__init__.py
Name: __init__.py
Description: CCDS wrapper
Author: Bo Zhang
Created: 2022-09-13
Modified-History:
2023-12-15, Bo Zhang, created
2023-12-15, Bo Zhang, add CCDS wrapper
"""
from
.ccds
import
CCDS
from
.ccds
import
CCDS
csst_common/ccds/ccds.py
View file @
f7e79bc6
"""
Identifier: csst_common/__init__.py
Name: __init__.py
Description: csst_common package
Author: Bo Zhang
Created: 2022-09-13
Modified-History:
2023-07-08, Bo Zhang, created
2023-12-15, Bo Zhang, add module header
"""
import
functools
import
functools
import
os
import
os
...
...
csst_common/ccds/slsconf.py
View file @
f7e79bc6
"""
Identifier: csst_common/ccds/slsconf.py
Name: slsconf.py
Description: csst_common package
Author: Bo Zhang
Created: 2022-09-13
Modified-History:
2023-12-15, Bo Zhang, created
2023-12-15, Bo Zhang, add module header
"""
import
json
import
json
import
os
import
os
import
re
import
re
import
astropy.io.fits
as
pyfits
import
astropy.io.fits
as
pyfits
from
ccds
import
client
from
ccds
import
client
...
...
csst_common/decorator.py
View file @
f7e79bc6
"""
Identifier: csst_common/decorator.py
Name: decorator.py
Description: module wrapper
Author: Bo Zhang
Created: 2022-09-13
Modified-History:
2023-12-15, Bo Zhang, created
2023-12-15, Bo Zhang, add module header
"""
import
functools
import
functools
import
logging
import
logging
import
time
import
time
import
traceback
import
traceback
from
typing
import
Callable
,
NamedTuple
,
Optional
from
typing
import
Callable
,
NamedTuple
,
Optional
from
csst_common.status
import
CsstResult
,
CsstStatus
from
csst_common.logger
import
get_logger
from
csst_common.logger
import
get_logger
from
csst_common.status
import
CsstResult
,
CsstStatus
__all__
=
[
"ModuleResult"
,
"parameterized_module_decorator"
]
__all__
=
[
"ModuleResult"
,
"parameterized_module_decorator"
]
...
...
csst_common/file.py
View file @
f7e79bc6
"""
Identifier: csst_common/__init__.py
Name: __init__.py
Description: csst_common package
Author: Bo Zhang
Created: 2023-12-13
Modified-History:
2023-12-13, Bo Zhang, created
2023-12-13, Bo Zhang, add File
2023-12-15, Bo Zhang, use re to match file name
2023-12-15, Bo Zhang, add module header
"""
import
os
import
os
import
re
import
re
from
typing
import
Optional
from
typing
import
Optional
...
...
csst_common/time.py
View file @
f7e79bc6
"""
Identifier: csst_common/time.py
Name: time.py
Description: time module
Author: Bo Zhang
Created: 2023-03-09
Modified-History:
2023-03-09, Bo Zhang, created
2023-03-09, Bo Zhang, add two time formats
"""
import
datetime
import
datetime
def
now
():
def
now
():
"""
Return ISOT8601 format datetime, for time stamps in data products.
"""
"""Return ISOT8601 format datetime, for time stamps in data products."""
return
datetime
.
datetime
.
now
().
strftime
(
'
%Y-%m-%dT%H:%M:%S.%f
'
)
return
datetime
.
datetime
.
now
().
strftime
(
"
%Y-%m-%dT%H:%M:%S.%f
"
)
def
now_dfs
():
def
now_dfs
():
"""
Return ISOT8601 format datetime, for DFS usage only.
"""
"""Return ISOT8601 format datetime, for DFS usage only."""
return
datetime
.
datetime
.
now
().
strftime
(
'
%Y-%m-%d %H:%M:%S
'
)
return
datetime
.
datetime
.
now
().
strftime
(
"
%Y-%m-%d %H:%M:%S
"
)
csst_common/utils/tempfile.py
View file @
f7e79bc6
import
secrets
import
secrets
import
string
import
string
...
...
tests/test_status.py
View file @
f7e79bc6
"""
Identifier: tests/test_status.py
Name: test_status.py
Description: test CsstStatus
Author: Bo Zhang
Created: 2022-09-13
Modified-History:
2022-09-13, Bo Zhang, created
2022-09-13, Bo Zhang, added CsstMbiDataManager
"""
import
unittest
import
unittest
from
csst_common.status
import
CsstStatus
from
csst_common.status
import
CsstStatus
...
...
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