np-workflows 1.6.85__py3-none-any.whl → 1.6.87__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.
- np_workflows/shared/base_experiments.py +18 -2
- {np_workflows-1.6.85.dist-info → np_workflows-1.6.87.dist-info}/METADATA +1 -1
- {np_workflows-1.6.85.dist-info → np_workflows-1.6.87.dist-info}/RECORD +5 -5
- {np_workflows-1.6.85.dist-info → np_workflows-1.6.87.dist-info}/WHEEL +0 -0
- {np_workflows-1.6.85.dist-info → np_workflows-1.6.87.dist-info}/entry_points.txt +0 -0
|
@@ -8,7 +8,7 @@ import pathlib
|
|
|
8
8
|
import re
|
|
9
9
|
import shutil
|
|
10
10
|
import time
|
|
11
|
-
from typing import Any, ClassVar, Iterable, Literal, Optional, Protocol, Sequence, Type
|
|
11
|
+
from typing import Any, ClassVar, Iterable, Literal, Mapping, Optional, Protocol, Sequence, Type
|
|
12
12
|
|
|
13
13
|
import fabric
|
|
14
14
|
import invoke
|
|
@@ -382,6 +382,12 @@ class PipelineExperiment(WithSession):
|
|
|
382
382
|
renamed_folders.append(renamed)
|
|
383
383
|
logger.info('Renamed split ephys folders %r', split_folders)
|
|
384
384
|
np_services.OpenEphys.data_files = renamed_folders
|
|
385
|
+
|
|
386
|
+
@staticmethod
|
|
387
|
+
def contains_uuid(text: str) -> bool:
|
|
388
|
+
hexchars = '[0-9a-fA-F]'
|
|
389
|
+
pattern = rf"{hexchars}{{8}}-{hexchars}{{4}}-{hexchars}{{4}}-{hexchars}{{4}}-{hexchars}{{12}}"
|
|
390
|
+
return re.search(pattern, text) is not None
|
|
385
391
|
|
|
386
392
|
def copy_data_files(self) -> None:
|
|
387
393
|
"""Copy data files from raw data storage to session folder for all services."""
|
|
@@ -405,6 +411,10 @@ class PipelineExperiment(WithSession):
|
|
|
405
411
|
for _ in ('opto', 'main', 'mapping', 'behavior'):
|
|
406
412
|
if _ in file.name:
|
|
407
413
|
renamed = f'{self.session.folder}.{"stim" if _ == "main" else _}.pkl'
|
|
414
|
+
break
|
|
415
|
+
else:
|
|
416
|
+
if self.contains_uuid(file.name):
|
|
417
|
+
renamed = f'{self.session.folder}.behavior.pkl'
|
|
408
418
|
elif file.suffix in ('.json', '.mp4') and (cam_label := re.match('Behavior|Eye|Face',file.name)):
|
|
409
419
|
renamed = f'{self.session.folder}.{cam_label.group().lower()}{file.suffix}'
|
|
410
420
|
elif file.suffix in ('.json', '.mp4') and (cam_label := re.match('BEH|EYE|FACE',file.name)):
|
|
@@ -702,7 +712,13 @@ class DynamicRoutingExperiment(WithSession):
|
|
|
702
712
|
else:
|
|
703
713
|
np_services.ScriptCamstim.script = self.camstim_script.as_posix()
|
|
704
714
|
|
|
705
|
-
|
|
715
|
+
if (script_override_params := getattr(self, 'script_override_params', None)) is not None:
|
|
716
|
+
if not isinstance(script_override_params, Mapping):
|
|
717
|
+
raise TypeError(f"script_override_params must be a dict/Mapping, got {type(script_override_params)}")
|
|
718
|
+
else:
|
|
719
|
+
script_override_params = {}
|
|
720
|
+
|
|
721
|
+
np_services.ScriptCamstim.params = params | script_override_params
|
|
706
722
|
|
|
707
723
|
self.update_state()
|
|
708
724
|
self.log(f"{stim} started")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
np_workflows-1.6.
|
|
2
|
-
np_workflows-1.6.
|
|
3
|
-
np_workflows-1.6.
|
|
1
|
+
np_workflows-1.6.87.dist-info/METADATA,sha256=16Az2imZW_pvWAIUzXIII_-GpT91PVkRscVaoS-87DM,3991
|
|
2
|
+
np_workflows-1.6.87.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
|
3
|
+
np_workflows-1.6.87.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
4
4
|
np_workflows/__init__.py,sha256=QWnSRZ3THmQPF6HO8rFC4EkcjGd5ypap7BssqKqva64,232
|
|
5
5
|
np_workflows/assets/images/logo_np_hab.png,sha256=N1skdSq4lQv0liucargHoulzfE-zeTYoud-wAePD2VY,10071
|
|
6
6
|
np_workflows/assets/images/logo_np_vis.png,sha256=yDaQ3dQcX1OXPN8Rsne9SvaevUlgvVRcw_tWs02cyTU,19349
|
|
@@ -62,9 +62,9 @@ np_workflows/experiments/templeton/__init__.py,sha256=LrTnP6DnkTSB-sdadvSOJvLZMZ
|
|
|
62
62
|
np_workflows/experiments/templeton/main.py,sha256=5JDBN4fQbBy2PfiUh6OQr0NVZo-h58la3C-mgfLsU3Y,2906
|
|
63
63
|
np_workflows/experiments/templeton/widgets.py,sha256=e0t7zhD0N-i6Q5_8EWW4lYrESuAb7hIz_BEL4NPaywo,2884
|
|
64
64
|
np_workflows/shared/__init__.py,sha256=L9h5R3dioT8m0KcwjlQV5_eoEFoneJHEzDTGaH4_ySg,131
|
|
65
|
-
np_workflows/shared/base_experiments.py,sha256
|
|
65
|
+
np_workflows/shared/base_experiments.py,sha256=K0G4XSMkpP2s6c9XZAtxaj9niRd8GLpZQ6FVX3YDPuA,34500
|
|
66
66
|
np_workflows/shared/camstim_scripts/flash_250ms.stim,sha256=ARwNQPJRRQwEaD_k0oXR1lafdafWlf_Kvfbq6TVEkDU,408
|
|
67
67
|
np_workflows/shared/camstim_scripts/gabor_20_deg_250ms.stim,sha256=xvuRMORZiN9IuOLWZbNTWuxmhfHefGnZtIpeYcsQXpE,718
|
|
68
68
|
np_workflows/shared/npxc.py,sha256=NWi826e14EEt3vKlsLwsQ2wYcsLk9Ea_Hrb8hn2iA3Y,6689
|
|
69
69
|
np_workflows/shared/widgets.py,sha256=aehptvxluwfyRs7Sa4ZSvCMhOwGCxhUM7STBR4wFG5k,26880
|
|
70
|
-
np_workflows-1.6.
|
|
70
|
+
np_workflows-1.6.87.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|