Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
1 year ago
by
BO ZHANG
Browse files
Options
Download
Email Patches
Plain Diff
add module headers
parent
9a499f72
dev
main
No related merge requests found
Pipeline
#2422
failed with stage
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
csst_common/__init__.py
+3
-3
csst_common/__init__.py
csst_common/ccds/__init__.py
+10
-0
csst_common/ccds/__init__.py
csst_common/ccds/ccds.py
+10
-0
csst_common/ccds/ccds.py
csst_common/ccds/slsconf.py
+10
-1
csst_common/ccds/slsconf.py
csst_common/decorator.py
+11
-1
csst_common/decorator.py
csst_common/file.py
+12
-0
csst_common/file.py
csst_common/time.py
+14
-4
csst_common/time.py
csst_common/utils/tempfile.py
+1
-0
csst_common/utils/tempfile.py
tests/test_status.py
+10
-0
tests/test_status.py
with
81 additions
and
9 deletions
+81
-9
csst_common/__init__.py
+
3
-
3
View file @
f7e79bc6
"""
Identifier:
KSC-SJ4-
csst_common/__init__.py
Identifier: csst_common/__init__.py
Name: __init__.py
Description: csst_common package
Author: Bo Zhang
Created: 2022-09-13
Modified-History:
202
2-09
-1
3
, Bo Zhang, created
202
2-09
-1
3
, Bo Zhang,
fixed a bug
202
3-12
-1
5
, Bo Zhang, created
202
3-12
-1
5
, Bo Zhang,
add module header
"""
from
.status
import
CsstResult
,
CsstStatus
...
...
This diff is collapsed.
Click to expand it.
csst_common/ccds/__init__.py
+
10
-
0
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
This diff is collapsed.
Click to expand it.
csst_common/ccds/ccds.py
+
10
-
0
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
os
...
...
This diff is collapsed.
Click to expand it.
csst_common/ccds/slsconf.py
+
10
-
1
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
os
import
re
import
astropy.io.fits
as
pyfits
from
ccds
import
client
...
...
This diff is collapsed.
Click to expand it.
csst_common/decorator.py
+
11
-
1
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
logging
import
time
import
traceback
from
typing
import
Callable
,
NamedTuple
,
Optional
from
csst_common.status
import
CsstResult
,
CsstStatus
from
csst_common.logger
import
get_logger
from
csst_common.status
import
CsstResult
,
CsstStatus
__all__
=
[
"ModuleResult"
,
"parameterized_module_decorator"
]
...
...
This diff is collapsed.
Click to expand it.
csst_common/file.py
+
12
-
0
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
re
from
typing
import
Optional
...
...
This diff is collapsed.
Click to expand it.
csst_common/time.py
+
14
-
4
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
def
now
():
"""
Return ISOT8601 format datetime, for time stamps in data products.
"""
return
datetime
.
datetime
.
now
().
strftime
(
'
%Y-%m-%dT%H:%M:%S.%f
'
)
"""Return ISOT8601 format datetime, for time stamps in data products."""
return
datetime
.
datetime
.
now
().
strftime
(
"
%Y-%m-%dT%H:%M:%S.%f
"
)
def
now_dfs
():
"""
Return ISOT8601 format datetime, for DFS usage only.
"""
return
datetime
.
datetime
.
now
().
strftime
(
'
%Y-%m-%d %H:%M:%S
'
)
"""Return ISOT8601 format datetime, for DFS usage only."""
return
datetime
.
datetime
.
now
().
strftime
(
"
%Y-%m-%d %H:%M:%S
"
)
This diff is collapsed.
Click to expand it.
csst_common/utils/tempfile.py
+
1
-
0
View file @
f7e79bc6
import
secrets
import
string
...
...
This diff is collapsed.
Click to expand it.
tests/test_status.py
+
10
-
0
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
from
csst_common.status
import
CsstStatus
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets