boris-behav-obs 8.27.10__py2.py3-none-any.whl → 9.0.1__py2.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/about.py +7 -5
- boris/add_modifier.py +35 -35
- boris/add_modifier_ui.py +229 -129
- boris/advanced_event_filtering.py +3 -3
- boris/analysis_plugins/__init__.py +0 -0
- boris/analysis_plugins/number_of_occurences.py +60 -0
- boris/analysis_plugins/number_of_occurences_by_independent_variable.py +72 -0
- boris/analysis_plugins/time_budget.py +95 -0
- boris/behav_coding_map_creator.py +103 -108
- boris/behavior_binary_table.py +1 -1
- boris/behaviors_coding_map.py +8 -8
- boris/coding_pad.py +6 -6
- boris/config.py +6 -0
- boris/config_file.py +1 -1
- boris/connections.py +4 -2
- boris/converters.py +2 -3
- boris/converters_ui.py +187 -110
- boris/cooccurence.py +2 -2
- boris/core.py +340 -94
- boris/core_qrc.py +16088 -13246
- boris/core_ui.py +922 -812
- boris/dialog.py +14 -13
- boris/duration_widget.py +5 -5
- boris/edit_event.py +1 -1
- boris/edit_event_ui.py +162 -88
- boris/event_operations.py +4 -25
- boris/events_cursor.py +17 -9
- boris/events_snapshots.py +5 -5
- boris/exclusion_matrix.py +1 -1
- boris/export_events.py +38 -28
- boris/export_observation.py +1 -1
- boris/external_processes.py +3 -5
- boris/geometric_measurement.py +49 -26
- boris/gui_utilities.py +31 -30
- boris/import_observations.py +2 -4
- boris/irr.py +1 -1
- boris/latency.py +1 -1
- boris/map_creator.py +77 -89
- boris/measurement_widget.py +4 -4
- boris/media_file.py +2 -4
- boris/menu_options.py +1 -3
- boris/modifiers_coding_map.py +4 -4
- boris/mpv2.py +0 -2
- boris/observation.py +124 -29
- boris/observation_operations.py +18 -40
- boris/observation_ui.py +566 -374
- boris/observations_list.py +6 -6
- boris/param_panel.py +2 -2
- boris/param_panel_ui.py +246 -141
- boris/player_dock_widget.py +16 -21
- boris/plot_data_module.py +6 -6
- boris/plot_events_rt.py +7 -8
- boris/plot_spectrogram_rt.py +7 -8
- boris/plot_waveform_rt.py +6 -7
- boris/plugins.py +79 -0
- boris/preferences.py +127 -17
- boris/preferences_ui.py +464 -240
- boris/project.py +69 -72
- boris/project_functions.py +233 -31
- boris/project_import_export.py +59 -67
- boris/project_ui.py +672 -440
- boris/qrc_boris.py +6 -3
- boris/qrc_boris5.py +6 -3
- boris/select_modifiers.py +2 -2
- boris/select_observations.py +2 -2
- boris/select_subj_behav.py +3 -3
- boris/state_events.py +1 -1
- boris/subjects_pad.py +5 -5
- boris/synthetic_time_budget.py +2 -2
- boris/time_budget_functions.py +15 -0
- boris/time_budget_widget.py +4 -4
- boris/transitions.py +34 -25
- boris/utilities.py +95 -2
- boris/version.py +2 -2
- boris/video_equalizer.py +4 -4
- boris/video_equalizer_ui.py +199 -130
- boris/video_operations.py +1 -1
- boris/view_df.py +106 -0
- boris/view_df_ui.py +75 -0
- boris/write_event.py +9 -1
- {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.1.dist-info}/METADATA +5 -5
- boris_behav_obs-9.0.1.dist-info/RECORD +103 -0
- {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.1.dist-info}/WHEEL +1 -1
- boris/qdarkstyle/__init__.py +0 -479
- boris/qdarkstyle/__main__.py +0 -66
- boris/qdarkstyle/colorsystem.py +0 -38
- boris/qdarkstyle/dark/__init__.py +0 -1
- boris/qdarkstyle/dark/darkstyle_rc.py +0 -11379
- boris/qdarkstyle/dark/palette.py +0 -38
- boris/qdarkstyle/example/__init__.py +0 -4
- boris/qdarkstyle/example/__main__.py +0 -386
- boris/qdarkstyle/example/ui/__init__.py +0 -4
- boris/qdarkstyle/light/__init__.py +0 -1
- boris/qdarkstyle/light/lightstyle_rc.py +0 -11305
- boris/qdarkstyle/light/palette.py +0 -37
- boris/qdarkstyle/palette.py +0 -102
- boris/qdarkstyle/utils/__init__.py +0 -73
- boris/qdarkstyle/utils/__main__.py +0 -96
- boris/qdarkstyle/utils/images.py +0 -449
- boris/qdarkstyle/utils/scss.py +0 -318
- boris/vlc_local.py +0 -83
- boris_behav_obs-8.27.10.dist-info/RECORD +0 -114
- {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.1.dist-info}/LICENSE.TXT +0 -0
- {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.1.dist-info}/entry_points.txt +0 -0
- {boris_behav_obs-8.27.10.dist-info → boris_behav_obs-9.0.1.dist-info}/top_level.txt +0 -0
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
"""QDarkStyle default light palette."""
|
|
4
|
-
|
|
5
|
-
# Local imports
|
|
6
|
-
from qdarkstyle.colorsystem import Blue, Gray
|
|
7
|
-
from qdarkstyle.palette import Palette
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class LightPalette(Palette):
|
|
11
|
-
"""Theme variables."""
|
|
12
|
-
|
|
13
|
-
ID = 'light'
|
|
14
|
-
|
|
15
|
-
# Color
|
|
16
|
-
COLOR_BACKGROUND_1 = Gray.B140
|
|
17
|
-
COLOR_BACKGROUND_2 = Gray.B130
|
|
18
|
-
COLOR_BACKGROUND_3 = Gray.B120
|
|
19
|
-
COLOR_BACKGROUND_4 = Gray.B110
|
|
20
|
-
COLOR_BACKGROUND_5 = Gray.B100
|
|
21
|
-
COLOR_BACKGROUND_6 = Gray.B90
|
|
22
|
-
|
|
23
|
-
COLOR_TEXT_1 = Gray.B10
|
|
24
|
-
COLOR_TEXT_2 = Gray.B20
|
|
25
|
-
COLOR_TEXT_3 = Gray.B50
|
|
26
|
-
COLOR_TEXT_4 = Gray.B70
|
|
27
|
-
|
|
28
|
-
COLOR_ACCENT_1 = Blue.B130
|
|
29
|
-
COLOR_ACCENT_2 = Blue.B100
|
|
30
|
-
COLOR_ACCENT_3 = Blue.B90
|
|
31
|
-
COLOR_ACCENT_4 = Blue.B80
|
|
32
|
-
COLOR_ACCENT_5 = Blue.B70
|
|
33
|
-
|
|
34
|
-
# Color for disabled elements
|
|
35
|
-
COLOR_DISABLED = Gray.B80
|
|
36
|
-
|
|
37
|
-
OPACITY_TOOLTIP = 230
|
boris/qdarkstyle/palette.py
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
"""Base palette mixin."""
|
|
4
|
-
|
|
5
|
-
# Standard library imports
|
|
6
|
-
from collections import OrderedDict
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class Palette(object):
|
|
10
|
-
|
|
11
|
-
ID = None
|
|
12
|
-
|
|
13
|
-
# Color
|
|
14
|
-
COLOR_BACKGROUND_1 = ''
|
|
15
|
-
COLOR_BACKGROUND_2 = ''
|
|
16
|
-
COLOR_BACKGROUND_3 = ''
|
|
17
|
-
COLOR_BACKGROUND_4 = ''
|
|
18
|
-
COLOR_BACKGROUND_5 = ''
|
|
19
|
-
COLOR_BACKGROUND_6 = ''
|
|
20
|
-
|
|
21
|
-
COLOR_TEXT_1 = ''
|
|
22
|
-
COLOR_TEXT_2 = ''
|
|
23
|
-
COLOR_TEXT_3 = ''
|
|
24
|
-
COLOR_TEXT_4 = ''
|
|
25
|
-
|
|
26
|
-
COLOR_ACCENT_1 = ''
|
|
27
|
-
COLOR_ACCENT_2 = ''
|
|
28
|
-
COLOR_ACCENT_3 = ''
|
|
29
|
-
COLOR_ACCENT_4 = ''
|
|
30
|
-
COLOR_ACCENT_5 = ''
|
|
31
|
-
|
|
32
|
-
OPACITY_TOOLTIP = 0
|
|
33
|
-
|
|
34
|
-
# Size
|
|
35
|
-
SIZE_BORDER_RADIUS = '4px'
|
|
36
|
-
|
|
37
|
-
# Borders
|
|
38
|
-
BORDER_1 = '1px solid $COLOR_BACKGROUND_1'
|
|
39
|
-
BORDER_2 = '1px solid $COLOR_BACKGROUND_4'
|
|
40
|
-
BORDER_3 = '1px solid $COLOR_BACKGROUND_6'
|
|
41
|
-
|
|
42
|
-
BORDER_SELECTION_3 = '1px solid $COLOR_ACCENT_3'
|
|
43
|
-
BORDER_SELECTION_2 = '1px solid $COLOR_ACCENT_2'
|
|
44
|
-
BORDER_SELECTION_1 = '1px solid $COLOR_ACCENT_1'
|
|
45
|
-
|
|
46
|
-
# Example of additional widget specific variables
|
|
47
|
-
W_STATUS_BAR_BACKGROUND_COLOR = COLOR_ACCENT_1
|
|
48
|
-
|
|
49
|
-
# Paths
|
|
50
|
-
PATH_RESOURCES = "':/qss_icons'"
|
|
51
|
-
|
|
52
|
-
@classmethod
|
|
53
|
-
def to_dict(cls, colors_only=False):
|
|
54
|
-
"""Convert variables to dictionary."""
|
|
55
|
-
order = [
|
|
56
|
-
'ID',
|
|
57
|
-
'COLOR_BACKGROUND_6',
|
|
58
|
-
'COLOR_BACKGROUND_5',
|
|
59
|
-
'COLOR_BACKGROUND_4',
|
|
60
|
-
'COLOR_BACKGROUND_2',
|
|
61
|
-
'COLOR_BACKGROUND_3',
|
|
62
|
-
'COLOR_BACKGROUND_1',
|
|
63
|
-
'COLOR_TEXT_1',
|
|
64
|
-
'COLOR_TEXT_2',
|
|
65
|
-
'COLOR_TEXT_3',
|
|
66
|
-
'COLOR_TEXT_4',
|
|
67
|
-
'COLOR_ACCENT_1',
|
|
68
|
-
'COLOR_ACCENT_2',
|
|
69
|
-
'COLOR_ACCENT_3',
|
|
70
|
-
'COLOR_ACCENT_4',
|
|
71
|
-
'COLOR_DISABLED',
|
|
72
|
-
'OPACITY_TOOLTIP',
|
|
73
|
-
'SIZE_BORDER_RADIUS',
|
|
74
|
-
'BORDER_1',
|
|
75
|
-
'BORDER_2',
|
|
76
|
-
'BORDER_3',
|
|
77
|
-
'BORDER_SELECTION_3',
|
|
78
|
-
'BORDER_SELECTION_2',
|
|
79
|
-
'BORDER_SELECTION_1',
|
|
80
|
-
'W_STATUS_BAR_BACKGROUND_COLOR',
|
|
81
|
-
'PATH_RESOURCES',
|
|
82
|
-
]
|
|
83
|
-
dic = OrderedDict()
|
|
84
|
-
for var in order:
|
|
85
|
-
value = getattr(cls, var)
|
|
86
|
-
|
|
87
|
-
if var == 'ID':
|
|
88
|
-
value = "'{}'".format(value)
|
|
89
|
-
|
|
90
|
-
if colors_only:
|
|
91
|
-
if not var.startswith('COLOR'):
|
|
92
|
-
value = None
|
|
93
|
-
|
|
94
|
-
if value:
|
|
95
|
-
dic[var] = value
|
|
96
|
-
|
|
97
|
-
return dic
|
|
98
|
-
|
|
99
|
-
@classmethod
|
|
100
|
-
def color_palette(cls):
|
|
101
|
-
"""Return the ordered colored palette dictionary."""
|
|
102
|
-
return cls.to_dict(colors_only=True)
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
"""
|
|
3
|
-
Utilities for processing SASS and images from default and custom palette.
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
# Standard library imports
|
|
7
|
-
import logging
|
|
8
|
-
import sys
|
|
9
|
-
|
|
10
|
-
# Local imports
|
|
11
|
-
from qdarkstyle import PACKAGE_PATH, QRC_FILE_SUFFIX
|
|
12
|
-
from qdarkstyle.utils.images import (compile_qrc_file, create_images,
|
|
13
|
-
create_palette_image, generate_qrc_file)
|
|
14
|
-
from qdarkstyle.utils.scss import create_qss
|
|
15
|
-
|
|
16
|
-
_logger = logging.getLogger(__name__)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def process_palette(palette, compile_for='qtpy'):
|
|
20
|
-
"""Process palette class to create a new palette file/folders.
|
|
21
|
-
|
|
22
|
-
It generates all files below, in this order:
|
|
23
|
-
- Palette files (svg/.png) under docs/images/[palette_id]
|
|
24
|
-
- Image files (.png) under [palette_id]/rc folder.
|
|
25
|
-
- QRC file in [palette_id]/[palette_id]style.qrc (C++).
|
|
26
|
-
- SCSS variables in [palette_id]/_variables.scss file.
|
|
27
|
-
- QSS file in [palette_id]/[palette_id]style.qss.
|
|
28
|
-
- Compiled QRC file in [palette_id]/[palette_id]style_rc.py
|
|
29
|
-
|
|
30
|
-
TODO:
|
|
31
|
-
- Must generalize to create custom palettes and folder paths.
|
|
32
|
-
- Must create/copy all files under [palette_id], such as main.scss,
|
|
33
|
-
__init__.py, palette.py.
|
|
34
|
-
- Add option or avoid adding the palette under docs for custom palettes.
|
|
35
|
-
|
|
36
|
-
Args:
|
|
37
|
-
palette (Palette): Palette.
|
|
38
|
-
compile_for (list, optional): Prefix used in resources.
|
|
39
|
-
Defaults to 'qtpy'. Possible values are 'qtpy', 'pyqtgraph',
|
|
40
|
-
'pyqt', 'pyqt5', 'pyqt6',
|
|
41
|
-
'pyside', 'pyside2', 'pyside6',
|
|
42
|
-
'qt', 'qt5', qt6, 'all'.
|
|
43
|
-
"""
|
|
44
|
-
|
|
45
|
-
if palette is None:
|
|
46
|
-
_logger.error("Please pass a palette class in order to create its "
|
|
47
|
-
"associated images")
|
|
48
|
-
sys.exit(1)
|
|
49
|
-
|
|
50
|
-
if palette.ID is None:
|
|
51
|
-
_logger.error("A QDarkStyle palette requires an ID!")
|
|
52
|
-
sys.exit(1)
|
|
53
|
-
|
|
54
|
-
id_ = palette.ID
|
|
55
|
-
print(f"-- PROCESSING THEME: {id_}")
|
|
56
|
-
|
|
57
|
-
# TODO: delete/remove all files and folders to ensure that old files
|
|
58
|
-
# are not used
|
|
59
|
-
|
|
60
|
-
print(f"-- GENERATING PALETTE IMAGE FOR: {id_}")
|
|
61
|
-
create_palette_image(palette=palette)
|
|
62
|
-
|
|
63
|
-
print(f"-- GENERATING IMAGE FILES (.svg > .png) FOR: {id_}")
|
|
64
|
-
create_images(palette=palette)
|
|
65
|
-
|
|
66
|
-
print(f"-- GENERATING QRC FILE FOR: {id_}")
|
|
67
|
-
generate_qrc_file(palette=palette)
|
|
68
|
-
|
|
69
|
-
print(f"-- GENERATING QSS FILE (.scss > .qss) FOR: {id_}")
|
|
70
|
-
create_qss(palette=palette)
|
|
71
|
-
|
|
72
|
-
print(f"-- CONVERTING RESOURCE FILE (. qrc > _rc.py/.rcc) FOR: {id_}")
|
|
73
|
-
compile_qrc_file(compile_for=compile_for, palette=palette)
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
"""Script to process QRC files (convert .qrc to _rc.py and .rcc).
|
|
3
|
-
|
|
4
|
-
The script will attempt to compile the qrc file using the following tools:
|
|
5
|
-
|
|
6
|
-
- `pyside6-rcc` for PySide6 and QtPy (Python) (Official)
|
|
7
|
-
- There is no specific rcc compiler for PyQt6, use `pyside6-rcc` (Python)
|
|
8
|
-
- `pyrcc5` for PyQt5 (Python)
|
|
9
|
-
- `pyside2-rcc` for PySide2 (Python)
|
|
10
|
-
- `rcc` for Qt5/Qt6 (C++)
|
|
11
|
-
|
|
12
|
-
Delete the compiled files that you don't want to use manually after
|
|
13
|
-
running this script.
|
|
14
|
-
|
|
15
|
-
Links to understand those tools:
|
|
16
|
-
|
|
17
|
-
- `pyside6-rcc`: https://doc.qt.io/qtforpython/tutorials/basictutorial/qrcfiles.html (Official)
|
|
18
|
-
- `pyrcc5`: http://pyqt.sourceforge.net/Docs/PyQt5/resources.html#pyrcc5
|
|
19
|
-
- `pyside2-rcc: https://doc.qt.io/qtforpython/overviews/resources.html (Documentation Incomplete)
|
|
20
|
-
- `rcc` on Qt6: https://doc.qt.io/qt-6/resources.html
|
|
21
|
-
- `rcc` on Qt5: http://doc.qt.io/qt-5/rcc.html
|
|
22
|
-
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
# Standard library imports
|
|
26
|
-
import argparse
|
|
27
|
-
import logging
|
|
28
|
-
import sys
|
|
29
|
-
|
|
30
|
-
# Third party imports
|
|
31
|
-
from watchdog.events import FileSystemEventHandler
|
|
32
|
-
from watchdog.observers import Observer
|
|
33
|
-
|
|
34
|
-
# Local imports
|
|
35
|
-
from qdarkstyle import PACKAGE_PATH
|
|
36
|
-
from qdarkstyle.dark.palette import DarkPalette
|
|
37
|
-
from qdarkstyle.light.palette import LightPalette
|
|
38
|
-
from qdarkstyle.utils import process_palette
|
|
39
|
-
|
|
40
|
-
_logger = logging.getLogger(__name__)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
class QSSFileHandler(FileSystemEventHandler):
|
|
44
|
-
"""QSS File observer."""
|
|
45
|
-
|
|
46
|
-
def __init__(self, parser_args):
|
|
47
|
-
"""QSS File observer."""
|
|
48
|
-
super(QSSFileHandler, self).__init__()
|
|
49
|
-
self.args = parser_args
|
|
50
|
-
|
|
51
|
-
def on_modified(self, event):
|
|
52
|
-
"""Handle file system events."""
|
|
53
|
-
if event.src_path.endswith('.qss'):
|
|
54
|
-
# TODO: needs implementation for new palettes
|
|
55
|
-
process_palette(compile_for=self.args.create)
|
|
56
|
-
print('\n')
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def main():
|
|
60
|
-
"""Process QRC files."""
|
|
61
|
-
parser = argparse.ArgumentParser(description=__doc__,
|
|
62
|
-
formatter_class=argparse.RawDescriptionHelpFormatter)
|
|
63
|
-
parser.add_argument('--qrc_dir',
|
|
64
|
-
default=None,
|
|
65
|
-
type=str,
|
|
66
|
-
help="QRC file directory, relative to current directory.",)
|
|
67
|
-
parser.add_argument('--create',
|
|
68
|
-
default='qtpy',
|
|
69
|
-
choices=['pyqt5', 'pyqt6', 'pyside2', 'pyside6', 'qtpy', 'pyqtgraph', 'qt', 'qt5', 'all'],
|
|
70
|
-
type=str,
|
|
71
|
-
help="Choose which one would be generated.")
|
|
72
|
-
parser.add_argument('--watch', '-w',
|
|
73
|
-
action='store_true',
|
|
74
|
-
help="Watch for file changes.")
|
|
75
|
-
|
|
76
|
-
args = parser.parse_args()
|
|
77
|
-
|
|
78
|
-
if args.watch:
|
|
79
|
-
path = PACKAGE_PATH
|
|
80
|
-
observer = Observer()
|
|
81
|
-
handler = QSSFileHandler(parser_args=args)
|
|
82
|
-
observer.schedule(handler, path, recursive=True)
|
|
83
|
-
try:
|
|
84
|
-
print('\nWatching QSS file for changes...\nPress Ctrl+C to exit\n')
|
|
85
|
-
observer.start()
|
|
86
|
-
except KeyboardInterrupt:
|
|
87
|
-
observer.stop()
|
|
88
|
-
observer.join()
|
|
89
|
-
else:
|
|
90
|
-
for palette in [DarkPalette, LightPalette]:
|
|
91
|
-
process_palette(palette=palette, compile_for=args.create)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if __name__ == "__main__":
|
|
95
|
-
logging.basicConfig(level=logging.DEBUG)
|
|
96
|
-
sys.exit(main())
|