diff --git a/csst_common/__init__.py b/csst_common/__init__.py index 6d5187581b474ec5ec302959073223953f48d612..bd486b377ec32762c2b1cae0b2f3e1d9c29a1e6e 100644 --- a/csst_common/__init__.py +++ b/csst_common/__init__.py @@ -3,17 +3,18 @@ Identifier: csst_common/__init__.py Name: __init__.py Description: csst_common package Author: Bo Zhang -Created: 2022-09-13 +Created: 2022-09-21 Modified-History: - 2023-12-15, Bo Zhang, created + 2022-09-21, Bo Zhang, created + 2023-09-22, Bo Zhang, updates 2023-12-15, Bo Zhang, add module header """ -from .status import CsstResult, CsstStatus -from .pipeline import Pipeline from .ccds import CCDS -from .dfs import DFS from .decorator import parameterized_module_decorator +from .dfs import DFS from .file import File +from .pipeline import Pipeline +from .status import CsstResult, CsstStatus __version__ = "0.0.2" diff --git a/csst_common/data_manager.py b/csst_common/data_manager.py index 6cc9b47d2e517262833ad0086063b9f9ea349862..efff6b4cd53bb0398dc9248cb4133426865b4c53 100644 --- a/csst_common/data_manager.py +++ b/csst_common/data_manager.py @@ -30,11 +30,10 @@ from csst_dfs_api.facility.level1prc import Level1PrcApi from csst_dfs_api.mbi.level2 import Level2DataApi as MbiLevel2DataApi from csst_dfs_api.sls.level2spectra import Level2SpectraApi as SlsLevel2DataApi +from .dfs import DFS from .logger import get_logger from .params import CSST_PARAMS as CP from .time import now -from .ccds import CCDS -from .dfs import DFS class CsstMsDataManager: diff --git a/csst_common/decorator.py b/csst_common/decorator.py index f62dd3261175a185556dbd1f979b8e2033a4e8f2..ec413fd0fdc6929d17f66bb1a0a3603577b05af3 100644 --- a/csst_common/decorator.py +++ b/csst_common/decorator.py @@ -3,9 +3,9 @@ Identifier: csst_common/decorator.py Name: decorator.py Description: module wrapper Author: Bo Zhang -Created: 2022-09-13 +Created: 2023-12-10 Modified-History: - 2023-12-15, Bo Zhang, created + 2023-12-10, Bo Zhang, rewrite ModuleResult and decorator 2023-12-15, Bo Zhang, add module header """ import functools diff --git a/csst_common/dfs.py b/csst_common/dfs.py index 0ea1fd6722cee9ade868354d82d9adb0fcf7d9e4..6e4e03a697e60b974ad4a574055212dfe6920927 100644 --- a/csst_common/dfs.py +++ b/csst_common/dfs.py @@ -1,7 +1,7 @@ """ Identifier: csst_common/dfs.py Name: dfs.py -Description: csst_common package +Description: DFS wrapper Author: Bo Zhang Created: 2023-07-08 Modified-History: diff --git a/csst_common/file.py b/csst_common/file.py index cd639d695a139600d0d681ea7f5a26263927d250..25136ba384af2cbff247bec33085de5b4e1b988c 100644 --- a/csst_common/file.py +++ b/csst_common/file.py @@ -1,7 +1,7 @@ """ -Identifier: csst_common/__init__.py -Name: __init__.py -Description: csst_common package +Identifier: csst_common/file.py +Name: file.py +Description: file operation Author: Bo Zhang Created: 2023-12-13 Modified-History: diff --git a/csst_common/io.py b/csst_common/io.py index 230a9f4c3f8bbc48cdae85bd3087505092684815..e97da4fc57f26e73ab8113982c3e65af2894f3d7 100644 --- a/csst_common/io.py +++ b/csst_common/io.py @@ -1,3 +1,13 @@ +""" +Identifier: csst_common/io.py +Name: io.py +Description: IO module +Author: Bo Zhang +Created: 2023-12-13 +Modified-History: + 2023-12-10, Bo Zhang, created + 2023-12-15, Bo Zhang, add verify_checksum and append_header, add module header +""" import warnings from copy import deepcopy diff --git a/csst_common/logger.py b/csst_common/logger.py index a78ac2222fb5db15da9963732c0a471baabdc725..40faa5981bed5f235e9972914943b6c5f6eae2ab 100644 --- a/csst_common/logger.py +++ b/csst_common/logger.py @@ -1,5 +1,5 @@ """ -Identifier: KSC-SJ4-csst_common/logger.py +Identifier: csst_common/logger.py Name: logger.py Description: CSST logger Author: Bo Zhang @@ -8,6 +8,7 @@ Modified-History: 2022-10-04, Bo Zhang, created 2022-10-04, Bo Zhang, added get_logger 2022-10-07, Bo Zhang, added Numpydoc docstring + 2023-12-10, Bo Zhang, add type annotation """ import logging from typing import Optional diff --git a/csst_common/params.py b/csst_common/params.py index d67d59f8566ed23d2ba28b0bc3b686e236341ccc..675bec84b4ec1fe4c1ed98f6b05e25ba7bdf9a66 100644 --- a/csst_common/params.py +++ b/csst_common/params.py @@ -1,5 +1,5 @@ """ -Identifier: KSC-SJ4-csst_common/params.py +Identifier: csst_common/params.py Name: params.py Description: CSST parameters Author: Bo Zhang diff --git a/csst_common/pipeline.py b/csst_common/pipeline.py index 16d2fe5f02da88848d1ff64909f9758a3d57805d..94a3e05f5efc10f3e9befa7af7fa192c77305270 100644 --- a/csst_common/pipeline.py +++ b/csst_common/pipeline.py @@ -1,3 +1,15 @@ +""" +Identifier: csst_common/pipeline.py +Name: file.py +Description: pipeline operation +Author: Bo Zhang +Created: 2023-12-13 +Modified-History: + 2023-07-11, Bo Zhang, created + 2023-07-11, Bo Zhang, add Pipeline class + 2023-12-10, Bo Zhang, update Pipeline + 2023-12-15, Bo Zhang, add module header +""" import json import os import subprocess @@ -5,9 +17,10 @@ import warnings from typing import Any from astropy import time -from .file import File + from .ccds import CCDS from .dfs import DFS +from .file import File from .logger import get_logger diff --git a/csst_common/status.py b/csst_common/status.py index 170807cf95f5a13ace61b0d9eb60ac0ca0040324..0b0980c56b2ed754a3864331896ab8b11c4789f5 100644 --- a/csst_common/status.py +++ b/csst_common/status.py @@ -1,5 +1,5 @@ """ -Identifier: KSC-SJ4-csst_common/status.py +Identifier: csst_common/status.py Name: status.py Description: CSST status Author: Bo Zhang diff --git a/csst_common/utils/__init__.py b/csst_common/utils/__init__.py index 1f3135f6722a63e35810457d01160a7d6db41d02..219871dc7e3d539528c0f9bedaa22b296f665db9 100644 --- a/csst_common/utils/__init__.py +++ b/csst_common/utils/__init__.py @@ -1,2 +1,13 @@ +""" +Identifier: csst_common/utils/__init__.py +Name: __init__.py +Description: CSST utils +Author: Bo Zhang +Created: 2022-09-19 +Modified-History: + 2022-09-19, Bo Zhang, created + 2023-12-15, Bo Zhang, add module header +""" + from ._module_docstr import ModuleHeader from .tempfile import randfile diff --git a/csst_common/utils/_module_docstr.py b/csst_common/utils/_module_docstr.py index e7c93005a45ec0e5065298898dcf64cd9abf935a..d4f120b5c3dcbde891dc6cea661acb753c869db9 100644 --- a/csst_common/utils/_module_docstr.py +++ b/csst_common/utils/_module_docstr.py @@ -1,12 +1,13 @@ """ -Identifier: KSC-SJ4-csst_common/utils.py -Name: utils.py -Description: This module collects a set of utilities for CSST L1 pipeline. +Identifier: csst_common/utils/_module_docstr.py +Name: _module_docstr.py +Description: module docstring Author: Bo Zhang Created: 2022-09-06 Modified-History: 2022-09-06, Bo Zhang, Added header_str - 2022-09-13, Bo Zhang, Added ModuleHeader class + 2022-09-19, Bo Zhang, Added ModuleHeader class + 2023-12-15, Bo Zhang, reformat module headers """ import datetime import glob diff --git a/csst_common/utils/tempfile.py b/csst_common/utils/tempfile.py index f49b88df306dbb7f8bbdc3be8b7a2e4e61a405f5..0b2b50530763e23df20277608117989145125bd8 100644 --- a/csst_common/utils/tempfile.py +++ b/csst_common/utils/tempfile.py @@ -1,3 +1,13 @@ +""" +Identifier: csst_common/utils/__init__.py +Name: __init__.py +Description: CSST utils +Author: Bo Zhang +Created: 2022-09-19 +Modified-History: + 2022-09-19, Bo Zhang, created + 2023-12-15, Bo Zhang, add module header +""" import secrets import string