Commit 1353f622 authored by Wei Shoulin's avatar Wei Shoulin
Browse files

rm reqs

parent 7191c49c
import unittest
from csst_dfs_api_local.msc import Level0DataApi
class MSCLevel0DataApiTestCase(unittest.TestCase):
def setUp(self):
self.api = Level0DataApi()
def test_find(self):
recs = self.api.find(obs_id = '300000055', obs_type = 'sky', limit = 0)
print('find:', recs)
def test_get(self):
rec = self.api.get(id = 31)
print('get:', rec)
def test_update_proc_status(self):
rec = self.api.update_proc_status(id = 31, status = 6)
print('update_proc_status:', rec)
def test_update_qc0_status(self):
rec = self.api.update_qc0_status(id = 31, status = 7)
print('update_qc0_status:', rec)
def test_write(self):
rec = self.api.write(
obs_id = '0000013',
detector_no = "01",
obs_type = "sky",
obs_time = "2021-06-06 11:12:13",
exp_time = 150,
detector_status_id = 3,
filename = "MSC_00001234",
file_path = "/opt/MSC_00001234.fits")
print('write:', rec)
import os
import unittest
from astropy.io import fits
from csst_dfs_api_local.msc.level0prc import Level0PrcApi
class MSCLevel0PrcTestCase(unittest.TestCase):
def setUp(self):
self.api = Level0PrcApi()
def test_find(self):
recs = self.api.find(level0_id='300000055CCD231-c4')
print('find:', recs)
def test_update_proc_status(self):
rec = self.api.update_proc_status(id = 1, status = 4)
print('update_proc_status:', rec)
def test_write(self):
rec = self.api.write(level0_id='300000055CCD231-c4',
pipeline_id = "P1",
prc_module = "QC0",
params_file_path = "/opt/dddasd.params",
prc_status = 3,
prc_time = '2021-06-04 11:12:13',
result_file_path = "/opt/dddasd.header")
print('write:', rec)
\ No newline at end of file
import os
import unittest
from astropy.io import fits
from csst_dfs_api_local.sls.calmerge import CalMergeApi
class SLSCalMergeApiTestCase(unittest.TestCase):
def setUp(self):
self.api = CalMergeApi()
def test_find(self):
recs = self.api.find(detector_no='01',
ref_type = "bias",
obs_time = ("2021-06-01 11:12:13","2021-06-08 11:12:13"))
print('find:', recs)
def test_get_latest_by_l0(self):
rec = self.api.get_latest_by_l0(level0_id='000001301', ref_type = "bias")
print('get:', rec)
def test_get(self):
rec = self.api.get(cal_id='0000231')
print('get:', rec)
def test_update_proc_status(self):
rec = self.api.update_proc_status(id = 100, status = 1)
print('update_proc_status:', rec)
def test_update_qc1_status(self):
rec = self.api.update_qc1_status(id = 100, status = 2)
print('update_qc1_status:', rec)
def test_write(self):
rec = self.api.write(
cal_id='0000231',
detector_no='01',
ref_type = "bias",
obs_time = "2021-06-04 11:12:13",
exp_time = 150,
filename = "/opt/dddasd.params",
file_path = "/opt/dddasd.fits",
prc_status = 3,
prc_time = '2021-06-04 11:12:13',
level0_ids = ['0000231','0000232','0000233','0000234'])
print('write:', rec)
\ No newline at end of file
import unittest
from csst_dfs_api_local.sls import Level0DataApi
class SLSLevel0DataApiTestCase(unittest.TestCase):
def setUp(self):
self.api = Level0DataApi()
def test_find(self):
recs = self.api.find(obs_id = '300000055', obs_type = 'sky', limit = 0)
print('find:', recs)
def test_get(self):
rec = self.api.get(id = 31)
print('get:', rec)
def test_update_proc_status(self):
rec = self.api.update_proc_status(id = 31, status = 6)
print('update_proc_status:', rec)
def test_update_qc0_status(self):
rec = self.api.update_qc0_status(id = 31, status = 7)
print('update_qc0_status:', rec)
def test_write(self):
rec = self.api.write(
obs_id = '0000013',
detector_no = "01",
obs_type = "sky",
obs_time = "2021-06-06 11:12:13",
exp_time = 150,
detector_status_id = 3,
filename = "MSC_00001234",
file_path = "/opt/MSC_00001234.fits")
print('write:', rec)
import os
import unittest
from astropy.io import fits
from csst_dfs_api_local.sls.level0prc import Level0PrcApi
class SLSLevel0PrcTestCase(unittest.TestCase):
def setUp(self):
self.api = Level0PrcApi()
def test_find(self):
recs = self.api.find(level0_id='300000055CCD231-c4')
print('find:', recs)
def test_update_proc_status(self):
rec = self.api.update_proc_status(id = 1, status = 4)
print('update_proc_status:', rec)
def test_write(self):
rec = self.api.write(level0_id='300000055CCD231-c4',
pipeline_id = "P1",
prc_module = "QC0",
params_file_path = "/opt/dddasd.params",
prc_status = 3,
prc_time = '2021-06-04 11:12:13',
result_file_path = "/opt/dddasd.header")
print('write:', rec)
\ No newline at end of file
import unittest
from csst_dfs_api_local.sls import Level1DataApi
class SLSResult1TestCase(unittest.TestCase):
def setUp(self):
self.api = Level1DataApi()
def test_find(self):
recs = self.api.find(
level0_id='0000223',
create_time = ("2021-06-01 11:12:13","2021-06-08 11:12:13")
)
print('find:', recs)
def test_get(self):
rec = self.api.get(id = 1)
print('get:', rec)
def test_update_proc_status(self):
rec = self.api.update_proc_status(id = 1, status = 4)
print('update_proc_status:', rec)
def test_update_qc1_status(self):
rec = self.api.update_qc1_status(id = 1, status = 7)
print('update_qc1_status:', rec)
def test_write(self):
rec = self.api.write(
level0_id='0000223',
data_type = "sci",
prc_params = "/opt/dddasd.params",
prc_status = 3,
prc_time = '2021-06-05 11:12:13',
filename = "dddasd223234.fits",
file_path = "/opt/dddasd23.fits",
pipeline_id = "P2",
refs = {'dark': 1, 'bias': 2, 'flat': 3 })
print('write:', rec)
\ No newline at end of file
import os
import unittest
from astropy.io import fits
from csst_dfs_api_local.sls.level1prc import Level1PrcApi
class SLSLevel1PrcTestCase(unittest.TestCase):
def setUp(self):
self.api = Level1PrcApi()
def test_find(self):
recs = self.api.find(level1_id=1)
print('find:', recs)
def test_update_proc_status(self):
rec = self.api.update_proc_status(id = 1, status = 4)
print('update_proc_status:', rec)
def test_write(self):
rec = self.api.write(level1_id=1,
pipeline_id = "P1",
prc_module = "QC0",
params_file_path = "/opt/dddasd.params",
prc_status = 3,
prc_time = '2021-06-04 11:12:13',
result_file_path = "/opt/dddasd.header")
print('write:', rec)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment