boris-behav-obs 9.7.3__py3-none-any.whl → 9.7.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.
boris/observation.py CHANGED
@@ -42,6 +42,7 @@ from PySide6.QtWidgets import (
42
42
  QApplication,
43
43
  QMenu,
44
44
  QListWidgetItem,
45
+ QHeaderView
45
46
  )
46
47
 
47
48
  from . import config as cfg
@@ -75,7 +76,10 @@ class AssignConverter(QDialog):
75
76
  self.cbb[-1].addItems(["None"] + sorted(converters.keys()))
76
77
 
77
78
  if column_idx in col_conv:
78
- self.cbb[-1].setCurrentIndex((["None"] + sorted(converters.keys())).index(col_conv[column_idx]))
79
+ if col_conv[column_idx] in (["None"] + sorted(converters.keys())):
80
+ self.cbb[-1].setCurrentIndex((["None"] + sorted(converters.keys())).index(col_conv[column_idx]))
81
+ else:
82
+ self.cbb[-1].setCurrentIndex(0)
79
83
  else:
80
84
  self.cbb[-1].setCurrentIndex(0)
81
85
  hbox.addWidget(self.cbb[-1])
@@ -224,6 +228,10 @@ class Observation(QDialog, Ui_Form):
224
228
  self.pbCancel.clicked.connect(self.pbCancel_clicked)
225
229
 
226
230
  self.tw_data_files.cellDoubleClicked[int, int].connect(self.tw_data_files_cellDoubleClicked)
231
+ self.tw_data_files.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
232
+
233
+ self.twVideo1.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
234
+
227
235
 
228
236
  self.mediaDurations, self.mediaFPS, self.mediaHasVideo, self.mediaHasAudio, self.media_creation_time = {}, {}, {}, {}, {}
229
237
 
boris/plot_data_module.py CHANGED
@@ -134,6 +134,8 @@ class Plot_data(QWidget):
134
134
  column_converter=column_converter,
135
135
  )
136
136
 
137
+ print(f"{error_msg=}")
138
+
137
139
  if not result:
138
140
  self.error_msg = error_msg
139
141
  return
boris/project.py CHANGED
@@ -1977,7 +1977,7 @@ class projectDialog(QDialog, Ui_dlgProject):
1977
1977
  self.pj[cfg.INDEPENDENT_VARIABLES] = dict(self.indVar)
1978
1978
 
1979
1979
  # converters
1980
- converters = {}
1980
+ converters:dict = {}
1981
1981
  for row in range(self.tw_converters.rowCount()):
1982
1982
  converters[self.tw_converters.item(row, 0).text()] = {
1983
1983
  "name": self.tw_converters.item(row, 0).text(),
boris/utilities.py CHANGED
@@ -471,20 +471,37 @@ def txt2np_array(
471
471
  conv_name = column_converter[column_idx]
472
472
 
473
473
  function = f"""def {conv_name}(INPUT):\n"""
474
- function += """ INPUT = INPUT.decode("utf-8") if isinstance(INPUT, bytes) else INPUT"""
474
+ function += """ INPUT = INPUT.decode("utf-8") if isinstance(INPUT, bytes) else INPUT\n\n"""
475
475
  for line in converters[conv_name]["code"].split("\n"):
476
476
  function += f" {line}\n"
477
477
  function += """ return OUTPUT"""
478
478
 
479
+
480
+ print('=============')
481
+ print(function)
482
+ print('=============')
483
+
484
+ import types
485
+ mod = types.ModuleType("converter_module")
486
+ exec(function, mod.__dict__)
487
+
488
+ '''
479
489
  try:
480
490
  exec(function)
481
491
  except Exception:
482
492
  return False, f"error in converter: {sys.exc_info()[1]}", np.array([])
483
493
 
484
- np_converters[column_idx - 1] = locals()[conv_name]
494
+ print(f"{converters=}")
495
+ print(f"{column_converter=}")
496
+ print(locals())
497
+ print(f"{conv_name=}")
498
+ '''
499
+
500
+ #np_converters[column_idx - 1] = locals()['conv_name']
501
+ np_converters[column_idx - 1] = getattr(mod, conv_name)
485
502
 
486
503
  else:
487
- return False, f"converter {cfg.converters_param[column_idx]} not found", np.array([])
504
+ return False, f"converter {column_converter[column_idx]} not found", np.array([])
488
505
 
489
506
  # snif txt file
490
507
  try:
boris/version.py CHANGED
@@ -20,5 +20,5 @@ This file is part of BORIS.
20
20
 
21
21
  """
22
22
 
23
- __version__ = "9.7.3"
24
- __version_date__ = "2025-11-05"
23
+ __version__ = "9.7.5"
24
+ __version_date__ = "2025-11-07"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boris-behav-obs
3
- Version: 9.7.3
3
+ Version: 9.7.5
4
4
  Summary: BORIS - Behavioral Observation Research Interactive Software
5
5
  Author-email: Olivier Friard <olivier.friard@unito.it>
6
6
  License-Expression: GPL-3.0-only
@@ -51,7 +51,7 @@ It provides also some analysis tools like time budget and some plotting function
51
51
  <!-- The BO-RIS paper has more than [![BORIS citations counter](https://penelope.unito.it/friard/boris_scopus_citations.png) citations](https://www.boris.unito.it/citations) in peer-reviewed scientific publications. -->
52
52
 
53
53
 
54
- The BORIS paper has more than 2408 citations in peer-reviewed scientific publications.
54
+ The BORIS paper has more than 2423 citations in peer-reviewed scientific publications.
55
55
 
56
56
 
57
57
 
@@ -46,7 +46,7 @@ boris/modifier_coding_map_creator.py,sha256=3Ihh75TCNI0KkQKHuosYibAhGbdgjdlRZGmn
46
46
  boris/modifiers_coding_map.py,sha256=oT56ZY_PXhEJsMoblEsyNMAPbDpv7ZMOCnvmt7Ibx_Y,4554
47
47
  boris/mpv.py,sha256=EfzIHjPbgewG4w3smEtqEUPZoVwYmMQkL4Q8ZyW-a58,76410
48
48
  boris/mpv2.py,sha256=IUI4t4r9GYX7G5OXTjd3RhMMOkDdfal_15buBgksLsk,92152
49
- boris/observation.py,sha256=10UkVyY8TDySntIX_-H-IsuFdiF6tEcmC6JQUzD6wYg,57139
49
+ boris/observation.py,sha256=61DtTj7n9vuSbWBisyFNr65JdxpSQMe4z6KdcGQ9i1E,57507
50
50
  boris/observation_operations.py,sha256=PdP9K6A7z1EoOhuBQzBJo-X2vM1vJavGGgtUNBeKJ9o,105712
51
51
  boris/observation_ui.py,sha256=DAnU94QBNvkLuHT6AxTwqSk_D_n6VUhSl8PexZv_dUk,33309
52
52
  boris/observations_list.py,sha256=NqwECGHtHYmKhSe-qCfqPmJ24SSfzlXvIXS2i3op_zE,10591
@@ -54,7 +54,7 @@ boris/otx_parser.py,sha256=70QvilzFHXbjAHR88YH0aEXJ3xxheLS5fZGgHFHGpNE,16367
54
54
  boris/param_panel.py,sha256=C7MzWg-OVjjxKbXPFC0ykOLpxbwsqEmG0jWgzBUwOEA,8695
55
55
  boris/param_panel_ui.py,sha256=4emQDFmuL4_R7bKxosLjdUb-VSPWkDm7suy38F5EKcA,13260
56
56
  boris/player_dock_widget.py,sha256=rdP0w6Wac7R3UMqJeHl7GNvT1hElu_x_VgNkg4Ut-6s,5880
57
- boris/plot_data_module.py,sha256=6QbLKfyGp4TYRyHnB9G45y5XrpeXLytcorltEAWfYak,16562
57
+ boris/plot_data_module.py,sha256=Xq70HDlAtvganwNmbRDUA3iKV-415zS9W1H1x0itXWE,16594
58
58
  boris/plot_events.py,sha256=tKiUWH0TNSkK7xz5Vf0tAD3KiuAalv6UZEVtOnoFpWY,24059
59
59
  boris/plot_events_rt.py,sha256=xJmjwqhQxCN4FDBYRQ0O2eHm356Rbexzr3m1qTefMDU,8326
60
60
  boris/plot_spectrogram_rt.py,sha256=wDhnkqwjd2UfCxrfOejOUxoNOqfMNo6vo1JSvYgM-2A,10925
@@ -62,7 +62,7 @@ boris/plot_waveform_rt.py,sha256=RNXhcBzRKnoGoVjRAHsVvOaj0BJbbI2cpCMjMUiGqX0,753
62
62
  boris/plugins.py,sha256=sn2r8kMxkzaO8kNhem-cTlTBrym9MlFPyRT9Av9rHGg,15603
63
63
  boris/preferences.py,sha256=fjyoBKWsKoRq7YKqE_BzzSSPENPwd7ZqL_HY2bqd1jA,21846
64
64
  boris/preferences_ui.py,sha256=zkmbQbkb0WqhPyMtnU-DU9Y2enSph_r-LnwsmEOgzkk,35090
65
- boris/project.py,sha256=nyXfCDY_rLP3jC1QGv-280jUKgbABqESjOm7I19rJ1U,86432
65
+ boris/project.py,sha256=8mprjrOAHBNKEedq-yLlu0JB9cuwYQFW_EqUwgaleR4,86437
66
66
  boris/project_functions.py,sha256=Z4e8mLeFUBOdZHYTQhTqzj-s0ppiUgOFkpjsQtkefVA,83026
67
67
  boris/project_import_export.py,sha256=oBG1CSXfKISsb3TLNT-8BH8kZPAzxIYSNemlLVH1Lh8,38560
68
68
  boris/project_ui.py,sha256=yB-ewhHt8S8DTTRIk-dNK2tPMNU24lNji9fDW_Xazu8,38805
@@ -77,8 +77,8 @@ boris/synthetic_time_budget.py,sha256=3Eb9onMLmgqCLd50CuxV9L8RV2ESzfaMWvPK_bXUMM
77
77
  boris/time_budget_functions.py,sha256=SbGyTF2xySEqBdRJZeWFTirruvK3r6pwM6e4Gz17W1s,52186
78
78
  boris/time_budget_widget.py,sha256=z-tyITBtIz-KH1H2OdMB5a8x9QQLK7Wu96-zkC6NVDA,43213
79
79
  boris/transitions.py,sha256=okyDCO-Vn4p_Fixd8cGiSIaUhUxG5ePIOqGSuP52g_c,12246
80
- boris/utilities.py,sha256=BJXl8IZHQC93ZcaN9cQrWmrg3Rr3F8_Q71Tz6Im3A0s,58104
81
- boris/version.py,sha256=MqUY71OLsiY3VknHGempTDu88Un1Zm9auFmJtTN7UGQ,787
80
+ boris/utilities.py,sha256=TsDJTBgLUWmPGiegn3k4xllvszLhja3M1CKChvWfIPA,58571
81
+ boris/version.py,sha256=s1Irj-6wM6wFjyrzOlSek32ttfsCGLe_1eGkHjnuYm8,787
82
82
  boris/video_equalizer.py,sha256=cm2JXe1eAPkqDzxYB2OMKyuveMBdq4a9-gD1bBorbn4,5823
83
83
  boris/video_equalizer_ui.py,sha256=1CG3s79eM4JAbaCx3i1ILZXLceb41_gGXlOLNfpBgnw,10142
84
84
  boris/video_operations.py,sha256=i38CTLpD1WbkQr4WA7Mj5_47ouqDvcVgPgZ6wUyggwA,10923
@@ -101,9 +101,9 @@ boris/portion/dict.py,sha256=uNM-LEY52CZ2VNMMW_C9QukoyTvPlQf8vcbGa1lQBHI,11281
101
101
  boris/portion/func.py,sha256=mSQr20YS1ug7R1fRqBg8LifjtXDRvJ6Kjc3WOeL9P34,2172
102
102
  boris/portion/interval.py,sha256=sOlj3MAGGaB-JxCkigS-n3qw0fY7TANAsXv1pavr8J4,19931
103
103
  boris/portion/io.py,sha256=kpq44pw3xnIyAlPwaR5qRHKRdZ72f8HS9YVIWs5k2pk,6367
104
- boris_behav_obs-9.7.3.dist-info/licenses/LICENSE.TXT,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
105
- boris_behav_obs-9.7.3.dist-info/METADATA,sha256=GG7qKHLtzrifFsHDgVkeDJA3qLCU-iRTM3WWlse9y5I,5203
106
- boris_behav_obs-9.7.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
107
- boris_behav_obs-9.7.3.dist-info/entry_points.txt,sha256=k__8XvFi4vaA4QFvQehCZjYkKmZH34HSAJI2iYCWrMs,52
108
- boris_behav_obs-9.7.3.dist-info/top_level.txt,sha256=fJSgm62S7WesiwTorGbOO4nNN0yzgZ3klgfGi3Px4qI,6
109
- boris_behav_obs-9.7.3.dist-info/RECORD,,
104
+ boris_behav_obs-9.7.5.dist-info/licenses/LICENSE.TXT,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
105
+ boris_behav_obs-9.7.5.dist-info/METADATA,sha256=AUI8R_IevDGv27kuI7vD9nOJAtWEYNGDaEzacFbgbBk,5203
106
+ boris_behav_obs-9.7.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
107
+ boris_behav_obs-9.7.5.dist-info/entry_points.txt,sha256=k__8XvFi4vaA4QFvQehCZjYkKmZH34HSAJI2iYCWrMs,52
108
+ boris_behav_obs-9.7.5.dist-info/top_level.txt,sha256=fJSgm62S7WesiwTorGbOO4nNN0yzgZ3klgfGi3Px4qI,6
109
+ boris_behav_obs-9.7.5.dist-info/RECORD,,