From 75147aa28196d6c0d384aca274d4fa1d74654202 Mon Sep 17 00:00:00 2001 From: shoulinwei Date: Sat, 30 Dec 2023 21:32:50 +0800 Subject: [PATCH] add build_id --- csst_dfs_api/facility/level2.py | 4 +++- tests/facility/test_facility_level2type.py | 17 ++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/csst_dfs_api/facility/level2.py b/csst_dfs_api/facility/level2.py index f20298d..dc000e6 100644 --- a/csst_dfs_api/facility/level2.py +++ b/csst_dfs_api/facility/level2.py @@ -24,7 +24,9 @@ class Level2DataApi(object): qc2_status : [int], prc_status : [int], import_status : [int], - filename: [str] + filename: [str], + build_id : [int], + pipeline_id: [str], limit: limits returns the number of records,default 0:no-limit :returns: csst_dfs_common.models.Result diff --git a/tests/facility/test_facility_level2type.py b/tests/facility/test_facility_level2type.py index 2e24988..63d13f0 100644 --- a/tests/facility/test_facility_level2type.py +++ b/tests/facility/test_facility_level2type.py @@ -25,15 +25,26 @@ class Level2TypeTestCase(unittest.TestCase): def test_write(self): rec = self.api.write( - data_type = "csst-msc-l1-mbi-cat", + data_type = "csst-msc-l1-mbi-cat2", module_id = "MSC", key_column = "ID", hdu_index = 1, - demo_filename = "CSST_MSC_MS_SCIE_20240821023334_20240821023604_10160000011_19_L1_V01_CAT.fits", - demo_file_path = "/Users/wsl/temp/csst/msc/L2/CSST_MSC_MS_SCIE_20240821023334_20240821023604_10160000011_19_L1_V01_CAT.fits", + demo_filename = "csst-msc-l1-mbi-cat.toml", + demo_file_path = "/Users/wsl/temp/csst/msc/L2/csst-msc-l1-mbi-cat.toml", ra_column = "RA", dec_column = "DEC") print("write :", rec) + + # rec = self.api.write( + # data_type = "csst-msc-l1-mbi-cat", + # module_id = "MSC", + # key_column = "ID", + # hdu_index = 1, + # demo_filename = "CSST_MSC_MS_SCIE_20240821023334_20240821023604_10160000011_19_L1_V01_CAT.fits", + # demo_file_path = "/Users/wsl/temp/csst/msc/L2/CSST_MSC_MS_SCIE_20240821023334_20240821023604_10160000011_19_L1_V01_CAT.fits", + # ra_column = "RA", + # dec_column = "DEC") + # print("write :", rec) # rec = self.api.write( # data_type = "csst-msc-xcat", -- GitLab