Loading doc/source/ch08_csst_common.rst +21 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,27 @@ Use ``FileRecorder.add_record()`` to add file records. test001.txt True Test file 1 False test002.txt True Test file 2 False `FileRecorder` inherits from `list`. Therefore, if you are collecting records from subprocesses, here is the way to combine records: .. code-block:: python :linenos: >>> from csst_common.file_recorder import FileRecorder >>> fr1 = FileRecorder() >>> fr1.add_record(filepath="test1.txt", db=False, comment="test file 1") >>> fr2 = FileRecorder() >>> fr2.add_record(filepath="test2.txt", db=False, comment="test file 2") >>> fr_all = FileRecorder([*fr1, *fr2]) >>> fr_all.pprint_all() <FileRecorder length=2> filepath db comment existence --------- ----- ----------- --------- test1.txt False test file 1 False test2.txt False test file 2 False ``csst_common.logger.get_logger()`` ----------------------------------- Loading Loading
doc/source/ch08_csst_common.rst +21 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,27 @@ Use ``FileRecorder.add_record()`` to add file records. test001.txt True Test file 1 False test002.txt True Test file 2 False `FileRecorder` inherits from `list`. Therefore, if you are collecting records from subprocesses, here is the way to combine records: .. code-block:: python :linenos: >>> from csst_common.file_recorder import FileRecorder >>> fr1 = FileRecorder() >>> fr1.add_record(filepath="test1.txt", db=False, comment="test file 1") >>> fr2 = FileRecorder() >>> fr2.add_record(filepath="test2.txt", db=False, comment="test file 2") >>> fr_all = FileRecorder([*fr1, *fr2]) >>> fr_all.pprint_all() <FileRecorder length=2> filepath db comment existence --------- ----- ----------- --------- test1.txt False test file 1 False test2.txt False test file 2 False ``csst_common.logger.get_logger()`` ----------------------------------- Loading