pychemstation 0.10.3__py3-none-any.whl → 0.10.5__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 (31) hide show
  1. pychemstation/__init__.py +1 -1
  2. pychemstation/analysis/__init__.py +1 -6
  3. pychemstation/analysis/base_spectrum.py +7 -7
  4. pychemstation/{utils → analysis}/chromatogram.py +24 -4
  5. pychemstation/analysis/process_report.py +189 -90
  6. pychemstation/control/__init__.py +5 -2
  7. pychemstation/control/controllers/__init__.py +2 -7
  8. pychemstation/control/controllers/comm.py +56 -32
  9. pychemstation/control/controllers/devices/device.py +59 -24
  10. pychemstation/control/controllers/devices/injector.py +33 -10
  11. pychemstation/control/controllers/tables/__init__.py +4 -0
  12. pychemstation/control/controllers/tables/method.py +241 -151
  13. pychemstation/control/controllers/tables/sequence.py +226 -107
  14. pychemstation/control/controllers/tables/table.py +216 -132
  15. pychemstation/control/hplc.py +89 -75
  16. pychemstation/generated/__init__.py +0 -2
  17. pychemstation/generated/pump_method.py +15 -19
  18. pychemstation/utils/injector_types.py +1 -1
  19. pychemstation/utils/macro.py +11 -10
  20. pychemstation/utils/method_types.py +2 -1
  21. pychemstation/utils/parsing.py +0 -11
  22. pychemstation/utils/sequence_types.py +2 -3
  23. pychemstation/utils/spec_utils.py +2 -3
  24. pychemstation/utils/table_types.py +10 -9
  25. pychemstation/utils/tray_types.py +45 -36
  26. {pychemstation-0.10.3.dist-info → pychemstation-0.10.5.dist-info}/METADATA +5 -4
  27. pychemstation-0.10.5.dist-info/RECORD +36 -0
  28. pychemstation/control/controllers/tables/ms.py +0 -21
  29. pychemstation-0.10.3.dist-info/RECORD +0 -37
  30. {pychemstation-0.10.3.dist-info → pychemstation-0.10.5.dist-info}/WHEEL +0 -0
  31. {pychemstation-0.10.3.dist-info → pychemstation-0.10.5.dist-info}/licenses/LICENSE +0 -0
@@ -19,16 +19,16 @@ class Num(Enum):
19
19
  @classmethod
20
20
  def from_num(cls, num: int):
21
21
  num_mapping = {
22
- 1: Num.ONE,
23
- 2: Num.TWO,
24
- 3: Num.THREE,
25
- 4: Num.FOUR,
26
- 5: Num.FIVE,
27
- 6: Num.SIX,
28
- 7: Num.SEVEN,
29
- 8: Num.EIGHT,
30
- 9: Num.NINE
31
- }
22
+ 1: Num.ONE,
23
+ 2: Num.TWO,
24
+ 3: Num.THREE,
25
+ 4: Num.FOUR,
26
+ 5: Num.FIVE,
27
+ 6: Num.SIX,
28
+ 7: Num.SEVEN,
29
+ 8: Num.EIGHT,
30
+ 9: Num.NINE,
31
+ }
32
32
 
33
33
  if num in num_mapping:
34
34
  return num_mapping[num]
@@ -58,13 +58,13 @@ class Letter(Enum):
58
58
  @classmethod
59
59
  def from_str(cls, let: str) -> Letter:
60
60
  letter_mapping = {
61
- "A": Letter.A,
62
- "B": Letter.B,
63
- "C": Letter.C,
64
- "D": Letter.D,
65
- "E": Letter.E,
66
- "F": Letter.F
67
- }
61
+ "A": Letter.A,
62
+ "B": Letter.B,
63
+ "C": Letter.C,
64
+ "D": Letter.D,
65
+ "E": Letter.E,
66
+ "F": Letter.F,
67
+ }
68
68
 
69
69
  if let in letter_mapping:
70
70
  return letter_mapping[let]
@@ -83,6 +83,7 @@ class FiftyFourVialPlate:
83
83
  valid vial locations: P1-A2, P2-F9
84
84
  invalid vial locations: P3-A1, P1-Z3, P2-B10
85
85
  """
86
+
86
87
  plate: Plate
87
88
  letter: Letter
88
89
  num: Num
@@ -100,16 +101,22 @@ class FiftyFourVialPlate:
100
101
  :raises: ValueError if string is invalid tray location
101
102
  """
102
103
  if len(loc) != 5:
103
- raise ValueError("Plate locations must be PX-LY, where X is either 1 or 2 and Y is 1 to 9")
104
+ raise ValueError(
105
+ "Plate locations must be PX-LY, where X is either 1 or 2 and Y is 1 to 9"
106
+ )
104
107
  try:
105
108
  plate = int(loc[1])
106
109
  letter = loc[3]
107
110
  num = int(loc[4])
108
- return FiftyFourVialPlate(plate=Plate.from_num(plate),
109
- letter=Letter.from_str(letter),
110
- num=Num.from_num(num))
111
- except Exception as e:
112
- raise ValueError("Plate locations must be PX-LY, where X is either 1 or 2 and Y is 1 to 9")
111
+ return FiftyFourVialPlate(
112
+ plate=Plate.from_num(plate),
113
+ letter=Letter.from_str(letter),
114
+ num=Num.from_num(num),
115
+ )
116
+ except Exception:
117
+ raise ValueError(
118
+ "Plate locations must be PX-LY, where X is either 1 or 2 and Y is 1 to 9"
119
+ )
113
120
 
114
121
  @classmethod
115
122
  def from_int(cls, num: int) -> Tray:
@@ -125,19 +132,19 @@ class FiftyFourVialPlate:
125
132
 
126
133
  row_starts = [
127
134
  # plate 1
128
- FiftyFourVialPlate.from_str('P1-F1'),
129
- FiftyFourVialPlate.from_str('P1-E1'),
130
- FiftyFourVialPlate.from_str('P1-D1'),
131
- FiftyFourVialPlate.from_str('P1-C1'),
132
- FiftyFourVialPlate.from_str('P1-B1'),
133
- FiftyFourVialPlate.from_str('P1-A1'),
135
+ FiftyFourVialPlate.from_str("P1-F1"),
136
+ FiftyFourVialPlate.from_str("P1-E1"),
137
+ FiftyFourVialPlate.from_str("P1-D1"),
138
+ FiftyFourVialPlate.from_str("P1-C1"),
139
+ FiftyFourVialPlate.from_str("P1-B1"),
140
+ FiftyFourVialPlate.from_str("P1-A1"),
134
141
  # plate 2
135
- FiftyFourVialPlate.from_str('P2-F1'),
136
- FiftyFourVialPlate.from_str('P2-E1'),
137
- FiftyFourVialPlate.from_str('P2-D1'),
138
- FiftyFourVialPlate.from_str('P2-C1'),
139
- FiftyFourVialPlate.from_str('P2-B1'),
140
- FiftyFourVialPlate.from_str('P2-A1'),
142
+ FiftyFourVialPlate.from_str("P2-F1"),
143
+ FiftyFourVialPlate.from_str("P2-E1"),
144
+ FiftyFourVialPlate.from_str("P2-D1"),
145
+ FiftyFourVialPlate.from_str("P2-C1"),
146
+ FiftyFourVialPlate.from_str("P2-B1"),
147
+ FiftyFourVialPlate.from_str("P2-A1"),
141
148
  ]
142
149
 
143
150
  # find which row
@@ -161,7 +168,8 @@ class FiftyFourVialPlate:
161
168
  return FiftyFourVialPlate(
162
169
  plate=starting_loc.plate,
163
170
  letter=starting_loc.letter,
164
- num=Num.from_num(i))
171
+ num=Num.from_num(i),
172
+ )
165
173
  raise ValueError("Number didn't match any location. " + str(num))
166
174
 
167
175
 
@@ -169,6 +177,7 @@ class TenVialColumn(Enum):
169
177
  """
170
178
  Class to represent the 10 vial locations.
171
179
  """
180
+
172
181
  ONE = 1
173
182
  TWO = 2
174
183
  THREE = 3
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pychemstation
3
- Version: 0.10.3
3
+ Version: 0.10.5
4
4
  Summary: Library to interact with Chemstation software, primarily used in Hein lab
5
5
  Project-URL: Documentation, https://pychemstation-e5a086.gitlab.io/pychemstation.html
6
6
  Project-URL: Repository, https://gitlab.com/heingroup/device-api/pychemstation
@@ -12,12 +12,13 @@ Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Requires-Python: >=3.10
15
- Requires-Dist: aghplctools>=4.8.8
15
+ Requires-Dist: aghplctools==4.8.6
16
16
  Requires-Dist: coverage>=7.6.1
17
17
  Requires-Dist: matplotlib>=3.7.5
18
18
  Requires-Dist: pandas>=2.0.3
19
19
  Requires-Dist: pdoc>=14.7.0
20
20
  Requires-Dist: polling>=0.3.2
21
+ Requires-Dist: pre-commit>=4.2.0
21
22
  Requires-Dist: pytest>=7.3.5
22
23
  Requires-Dist: rainbow-api>=1.0.10
23
24
  Requires-Dist: result>=0.17.0
@@ -34,8 +35,8 @@ Description-Content-Type: text/markdown
34
35
 
35
36
  [![PyPI Latest Release](https://img.shields.io/pypi/v/pychemstation.svg)](https://pypi.org/project/pychemstation/)
36
37
 
37
- > **_NOTE:_** If you are running Python **3.8**, use versions 0.**8**.x. If you are running Python **>=3.10**, use
38
- > version 0.**10**.x. You are welcome to use newer pychemstation versions with older Python versions, but functionality
38
+ > **_NOTE:_** If you are running Python **3.8**, use versions 0.**8**.x. If you are running Python **3.9** use versions 0.**9**.x.
39
+ > If you are running Python **>=3.10**, use version 0.**10**.x. You are welcome to use newer pychemstation versions with older Python versions, but functionality
39
40
  > is not guaranteed!
40
41
 
41
42
  Unofficial Python package to control Agilent Chemstation; we are not affiliated with Agilent.
@@ -0,0 +1,36 @@
1
+ pychemstation/__init__.py,sha256=Sc4z8LRVFMwJUoc_DPVUriSXTZ6PO9MaJ80PhRbKyB8,34
2
+ pychemstation/analysis/__init__.py,sha256=dcX7OeHoKdyrECHRCSXgKZN81nOXSAmZRxXzRT0jpDc,126
3
+ pychemstation/analysis/base_spectrum.py,sha256=t_VoxAtBph1V7S4fOsziERHiOBkYP0_nH7LTwbTEvcE,16529
4
+ pychemstation/analysis/chromatogram.py,sha256=cHxPd5-miA6L3FjwN5cSFyq4xEeZoHWFFk8gU6tCgg4,3946
5
+ pychemstation/analysis/process_report.py,sha256=xckcpqnYfzFTIo1nhgwP5A4GPJsW3PQ_qzuy5Z1KOuI,14714
6
+ pychemstation/control/README.md,sha256=_7ITj4hD17YIwci6UY6xBebC9gPCBpzBFTB_Gx0eJBc,3124
7
+ pychemstation/control/__init__.py,sha256=7lSkY7Qa7Ikdz82-2FESc_oqktv7JndsjltCkiMqnMI,147
8
+ pychemstation/control/hplc.py,sha256=H6ilH0e3vhk0B6ZFi8ecomKSi144Qw-TLRwyL7XFB-o,12356
9
+ pychemstation/control/controllers/README.md,sha256=S5cd4NJmPjs6TUH98BtPJJhiS1Lu-mxLCNS786ogOrQ,32
10
+ pychemstation/control/controllers/__init__.py,sha256=GFVjjLxPL-FoRHxijdIkHggYvBqIQrnXaoGZgjuArdo,144
11
+ pychemstation/control/controllers/comm.py,sha256=XgEECwlrUMHaZoHSqbYqaA5Kkoy5RRRnyoI6Mv64DWM,8571
12
+ pychemstation/control/controllers/devices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ pychemstation/control/controllers/devices/device.py,sha256=ObcPeHFu4siRtt-XHllDgLruR1o8zWv1Gy0ar5bYgO4,2375
14
+ pychemstation/control/controllers/devices/injector.py,sha256=97xzayu0doxwtdfCgq-VI9rIHkZuGw65X1-JjIGQeFg,2798
15
+ pychemstation/control/controllers/tables/__init__.py,sha256=w-Zgbit10niOQfz780ZmRHjUFxV1hMkdui7fOMPqeLA,132
16
+ pychemstation/control/controllers/tables/method.py,sha256=8fwGcm8QRpayLnQ5q3Iyg2aaWWBY4SFT7_ZfJIxigZs,18208
17
+ pychemstation/control/controllers/tables/sequence.py,sha256=_u3YY2OrYub7jGvqRds5dmjqCB9pnWqTOI71MuGSMB0,15759
18
+ pychemstation/control/controllers/tables/table.py,sha256=qWjkh1S42FdUoN4PKgYg0yvar86QPDze9QRX_iHE6rk,13853
19
+ pychemstation/generated/__init__.py,sha256=xnEs0QTjeuGYO3tVUIy8GDo95GqTV1peEjosGckpOu0,977
20
+ pychemstation/generated/dad_method.py,sha256=xTUiSCvkXcxBUhjVm1YZKu-tHs16k23pF-0xYrQSwWA,8408
21
+ pychemstation/generated/pump_method.py,sha256=s3MckKDw2-nZUC5lHrJVvXYdneWP8-9UvblNuGryPHY,12092
22
+ pychemstation/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ pychemstation/utils/injector_types.py,sha256=lGgBZhWdh93hwYT4N9LLQuZXu4Xcuc3j0RDBzOWg8P8,836
24
+ pychemstation/utils/macro.py,sha256=Y_0CwTHcDQKoxYrNHqdF14-ciwtx56Y65SzNtOFPhNk,2848
25
+ pychemstation/utils/method_types.py,sha256=_2djFz_uWFc9aoZcyPMIjC5KYBs003WPoQGx7ZhMiOg,1649
26
+ pychemstation/utils/num_utils.py,sha256=dDs8sLZ_SdtvDKhyhF3IkljiVf16IYqpMTO5tEk9vMk,2079
27
+ pychemstation/utils/parsing.py,sha256=mzdpxrH5ux4-_i4CwZvnIYnIwAnRnOptKb3fZyYJcx0,9307
28
+ pychemstation/utils/pump_types.py,sha256=HWQHxscGn19NTrfYBwQRCO2VcYfwyko7YfBO5uDhEm4,93
29
+ pychemstation/utils/sequence_types.py,sha256=T0IP2iMqorUrdzH4at9Vsmmb3SCAEmN4z1cUlFaeTXw,1089
30
+ pychemstation/utils/spec_utils.py,sha256=lS27Xi4mFNDWBfmBqOoxTcVchPAkLK2mSdoaWDOfaPI,10211
31
+ pychemstation/utils/table_types.py,sha256=inOVpwSsic31VdVdJkfuq35QfKd7PoNoXY1QnOxZ6Sw,3235
32
+ pychemstation/utils/tray_types.py,sha256=9yLRIBn3IPVMbhrFqJQJ5gCQJI7H9DD2cdIFQDp2-8k,5184
33
+ pychemstation-0.10.5.dist-info/METADATA,sha256=RfxUkxoudjZSf-bxO4eSHpsqTxML-JQJYnAmBTr0wFQ,5933
34
+ pychemstation-0.10.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
35
+ pychemstation-0.10.5.dist-info/licenses/LICENSE,sha256=9bdF75gIf1MecZ7oymqWgJREVz7McXPG-mjqrTmzzD8,18658
36
+ pychemstation-0.10.5.dist-info/RECORD,,
@@ -1,21 +0,0 @@
1
- from typing import Union
2
-
3
- from ....control.controllers import CommunicationController
4
- from ....control.controllers.tables.table import TableController
5
- from ....utils.chromatogram import AgilentChannelChromatogramData
6
- from ....utils.table_types import Table
7
-
8
-
9
- class MassSpecController(TableController):
10
-
11
- def __init__(self, controller: CommunicationController, src: str, data_dir: str, table: Table):
12
- super().__init__(controller, src, data_dir, table)
13
-
14
- def get_row(self, row: int):
15
- pass
16
-
17
- def retrieve_recent_data_files(self):
18
- pass
19
-
20
- def get_data(self) -> Union[list[AgilentChannelChromatogramData], AgilentChannelChromatogramData]:
21
- pass
@@ -1,37 +0,0 @@
1
- pychemstation/__init__.py,sha256=SpTl-Tg1B1HTyjNOE-8ue-N2wGnXN_2zl7RFUSxlkiM,33
2
- pychemstation/analysis/__init__.py,sha256=HS-3WaGu2JQ3qiojXkCvAP14W0wZG97MbSskl86Amn4,204
3
- pychemstation/analysis/base_spectrum.py,sha256=9WkOLk2qTAYTF1ALNUenVPoosOtBiLRvy2ni8zlGU5w,16540
4
- pychemstation/analysis/process_report.py,sha256=2y37Wb086v5RpR3frSQaBrvehwpUDSNZXxF8etkiaBA,11880
5
- pychemstation/control/README.md,sha256=_7ITj4hD17YIwci6UY6xBebC9gPCBpzBFTB_Gx0eJBc,3124
6
- pychemstation/control/__init__.py,sha256=Js79QczKZxDNZrzG1-4yl_whCoP2aw-yDAQJungiiic,100
7
- pychemstation/control/hplc.py,sha256=DC2LBN6DV1tJq6yJh2NNbmb8CyIlfwjjTERH0GHx8Gs,12952
8
- pychemstation/control/controllers/README.md,sha256=S5cd4NJmPjs6TUH98BtPJJhiS1Lu-mxLCNS786ogOrQ,32
9
- pychemstation/control/controllers/__init__.py,sha256=r7UU0u5zuJHO_KTqt-4Gy65BMlyXtxrdskiOhtO9Yw4,260
10
- pychemstation/control/controllers/comm.py,sha256=AN3A3ThvIsOKWY7Kmb_tnE5pRUqI7O2ID8M54z_w-uE,7831
11
- pychemstation/control/controllers/devices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- pychemstation/control/controllers/devices/device.py,sha256=JNBKVRka1I3LA1lElIeUO0j93BTK5IJufTPNq95OhNE,1473
13
- pychemstation/control/controllers/devices/injector.py,sha256=eQpGFYZkyWlWtgGOSuWQcOWfWME75K0DgDquVSinBYs,1907
14
- pychemstation/control/controllers/tables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- pychemstation/control/controllers/tables/method.py,sha256=LHoNRSTsSrrktghqNnU5KTRXDczcuGgqdqKEs_3sUXI,18609
16
- pychemstation/control/controllers/tables/ms.py,sha256=JFD-tOhu8uRyKdl-E3-neRssii8MNqVRIlsrnFhNY_M,682
17
- pychemstation/control/controllers/tables/sequence.py,sha256=SFC_N2avlXoWW2-BeYXG060Hvy_LX56U9t52hHeYgjM,13400
18
- pychemstation/control/controllers/tables/table.py,sha256=FccAwGPVS2UOa609YmtrbidwhYVyFduggi84i9qGbNw,12750
19
- pychemstation/generated/__init__.py,sha256=GAoZFAYbPVEJDkcOw3e1rgOqd7TCW0HyKNPM8OMehMg,1005
20
- pychemstation/generated/dad_method.py,sha256=xTUiSCvkXcxBUhjVm1YZKu-tHs16k23pF-0xYrQSwWA,8408
21
- pychemstation/generated/pump_method.py,sha256=797RsSDI2-QPf_BX8isZQx0O3aRx84EGIXJXhXw3IS0,12180
22
- pychemstation/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
- pychemstation/utils/chromatogram.py,sha256=2Los_ix_wAi4yxG_9neGRnNYPre9_uC1mrne3Ygit5c,3242
24
- pychemstation/utils/injector_types.py,sha256=PXwJK1uXs8hlQ6dWIEbAGfk2BpQJQmN3SlUbL4ntZz0,822
25
- pychemstation/utils/macro.py,sha256=Lh8aGcwo9sC2Sfc19Wgms5d3VgBLV3VXdvspqNHYE18,2931
26
- pychemstation/utils/method_types.py,sha256=ZOFMJ7wpqWBRJNIvOux-7Ou4nJVSuyWRHrd37wMnPa0,1638
27
- pychemstation/utils/num_utils.py,sha256=dDs8sLZ_SdtvDKhyhF3IkljiVf16IYqpMTO5tEk9vMk,2079
28
- pychemstation/utils/parsing.py,sha256=iFdnie-v0u5JI4cctJye_yhWQxHgy72_PWZ7w57Ltvg,9318
29
- pychemstation/utils/pump_types.py,sha256=HWQHxscGn19NTrfYBwQRCO2VcYfwyko7YfBO5uDhEm4,93
30
- pychemstation/utils/sequence_types.py,sha256=WyJWL18Q86TgoUpYH2_CevoTZuhcui0EnyHYdrp3Nmo,1070
31
- pychemstation/utils/spec_utils.py,sha256=MQZPDwCYZRfkEhNJQUt74huPexXBlJ3W4o7_230JWcE,10210
32
- pychemstation/utils/table_types.py,sha256=7txqW_oNpkh4venSkGEtreVe6UV9dzNB1DTrIeTkQHA,3217
33
- pychemstation/utils/tray_types.py,sha256=SMPm6TiN_D_qmVlUJktDNB1PD1Q1n31ReqF8Bo1p-8k,5048
34
- pychemstation-0.10.3.dist-info/METADATA,sha256=hlXVxPPFXbfxyQmK5kjvHQdK_xsIDSxbuxFgLitiJ5Y,5842
35
- pychemstation-0.10.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
36
- pychemstation-0.10.3.dist-info/licenses/LICENSE,sha256=9bdF75gIf1MecZ7oymqWgJREVz7McXPG-mjqrTmzzD8,18658
37
- pychemstation-0.10.3.dist-info/RECORD,,