pychemstation 0.7.0.dev1__py3-none-any.whl → 0.7.0.dev2__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.
@@ -192,18 +192,15 @@ class SequenceController(TableController):
192
192
  def get_data(self, custom_path: Optional[str] = None,
193
193
  read_uv: bool = False) -> list[AgilentChannelChromatogramData]:
194
194
  parent_dir = self.data_files[-1].dir if not custom_path else custom_path
195
- child_dirs = self.data_files[-1].child_dirs
196
- if len(child_dirs) == 0:
197
- subdirs = []
198
- for d in self.data_dirs:
195
+
196
+ potential_folders = []
197
+ for d in self.data_dirs:
199
198
  subdirs = [x[0] for x in os.walk(d)]
200
- if len(subdirs) > 0:
199
+ potential_folders = sorted(list(filter(lambda d: parent_dir in d, subdirs)))
200
+ if len(potential_folders) > 0:
201
201
  break
202
- assert len(subdirs) > 0
203
- potential_folders = sorted(list(filter(lambda d: parent_dir in d, subdirs)))
204
- self.data_files[-1].child_dirs = [f for f in potential_folders if
205
- parent_dir in f and ".M" not in f and ".D" in f]
206
-
202
+ assert len(potential_folders) > 0
203
+ self.data_files[-1].child_dirs = [f for f in potential_folders if parent_dir in f and ".M" not in f and ".D" in f]
207
204
  spectra: list[Union[AgilentChannelChromatogramData, ChromData]] = []
208
205
  all_w_spectra: list[Union[AgilentChannelChromatogramData, ChromData]] = []
209
206
  for row in self.data_files[-1].child_dirs:
@@ -258,13 +258,13 @@ class TableController(abc.ABC):
258
258
  if os.path.exists(most_recent_folder):
259
259
  return Ok(most_recent_folder)
260
260
 
261
- subdirs = []
261
+ potential_folders = []
262
262
  for d in self.data_dirs:
263
263
  subdirs = [x[0] for x in os.walk(d)]
264
- if len(subdirs) > 0:
264
+ potential_folders = sorted(list(filter(lambda d: most_recent_folder in d, subdirs)))
265
+ if len(potential_folders) > 0:
265
266
  break
266
- assert len(subdirs) > 0
267
- potential_folders = sorted(list(filter(lambda d: most_recent_folder in d, subdirs)))
267
+ assert len(potential_folders) > 0
268
268
  parent_dirs = []
269
269
  for folder in potential_folders:
270
270
  path = os.path.normpath(folder)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pychemstation
3
- Version: 0.7.0.dev1
3
+ Version: 0.7.0.dev2
4
4
  Summary: Library to interact with Chemstation software, primarily used in Hein lab
5
5
  Home-page: https://gitlab.com/heingroup/device-api/pychemstation
6
6
  Author: Lucy Hao
@@ -21,8 +21,8 @@ pychemstation/control/controllers/devices/pump.py,sha256=DJQh4lNXEraeC1CWrsKmsIT
21
21
  pychemstation/control/controllers/tables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  pychemstation/control/controllers/tables/method.py,sha256=CVyln3TI-lWuaYiSINDJWGdvXSVa7o-yVEyy4TNNhG8,16492
23
23
  pychemstation/control/controllers/tables/ms.py,sha256=JFD-tOhu8uRyKdl-E3-neRssii8MNqVRIlsrnFhNY_M,682
24
- pychemstation/control/controllers/tables/sequence.py,sha256=zKv0KPSRzCL0UKAUWL3g5T35XUe30aUwHfidf3dzRDs,9349
25
- pychemstation/control/controllers/tables/table.py,sha256=CchpkYabgzVgX6m-vQQIOikJX2Z_Zbaw9K62zED2lgQ,12171
24
+ pychemstation/control/controllers/tables/sequence.py,sha256=svDHwIWsElXveJ-I4odtf_hP5MLmv_7TKJrCdoki4Yk,9236
25
+ pychemstation/control/controllers/tables/table.py,sha256=tVcvb2119t2NOGxOJvSqy432yR1rAvfj-Vr1CTnG1DY,12205
26
26
  pychemstation/control/table/__init__.py,sha256=RgMN4uIWHdNUHpGRBWdzmzAbk7XEKl6Y-qtqWCxzSZU,124
27
27
  pychemstation/control/table/method.py,sha256=THVoGomSXff_CTU3eAYme0BYwkPzab5UgZKsiZ29QSk,12196
28
28
  pychemstation/control/table/sequence.py,sha256=Eri52AnbE3BGthfrRSvYKYciquUzvHKo0lYUTySYYE8,10542
@@ -50,9 +50,9 @@ tests/test_nightly.py,sha256=WpLZfs-n9oPrwz-64gWJB5oxJGYz_ab4sLZ4E-xFBpY,2654
50
50
  tests/test_proc_rep.py,sha256=sxRiTBybVm6lyAqmgrri-T2EfZgs27oSgbYXSsN9CwU,1380
51
51
  tests/test_runs_stable.py,sha256=sT9gNt7Rscz73BybpRGYj8RSGPBR58wrzvIAFFK-_pM,5530
52
52
  tests/test_sequence.py,sha256=vs5-dqkItRds_tPM2-N6MNJ37FB0nLRFaDzBV8d42i8,4880
53
- tests/test_stable.py,sha256=ZPuZFNzmEO-EOih_pQ15VGj9vg6Fdtc-rOVPX7lMlkU,12468
54
- pychemstation-0.7.0.dev1.dist-info/LICENSE,sha256=9bdF75gIf1MecZ7oymqWgJREVz7McXPG-mjqrTmzzD8,18658
55
- pychemstation-0.7.0.dev1.dist-info/METADATA,sha256=C0qGCLwFcyueIsAiVdCTU8J8BEqE1HZH7HJQZyLT2D8,4409
56
- pychemstation-0.7.0.dev1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
57
- pychemstation-0.7.0.dev1.dist-info/top_level.txt,sha256=zXfKu_4nYWwPHo3OsuhshMNC3SPkcoTGCyODjURaghY,20
58
- pychemstation-0.7.0.dev1.dist-info/RECORD,,
53
+ tests/test_stable.py,sha256=UFb9rUBnOk7JabcweNIYZLWpBHWGbqKAtsTNfxDhEFg,12208
54
+ pychemstation-0.7.0.dev2.dist-info/LICENSE,sha256=9bdF75gIf1MecZ7oymqWgJREVz7McXPG-mjqrTmzzD8,18658
55
+ pychemstation-0.7.0.dev2.dist-info/METADATA,sha256=A6ZUpxSn1kImFamlVNU1jnXB_oDHrqeSIj9gy6rRu3I,4409
56
+ pychemstation-0.7.0.dev2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
57
+ pychemstation-0.7.0.dev2.dist-info/top_level.txt,sha256=zXfKu_4nYWwPHo3OsuhshMNC3SPkcoTGCyODjURaghY,20
58
+ pychemstation-0.7.0.dev2.dist-info/RECORD,,
tests/test_stable.py CHANGED
@@ -52,14 +52,6 @@ class TestStable(unittest.TestCase):
52
52
  except Exception as e:
53
53
  self.fail(f"Should not throw error: {e}")
54
54
 
55
- def test_load_method_from_disk(self):
56
- self.hplc_controller.switch_method(DEFAULT_METHOD)
57
- try:
58
- gp_mtd = self.hplc_controller.method_controller.load_from_disk(DEFAULT_METHOD)
59
- self.assertTrue(gp_mtd.params.organic_modifier == 5)
60
- except Exception as e:
61
- self.fail(f"Should have not failed, {e}")
62
-
63
55
  def test_edit_method(self):
64
56
  self.hplc_controller.method_controller.switch(DEFAULT_METHOD)
65
57
  new_method = MethodDetails(name=DEFAULT_METHOD + ".M",
@@ -273,6 +265,7 @@ class TestStable(unittest.TestCase):
273
265
  check_folder = self.hplc_controller.sequence_controller.fuzzy_match_most_recent_folder(
274
266
  most_recent_folder=most_recent_folder)
275
267
  self.assertEqual(check_folder.ok_value, path)
268
+ self.hplc_controller.sequence_controller.data_files[-1].dir = check_folder.ok_value
276
269
  chrom = self.hplc_controller.get_last_run_sequence_data()
277
270
  self.assertTrue(chrom)
278
271
  except Exception: