pychemstation 0.7.0.dev2__py3-none-any.whl → 0.8.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. pychemstation/analysis/base_spectrum.py +3 -6
  2. pychemstation/analysis/process_report.py +248 -225
  3. pychemstation/analysis/utils.py +3 -1
  4. pychemstation/control/README.md +124 -0
  5. pychemstation/control/controllers/README.md +1 -0
  6. pychemstation/control/controllers/__init__.py +0 -2
  7. pychemstation/control/controllers/comm.py +27 -20
  8. pychemstation/control/controllers/devices/device.py +17 -4
  9. pychemstation/control/controllers/tables/method.py +57 -39
  10. pychemstation/control/controllers/tables/sequence.py +98 -28
  11. pychemstation/control/controllers/tables/table.py +124 -127
  12. pychemstation/control/hplc.py +82 -37
  13. pychemstation/generated/dad_method.py +3 -3
  14. pychemstation/generated/pump_method.py +7 -7
  15. pychemstation/out.txt +145 -0
  16. pychemstation/tests.ipynb +310 -0
  17. pychemstation/utils/chromatogram.py +5 -1
  18. pychemstation/utils/injector_types.py +2 -2
  19. pychemstation/utils/macro.py +1 -1
  20. pychemstation/utils/table_types.py +3 -0
  21. pychemstation/utils/tray_types.py +59 -39
  22. {pychemstation-0.7.0.dev2.dist-info → pychemstation-0.8.1.dist-info}/METADATA +25 -21
  23. pychemstation-0.8.1.dist-info/RECORD +39 -0
  24. {pychemstation-0.7.0.dev2.dist-info → pychemstation-0.8.1.dist-info}/WHEEL +1 -2
  25. pychemstation/control/comm.py +0 -206
  26. pychemstation/control/controllers/devices/column.py +0 -12
  27. pychemstation/control/controllers/devices/dad.py +0 -0
  28. pychemstation/control/controllers/devices/pump.py +0 -43
  29. pychemstation/control/controllers/method.py +0 -338
  30. pychemstation/control/controllers/sequence.py +0 -190
  31. pychemstation/control/controllers/table_controller.py +0 -266
  32. pychemstation/control/table/__init__.py +0 -3
  33. pychemstation/control/table/method.py +0 -274
  34. pychemstation/control/table/sequence.py +0 -210
  35. pychemstation/control/table/table_controller.py +0 -201
  36. pychemstation-0.7.0.dev2.dist-info/RECORD +0 -58
  37. pychemstation-0.7.0.dev2.dist-info/top_level.txt +0 -2
  38. tests/__init__.py +0 -0
  39. tests/constants.py +0 -88
  40. tests/test_comb.py +0 -136
  41. tests/test_comm.py +0 -65
  42. tests/test_inj.py +0 -39
  43. tests/test_method.py +0 -99
  44. tests/test_nightly.py +0 -80
  45. tests/test_proc_rep.py +0 -52
  46. tests/test_runs_stable.py +0 -125
  47. tests/test_sequence.py +0 -125
  48. tests/test_stable.py +0 -276
  49. {pychemstation-0.7.0.dev2.dist-info → pychemstation-0.8.1.dist-info/licenses}/LICENSE +0 -0
tests/test_comb.py DELETED
@@ -1,136 +0,0 @@
1
- import os
2
-
3
- import unittest
4
-
5
- from pychemstation.control import HPLCController
6
- from tests.constants import *
7
-
8
- run_too = True
9
-
10
-
11
- class TestCombinations(unittest.TestCase):
12
- def setUp(self):
13
- path_constants = room(242)
14
- for path in path_constants:
15
- if not os.path.exists(path):
16
- self.fail(
17
- f"{path} does not exist on your system. If you would like to run tests, please change this path.")
18
-
19
- self.hplc_controller = HPLCController(comm_dir=path_constants[0],
20
- method_dir=path_constants[1],
21
- data_dir=path_constants[2],
22
- sequence_dir=path_constants[3])
23
-
24
- def test_run_method_after_update(self):
25
- try:
26
- self.hplc_controller.method_controller.switch(DEFAULT_METHOD)
27
- rand_method = MethodDetails(
28
- params=HPLCMethodParams(organic_modifier=5,
29
- flow=0.65),
30
- timetable=[TimeTableEntry(start_time=3.5,
31
- organic_modifer=100,
32
- flow=0.65)],
33
- name=DEFAULT_METHOD,
34
- stop_time=10,
35
- post_time=9)
36
- self.hplc_controller.edit_method(rand_method, save=True)
37
- if run_too:
38
- self.hplc_controller.run_method(experiment_name="changed_method")
39
- chrom = self.hplc_controller.get_last_run_method_data()
40
- self.assertEqual(len(chrom.__dict__), 8)
41
- except Exception as e:
42
- self.fail(f"Should have not failed: {e}")
43
-
44
- def test_run_after_table_edit(self):
45
- try:
46
- self.hplc_controller.switch_sequence(sequence_name=DEFAULT_SEQUENCE)
47
- seq_table = self.hplc_controller.load_sequence()
48
- seq_table.rows.append(SequenceEntry(
49
- vial_location=TenVialColumn.ONE,
50
- method=DEFAULT_METHOD,
51
- num_inj=3,
52
- inj_vol=4,
53
- sample_name="Sampel1",
54
- sample_type=SampleType.SAMPLE,
55
- ))
56
- seq_table.rows[0] = SequenceEntry(
57
- vial_location=TenVialColumn.ONE,
58
- method=DEFAULT_METHOD,
59
- num_inj=3,
60
- inj_vol=4,
61
- sample_name="Sampel2",
62
- sample_type=SampleType.SAMPLE)
63
- self.hplc_controller.edit_sequence(seq_table)
64
- if run_too:
65
- self.hplc_controller.run_sequence()
66
- chrom = self.hplc_controller.get_last_run_sequence_data()
67
- self.assertTrue(len(chrom) == 2)
68
- except Exception as e:
69
- self.fail("Failed")
70
-
71
- def test_run_after_existing_row_edit(self):
72
- try:
73
- self.hplc_controller.switch_sequence(sequence_name=DEFAULT_SEQUENCE)
74
- seq_table = self.hplc_controller.load_sequence()
75
- self.hplc_controller.edit_sequence_row(seq_entry, 1)
76
- if run_too:
77
- self.hplc_controller.run_sequence()
78
- chrom = self.hplc_controller.get_last_run_sequence_data()
79
- self.assertTrue(len(chrom) == 2)
80
- except Exception:
81
- self.fail("Failed")
82
-
83
- def test_update_method_update_seq_table_run(self):
84
- try:
85
- self.hplc_controller.method_controller.switch(DEFAULT_METHOD)
86
- rand_method = MethodDetails(
87
- name=DEFAULT_METHOD,
88
- params=HPLCMethodParams(
89
- organic_modifier=5,
90
- flow=0.65),
91
- timetable=[TimeTableEntry(
92
- start_time=0.50,
93
- organic_modifer=99,
94
- flow=0.34)],
95
- stop_time=10,
96
- post_time=5)
97
- self.hplc_controller.edit_method(rand_method, save=True)
98
-
99
- self.hplc_controller.switch_sequence(sequence_name=DEFAULT_SEQUENCE)
100
- seq_table = SequenceTable(
101
- name=DEFAULT_SEQUENCE,
102
- rows=[SequenceEntry(
103
- vial_location=8320,
104
- sample_name="WM-01-001_Cr-Org",
105
- method=DEFAULT_METHOD,
106
- inj_source=InjectionSource.HIP_ALS,
107
- inj_vol=2,
108
- num_inj=1,
109
- sample_type=SampleType.SAMPLE
110
- ), SequenceEntry(
111
- vial_location=8448,
112
- sample_name="WM-01-001_Cr-Aq",
113
- method=DEFAULT_METHOD,
114
- inj_source=InjectionSource.HIP_ALS,
115
- inj_vol=2,
116
- num_inj=1,
117
- sample_type=SampleType.SAMPLE)])
118
-
119
- self.hplc_controller.edit_sequence(seq_table)
120
- if run_too:
121
- self.hplc_controller.preprun()
122
- self.hplc_controller.run_sequence()
123
- chrom = self.hplc_controller.get_last_run_sequence_data()
124
- self.assertTrue(len(chrom) == 2)
125
- except Exception:
126
- self.fail("Failed")
127
-
128
- def test_run_sequence(self):
129
- try:
130
- self.hplc_controller.switch_sequence(sequence_name=DEFAULT_SEQUENCE)
131
- self.hplc_controller.preprun()
132
- self.hplc_controller.run_sequence()
133
- chrom = self.hplc_controller.get_last_run_sequence_data()
134
- self.assertTrue(len(chrom) == 1)
135
- except Exception:
136
- self.fail("Failed")
tests/test_comm.py DELETED
@@ -1,65 +0,0 @@
1
- import os
2
-
3
- import unittest
4
-
5
- from pychemstation.control import HPLCController
6
- from pychemstation.utils.macro import *
7
- from tests.constants import *
8
-
9
-
10
- class TestComm(unittest.TestCase):
11
-
12
- def setUp(self):
13
- path_constants = room(242)
14
- for path in path_constants:
15
- if not os.path.exists(path):
16
- self.fail(
17
- f"{path} does not exist on your system. If you would like to run tests, please change this path.")
18
-
19
- self.hplc_controller = HPLCController(comm_dir=path_constants[0],
20
- method_dir=path_constants[1],
21
- data_dir=path_constants[2],
22
- sequence_dir=path_constants[3])
23
-
24
- def test_status_check_standby(self):
25
- self.hplc_controller.standby()
26
- self.assertTrue(self.hplc_controller.status() in [HPLCAvailStatus.STANDBY, HPLCRunningStatus.NOTREADY])
27
-
28
- def test_status_check_preprun(self):
29
- self.hplc_controller.preprun()
30
- self.assertTrue(self.hplc_controller.status() in [HPLCAvailStatus.PRERUN, HPLCAvailStatus.STANDBY,
31
- HPLCRunningStatus.NOTREADY])
32
-
33
- def test_send_command(self):
34
- try:
35
- self.hplc_controller.send(Command.GET_METHOD_CMD)
36
- except Exception as e:
37
- self.fail(f"Should not throw error: {e}")
38
-
39
- def test_send_str(self):
40
- try:
41
- self.hplc_controller.send("Local TestNum")
42
- self.hplc_controller.send("TestNum = 0")
43
- self.hplc_controller.send("Print TestNum")
44
- self.hplc_controller.send("response_num = TestNum")
45
- self.hplc_controller.send("Print response_num")
46
- except Exception as e:
47
- self.fail(f"Should not throw error: {e}")
48
-
49
- def test_get_num(self):
50
- try:
51
- self.hplc_controller.send("response_num = 10")
52
- res = self.hplc_controller.receive().num_response
53
- self.assertEqual(res, 10)
54
- except Exception as e:
55
- self.fail(f"Should not throw error: {e}")
56
-
57
- def test_get_response(self):
58
- try:
59
- self.hplc_controller.switch_method(method_name=DEFAULT_METHOD)
60
- self.hplc_controller.send(Command.GET_METHOD_CMD)
61
- res = self.hplc_controller.receive()
62
- self.assertTrue(DEFAULT_METHOD in res.string_response)
63
- except Exception as e:
64
- self.fail(f"Should not throw error: {e}")
65
-
tests/test_inj.py DELETED
@@ -1,39 +0,0 @@
1
- import os
2
- import unittest
3
-
4
- from pychemstation.control import HPLCController
5
- from pychemstation.utils.tray_types import FiftyFourVialPlate, Letter, Plate, Num
6
- from tests.constants import *
7
-
8
- offline = True
9
-
10
-
11
- class TestInj(unittest.TestCase):
12
- def setUp(self):
13
- path_constants = room(254)
14
- for path in path_constants:
15
- if not offline and not os.path.exists(path):
16
- self.fail(
17
- f"{path} does not exist on your system. If you would like to run tests, please change this path.")
18
-
19
- self.hplc_controller = HPLCController(offline=offline,
20
- comm_dir=path_constants[0],
21
- method_dir=path_constants[1],
22
- data_dir=path_constants[2],
23
- sequence_dir=path_constants[3])
24
- if not offline:
25
- self.hplc_controller.switch_method(DEFAULT_METHOD)
26
-
27
- def test_load_inj(self):
28
- try:
29
- inj_table = self.hplc_controller.load_injector_program()
30
- self.assertTrue(len(inj_table.functions) == 2)
31
- except Exception as e:
32
- self.fail(f"Should have not failed, {e}")
33
-
34
- def test_plate_number(self):
35
- self.assertEqual(4096, FiftyFourVialPlate(plate=Plate.ONE, letter=Letter.A, num=Num.FOUR).value())
36
-
37
-
38
- if __name__ == '__main__':
39
- unittest.main()
tests/test_method.py DELETED
@@ -1,99 +0,0 @@
1
- import os
2
- import unittest
3
-
4
- from pychemstation.control import HPLCController
5
- from tests.constants import *
6
-
7
-
8
- class TestMethod(unittest.TestCase):
9
- def setUp(self):
10
- path_constants = room(254)
11
- for path in path_constants:
12
- if not os.path.exists(path):
13
- self.fail(
14
- f"{path} does not exist on your system. If you would like to run tests, please change this path.")
15
-
16
- self.hplc_controller = HPLCController(comm_dir=path_constants[0],
17
- method_dir=path_constants[1],
18
- data_dir=path_constants[2],
19
- sequence_dir=path_constants[3])
20
-
21
- def test_load_method_from_disk(self):
22
- self.hplc_controller.switch_method(DEFAULT_METHOD)
23
- try:
24
- gp_mtd = self.hplc_controller.method_controller.load_from_disk(DEFAULT_METHOD)
25
- self.assertTrue(gp_mtd.first_row.organic_modifier == 5)
26
- except Exception as e:
27
- self.fail(f"Should have not failed, {e}")
28
-
29
- def test_edit_method(self):
30
- self.hplc_controller.method_controller.switch(DEFAULT_METHOD)
31
- new_method = MethodDetails(name=DEFAULT_METHOD,
32
- timetable=[TimeTableEntry(start_time=1,
33
- organic_modifer=20,
34
- flow=0.65),
35
- TimeTableEntry(start_time=2,
36
- organic_modifer=30,
37
- flow=0.65),
38
- TimeTableEntry(start_time=2.5,
39
- organic_modifer=60,
40
- flow=0.65),
41
- TimeTableEntry(start_time=3,
42
- organic_modifer=80,
43
- flow=0.65),
44
- TimeTableEntry(start_time=3.5,
45
- organic_modifer=100,
46
- flow=0.65)],
47
- stop_time=4,
48
- post_time=1,
49
- params=HPLCMethodParams(organic_modifier=5, flow=0.65))
50
- try:
51
- self.hplc_controller.edit_method(new_method)
52
- except Exception as e:
53
- self.fail(f"Should have not failed: {e}")
54
-
55
- def test_load_method(self):
56
- self.hplc_controller.method_controller.switch(DEFAULT_METHOD)
57
- new_method = gen_rand_method()
58
- try:
59
- self.hplc_controller.edit_method(new_method)
60
- loaded_method = self.hplc_controller.load_method()
61
- self.assertEqual(new_method.params.organic_modifier,
62
- loaded_method.params.organic_modifier)
63
- self.assertEqual(new_method.timetable[0].organic_modifer,
64
- loaded_method.timetable[0].organic_modifer)
65
- self.assertEqual(round(new_method.params.flow, 2),
66
- round(loaded_method.params.flow, 2))
67
- except Exception as e:
68
- self.fail(f"Should have not failed: {e}")
69
-
70
- def test_run_method(self):
71
- try:
72
- self.hplc_controller.run_method(experiment_name="test_experiment")
73
- chrom = self.hplc_controller.get_last_run_method_data()
74
- except Exception as e:
75
- self.fail(f"Should have not failed: {e}")
76
-
77
- def test_run_10_times(self):
78
- self.hplc_controller.method_controller.switch(DEFAULT_METHOD)
79
- rand_method = MethodDetails(
80
- name=DEFAULT_METHOD,
81
- params=HPLCMethodParams(
82
- organic_modifier=5,
83
- flow=0.65),
84
- timetable=[TimeTableEntry(
85
- start_time=0.50,
86
- organic_modifer=99,
87
- flow=0.65)],
88
- stop_time=1,
89
- post_time=0)
90
- self.hplc_controller.edit_method(rand_method, save=True)
91
- try:
92
- for _ in range(10):
93
- self.hplc_controller.run_method(experiment_name="limiting_testing")
94
- except Exception as e:
95
- self.fail(f"Should have not failed: {e}")
96
-
97
-
98
- if __name__ == '__main__':
99
- unittest.main()
tests/test_nightly.py DELETED
@@ -1,80 +0,0 @@
1
- import unittest
2
-
3
- from pluggy import Result
4
-
5
- from pychemstation.analysis.process_report import process_csv_report
6
- from pychemstation.utils.tray_types import FiftyFourVialPlate, Letter, Plate, Num
7
- from tests.constants import *
8
-
9
- offline = True
10
-
11
-
12
- class TestNightly(unittest.TestCase):
13
- def setUp(self):
14
- path_constants = room(254)
15
- for path in path_constants:
16
- if not offline and not os.path.exists(path):
17
- self.fail(
18
- f"{path} does not exist on your system. If you would like to run tests, please change this path.")
19
-
20
- self.hplc_controller = HPLCController(offline=offline,
21
- comm_dir=path_constants[0],
22
- method_dir=path_constants[1],
23
- data_dir=path_constants[2],
24
- sequence_dir=path_constants[3])
25
- if not offline:
26
- self.hplc_controller.switch_method(DEFAULT_METHOD)
27
-
28
- def test_load_inj(self):
29
- try:
30
- inj_table = self.hplc_controller.load_injector_program()
31
- self.assertTrue(len(inj_table.functions) == 2)
32
- except Exception as e:
33
- self.fail(f"Should have not failed, {e}")
34
-
35
- def test_plate_number(self):
36
- self.assertEqual(4096, FiftyFourVialPlate(plate=Plate.ONE, letter=Letter.A, num=Num.FOUR).value())
37
-
38
- def test_build_peak_regex(self):
39
- try:
40
- # TODO
41
- print('yes')
42
- except Exception as e:
43
- self.fail(f"Should have not failed, {e}")
44
-
45
- def test_parse_area_report(self):
46
- try:
47
- # TODO
48
- print('yes')
49
- except Exception as e:
50
- self.fail(f"Should have not failed, {e}")
51
-
52
- def test_process_export_report(self):
53
- try:
54
- import pandas as pd
55
-
56
- file_path = "/Users/lucyhao/Codes/pychemstation/tests/0_2025-03-15 19-14-35.D/Report00.CSV"
57
- df = pd.read_csv(file_path, encoding="utf-16")
58
-
59
- # Print the first column
60
- print(df)
61
- except Exception as e:
62
- self.fail(f"Should have not failed, {e}")
63
-
64
- def test_process_folder(self):
65
- try:
66
- # TODO
67
- print('yes')
68
- except Exception as e:
69
- self.fail(f"Should have not failed, {e}")
70
-
71
- def test_report_csv(self):
72
- try:
73
- report: Result = process_csv_report(folder_path="0_2025-03-15 19-14-35.D")
74
- print(report)
75
- except Exception as e:
76
- self.fail(f"Should have not failed: {e}")
77
-
78
-
79
- if __name__ == '__main__':
80
- unittest.main()
tests/test_proc_rep.py DELETED
@@ -1,52 +0,0 @@
1
- import unittest
2
-
3
- from result import Result
4
-
5
- from pychemstation.analysis.process_report import process_csv_report
6
-
7
-
8
- class TestReport(unittest.TestCase):
9
-
10
- def test_build_peak_regex(self):
11
- try:
12
- # TODO
13
- print('yes')
14
- except Exception as e:
15
- self.fail(f"Should have not failed, {e}")
16
-
17
- def test_parse_area_report(self):
18
- try:
19
- # TODO
20
- print('yes')
21
- except Exception as e:
22
- self.fail(f"Should have not failed, {e}")
23
-
24
- def test_process_export_report(self):
25
- try:
26
- import pandas as pd
27
-
28
- file_path = "/Users/lucyhao/Codes/pychemstation/tests/0_2025-03-15 19-14-35.D/Report00.CSV"
29
- df = pd.read_csv(file_path, encoding="utf-16")
30
-
31
- # Print the first column
32
- print(df)
33
- except Exception as e:
34
- self.fail(f"Should have not failed, {e}")
35
-
36
- def test_process_folder(self):
37
- try:
38
- # TODO
39
- print('yes')
40
- except Exception as e:
41
- self.fail(f"Should have not failed, {e}")
42
-
43
- def test_report_csv(self):
44
- try:
45
- report: Result = process_csv_report(folder_path="0_2025-03-15 19-14-35.D")
46
- print(report)
47
- except Exception as e:
48
- self.fail(f"Should have not failed: {e}")
49
-
50
-
51
- if __name__ == '__main__':
52
- unittest.main()
tests/test_runs_stable.py DELETED
@@ -1,125 +0,0 @@
1
- import unittest
2
-
3
- from pychemstation.utils.tray_types import FiftyFourVialPlate, Plate, Letter, Num
4
- from tests.constants import *
5
-
6
- run_too = True
7
-
8
-
9
- class TestRunsStable(unittest.TestCase):
10
- def setUp(self):
11
- self.hplc_controller = set_up_utils(242)
12
-
13
- def test_run_method(self):
14
- try:
15
- self.hplc_controller.run_method(experiment_name="test_experiment")
16
- chrom = self.hplc_controller.get_last_run_method_data()
17
- except Exception as e:
18
- self.fail(f"Should have not failed: {e}")
19
-
20
- def test_run_10_times(self):
21
- self.hplc_controller.method_controller.switch(DEFAULT_METHOD)
22
- rand_method = MethodDetails(
23
- name=DEFAULT_METHOD,
24
- params=HPLCMethodParams(
25
- organic_modifier=5,
26
- flow=0.65),
27
- timetable=[TimeTableEntry(
28
- start_time=0.50,
29
- organic_modifer=99,
30
- flow=0.65)],
31
- stop_time=1,
32
- post_time=0)
33
- self.hplc_controller.edit_method(rand_method, save=True)
34
- try:
35
- for _ in range(10):
36
- self.hplc_controller.run_method(experiment_name="limiting_testing")
37
- except Exception as e:
38
- self.fail(f"Should have not failed: {e}")
39
-
40
- def test_update_method_update_seq_table_run(self):
41
- try:
42
- loc = FiftyFourVialPlate(plate=Plate.ONE, letter=Letter.F, num=Num.TWO)
43
- self.hplc_controller.switch_sequence(sequence_name=DEFAULT_SEQUENCE)
44
- seq_table = SequenceTable(
45
- name=DEFAULT_SEQUENCE,
46
- rows=[SequenceEntry(
47
- vial_location=loc,
48
- sample_name="run seq with new method",
49
- method=DEFAULT_METHOD,
50
- inj_source=InjectionSource.HIP_ALS,
51
- inj_vol=0.5,
52
- num_inj=1,
53
- sample_type=SampleType.SAMPLE
54
- )])
55
- self.hplc_controller.edit_sequence(seq_table) # nvm no bug??
56
-
57
- self.hplc_controller.method_controller.switch(DEFAULT_METHOD)
58
- rand_method = MethodDetails(
59
- name=DEFAULT_METHOD,
60
- params=HPLCMethodParams(
61
- organic_modifier=5,
62
- flow=0.65),
63
- timetable=[TimeTableEntry(
64
- start_time=random.randint(1, 3) + 0.50,
65
- organic_modifer=100,
66
- flow=0.65)],
67
- stop_time=random.randint(4, 6),
68
- post_time=1)
69
- self.hplc_controller.edit_method(rand_method, save=True)
70
- if run_too:
71
- self.hplc_controller.preprun()
72
- self.hplc_controller.run_sequence()
73
- chrom = self.hplc_controller.get_last_run_sequence_data()
74
- # report = process_csv_report(self.hplc_controller.sequence_controller.data_files[-1].child_dirs[-1])
75
- # self.assertEqual(loc, report.ok_value.vial_location)
76
- except Exception:
77
- self.fail("Failed")
78
-
79
- def test_run_sequence(self):
80
- try:
81
- self.hplc_controller.switch_sequence(sequence_name=DEFAULT_SEQUENCE)
82
- seq_table = SequenceTable(
83
- name=DEFAULT_SEQUENCE,
84
- rows=[SequenceEntry(vial_location=FiftyFourVialPlate(plate=Plate.ONE, letter=Letter.A, num=Num.ONE),
85
- sample_name="P1-A1",
86
- method=DEFAULT_METHOD,
87
- inj_source=InjectionSource.HIP_ALS,
88
- inj_vol=0.5,
89
- num_inj=1,
90
- sample_type=SampleType.SAMPLE),
91
- SequenceEntry(vial_location=FiftyFourVialPlate(plate=Plate.ONE, letter=Letter.A, num=Num.TWO),
92
- sample_name="P1-A2",
93
- method=DEFAULT_METHOD,
94
- inj_source=InjectionSource.HIP_ALS,
95
- inj_vol=0.5,
96
- num_inj=1,
97
- sample_type=SampleType.SAMPLE),
98
- SequenceEntry(vial_location=FiftyFourVialPlate(plate=Plate.ONE, letter=Letter.A, num=Num.THREE),
99
- sample_name="P1-A3",
100
- method=DEFAULT_METHOD,
101
- inj_source=InjectionSource.HIP_ALS,
102
- inj_vol=0.5,
103
- num_inj=1,
104
- sample_type=SampleType.SAMPLE)])
105
- self.hplc_controller.edit_sequence(seq_table)
106
- self.hplc_controller.switch_method(method_name=DEFAULT_METHOD)
107
- method = MethodDetails(
108
- name=DEFAULT_METHOD,
109
- params=HPLCMethodParams(
110
- organic_modifier=5,
111
- flow=0.65),
112
- timetable=[TimeTableEntry(
113
- start_time=3.50,
114
- organic_modifer=100,
115
- flow=0.65)],
116
- stop_time=5,
117
- post_time=1)
118
- self.hplc_controller.edit_method(method)
119
- self.hplc_controller.preprun()
120
- self.hplc_controller.run_sequence()
121
- chroms = self.hplc_controller.get_last_run_sequence_data()
122
- self.assertTrue(len(chroms) == 3)
123
- except Exception:
124
- self.fail("Failed")
125
-