psychopy 2024.1.1__py3-none-any.whl → 2024.1.3__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.
Potentially problematic release.
This version of psychopy might be problematic. Click here for more details.
- psychopy/__init__.py +2 -2
- psychopy/alerts/_alerts.py +6 -2
- psychopy/alerts/alertsCatalogue/alertmsg.py +15 -0
- psychopy/app/builder/dialogs/paramCtrls.py +4 -2
- psychopy/app/builder/localizedStrings.py +16 -4
- psychopy/app/locale/ar_001/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/cs_CZ/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/da_DK/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/de_DE/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/el_GR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/en_NZ/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/en_US/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_ES/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/fa_IR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/fi_FI/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/fr_FR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/he_IL/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/hi_IN/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/hu_HU/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/it_IT/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ja_JP/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ja_JP/LC_MESSAGE/messages.po +3548 -5422
- psychopy/app/locale/ko_KR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ms_MY/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/nl_NL/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/nn_NO/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/pl_PL/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/pt_PT/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ro_RO/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ru_RU/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/sv_SE/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/tr_TR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/zh_CN/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/zh_TW/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/plugin_manager/plugins.py +1 -1
- psychopy/app/preferencesDlg.py +2 -1
- psychopy/demos/builder/Hardware/EEG_parallel_component/EEG_triggers_parallel_comp.psyexp +552 -550
- psychopy/demos/builder/Hardware/EEG_serial_component/EEG_triggers_serial_comp.psyexp +572 -570
- psychopy/demos/coder/timing/timeByFrames.py +7 -1
- psychopy/experiment/components/_base.py +122 -0
- psychopy/experiment/components/aperture/__init__.py +6 -2
- psychopy/experiment/components/brush/__init__.py +3 -1
- psychopy/experiment/components/button/__init__.py +6 -2
- psychopy/experiment/components/buttonBox/__init__.py +2 -1
- psychopy/experiment/components/camera/__init__.py +13 -0
- psychopy/experiment/components/code/__init__.py +34 -1
- psychopy/experiment/components/form/formItems.xltx +0 -0
- psychopy/experiment/components/mouse/__init__.py +12 -0
- psychopy/experiment/components/polygon/__init__.py +14 -3
- psychopy/experiment/components/settings/__init__.py +4 -1
- psychopy/experiment/components/sound/__init__.py +1 -1
- psychopy/experiment/components/text/__init__.py +1 -1
- psychopy/experiment/params.py +17 -0
- psychopy/experiment/routines/_base.py +122 -0
- psychopy/experiment/routines/counterbalance/__init__.py +1 -1
- psychopy/hardware/button.py +4 -3
- psychopy/hardware/camera/__init__.py +6 -0
- psychopy/hardware/keyboard.py +8 -3
- psychopy/iohub/devices/eyetracker/hw/gazepoint/__init__.py +1 -1
- psychopy/iohub/devices/eyetracker/hw/gazepoint/gp3/__init__.py +1 -1
- psychopy/iohub/devices/eyetracker/hw/gazepoint/gp3/calibration.py +1 -1
- psychopy/iohub/devices/eyetracker/hw/gazepoint/gp3/eyetracker.py +1 -1
- psychopy/localization/generateTranslationTemplate.py +45 -19
- psychopy/localization/messages.pot +5049 -3418
- psychopy/preferences/Darwin.spec +2 -0
- psychopy/preferences/FreeBSD.spec +2 -0
- psychopy/preferences/Linux.spec +2 -0
- psychopy/preferences/Windows.spec +2 -0
- psychopy/preferences/baseNoArch.spec +2 -0
- psychopy/preferences/generateHints.py +2 -1
- psychopy/preferences/hints.py +118 -97
- psychopy/tests/test_experiment/test_components/__init__.py +1 -1
- psychopy/tests/test_experiment/test_components/{test_ButtonBox.py → test_ButtonBoxComponent.py} +9 -27
- psychopy/tests/test_experiment/test_components/{test_Code.py → test_CodeComponent.py} +8 -20
- psychopy/tests/test_experiment/test_components/test_GratingComponent.py +7 -0
- psychopy/tests/test_experiment/test_components/test_ImageComponent.py +8 -0
- psychopy/tests/test_experiment/test_components/{test_Mouse.py → test_MouseComponent.py} +44 -57
- psychopy/tests/test_experiment/test_components/{test_Polygon.py → test_PolygonComponent.py} +9 -25
- psychopy/tests/test_experiment/test_components/{test_ResourceManager.py → test_ResourceManagerComponent.py} +3 -13
- psychopy/tests/test_experiment/test_components/{test_Settings.py → test_SettingsComponent.py} +1 -3
- psychopy/tests/test_experiment/test_components/{test_Static.py → test_StaticComponent.py} +3 -12
- psychopy/tests/test_experiment/test_components/test_all_components.py +8 -66
- psychopy/tests/test_experiment/test_components/test_base_components.py +212 -125
- psychopy/tools/fontmanager.py +1 -1
- psychopy/tools/versionchooser.py +1 -1
- psychopy/visual/noise.py +9 -0
- psychopy/visual/radial.py +8 -0
- psychopy/visual/secondorder.py +9 -0
- psychopy/visual/textbox2/textbox2.py +19 -21
- {psychopy-2024.1.1.dist-info → psychopy-2024.1.3.dist-info}/METADATA +1 -1
- {psychopy-2024.1.1.dist-info → psychopy-2024.1.3.dist-info}/RECORD +95 -66
- {psychopy-2024.1.1.dist-info → psychopy-2024.1.3.dist-info}/WHEEL +1 -1
- psychopy/tests/test_experiment/test_components/test_Image.py +0 -24
- {psychopy-2024.1.1.dist-info → psychopy-2024.1.3.dist-info}/entry_points.txt +0 -0
- {psychopy-2024.1.1.dist-info → psychopy-2024.1.3.dist-info}/licenses/AUTHORS.md +0 -0
- {psychopy-2024.1.1.dist-info → psychopy-2024.1.3.dist-info}/licenses/LICENSE +0 -0
psychopy/preferences/Darwin.spec
CHANGED
|
@@ -147,6 +147,8 @@
|
|
|
147
147
|
[piloting]
|
|
148
148
|
# Prevent the experiment from being fullscreen when piloting
|
|
149
149
|
forceWindowed = boolean(default=True)
|
|
150
|
+
# What window size to use when forced to windowed mode
|
|
151
|
+
forcedWindowSize = list(default=list(800, 600))
|
|
150
152
|
# How much output to include in the log files when piloting ('error' is fewest messages, 'debug' is most)
|
|
151
153
|
pilotLoggingLevel = option('error', 'warning', 'data', 'exp', 'info', 'debug', default='debug')
|
|
152
154
|
# Show an orange border around the window when in piloting mode
|
|
@@ -147,6 +147,8 @@
|
|
|
147
147
|
[piloting]
|
|
148
148
|
# Prevent the experiment from being fullscreen when piloting
|
|
149
149
|
forceWindowed = boolean(default=True)
|
|
150
|
+
# What window size to use when forced to windowed mode
|
|
151
|
+
forcedWindowSize = list(default=list(800, 600))
|
|
150
152
|
# How much output to include in the log files when piloting ('error' is fewest messages, 'debug' is most)
|
|
151
153
|
pilotLoggingLevel = option('error', 'warning', 'data', 'exp', 'info', 'debug', default='debug')
|
|
152
154
|
# Show an orange border around the window when in piloting mode
|
psychopy/preferences/Linux.spec
CHANGED
|
@@ -147,6 +147,8 @@
|
|
|
147
147
|
[piloting]
|
|
148
148
|
# Prevent the experiment from being fullscreen when piloting
|
|
149
149
|
forceWindowed = boolean(default=True)
|
|
150
|
+
# What window size to use when forced to windowed mode
|
|
151
|
+
forcedWindowSize = list(default=list(800, 600))
|
|
150
152
|
# How much output to include in the log files when piloting ('error' is fewest messages, 'debug' is most)
|
|
151
153
|
pilotLoggingLevel = option('error', 'warning', 'data', 'exp', 'info', 'debug', default='debug')
|
|
152
154
|
# Show an orange border around the window when in piloting mode
|
|
@@ -147,6 +147,8 @@
|
|
|
147
147
|
[piloting]
|
|
148
148
|
# Prevent the experiment from being fullscreen when piloting
|
|
149
149
|
forceWindowed = boolean(default=True)
|
|
150
|
+
# What window size to use when forced to windowed mode
|
|
151
|
+
forcedWindowSize = list(default=list(800, 600))
|
|
150
152
|
# How much output to include in the log files when piloting ('error' is fewest messages, 'debug' is most)
|
|
151
153
|
pilotLoggingLevel = option('error', 'warning', 'data', 'exp', 'info', 'debug', default='debug')
|
|
152
154
|
# Show an orange border around the window when in piloting mode
|
|
@@ -143,6 +143,8 @@
|
|
|
143
143
|
[piloting]
|
|
144
144
|
# Prevent the experiment from being fullscreen when piloting
|
|
145
145
|
forceWindowed = boolean(default=True)
|
|
146
|
+
# What window size to use when forced to windowed mode
|
|
147
|
+
forcedWindowSize = list(default=list(800, 600))
|
|
146
148
|
# How much output to include in the log files when piloting ('error' is fewest messages, 'debug' is most)
|
|
147
149
|
pilotLoggingLevel = option('error', 'warning', 'data', 'exp', 'info', 'debug', default='debug')
|
|
148
150
|
# Show an orange border around the window when in piloting mode
|
|
@@ -20,7 +20,8 @@ specfiles = ('baseNoArch.spec', 'Darwin.spec',
|
|
|
20
20
|
'FreeBSD.spec', 'Linux.spec', 'Windows.spec')
|
|
21
21
|
# list of sections to parse.
|
|
22
22
|
prefsDlgSections = ('[general]', '[app]', '[coder]', '[builder]',
|
|
23
|
-
'[hardware]', '[
|
|
23
|
+
'[hardware]', '[piloting]', '[connections]',
|
|
24
|
+
'[keyBindings]')
|
|
24
25
|
# regular expression to extract comment text (as in-lined in .spec files)
|
|
25
26
|
commentObj = re.compile(r'\#\s*(\S.*$)')
|
|
26
27
|
|
psychopy/preferences/hints.py
CHANGED
|
@@ -9,40 +9,40 @@
|
|
|
9
9
|
from psychopy.localization import _translate
|
|
10
10
|
|
|
11
11
|
# baseNoArch.spec,[general],line25
|
|
12
|
-
_translate("
|
|
12
|
+
_translate("the default units for windows and visual stimuli")
|
|
13
13
|
|
|
14
14
|
# baseNoArch.spec,[general],line27
|
|
15
|
-
_translate("
|
|
15
|
+
_translate("full screen is best for accurate timing")
|
|
16
16
|
|
|
17
17
|
# baseNoArch.spec,[general],line29
|
|
18
|
-
_translate("
|
|
18
|
+
_translate("enable subjects to use the mouse and GUIs during experiments")
|
|
19
19
|
|
|
20
20
|
# baseNoArch.spec,[general],line31
|
|
21
|
-
_translate("
|
|
21
|
+
_translate("'version' is for internal usage, not for the user")
|
|
22
22
|
|
|
23
23
|
# baseNoArch.spec,[general],line33
|
|
24
|
-
_translate("
|
|
24
|
+
_translate("Add paths here to your custom Python modules")
|
|
25
25
|
|
|
26
26
|
# baseNoArch.spec,[general],line35
|
|
27
|
-
_translate("
|
|
27
|
+
_translate("path to flac (lossless audio compression) on this operating system")
|
|
28
28
|
|
|
29
29
|
# baseNoArch.spec,[general],line37
|
|
30
|
-
_translate("
|
|
30
|
+
_translate("Shutdown keys, following the pyglet naming scheme.")
|
|
31
31
|
|
|
32
32
|
# baseNoArch.spec,[general],line39
|
|
33
|
-
_translate("
|
|
33
|
+
_translate("Modifier keys for shutdown keys")
|
|
34
34
|
|
|
35
35
|
# baseNoArch.spec,[general],line41
|
|
36
|
-
_translate("
|
|
36
|
+
_translate("What to do if gamma-correction not possible")
|
|
37
37
|
|
|
38
38
|
# baseNoArch.spec,[general],line43
|
|
39
|
-
_translate("
|
|
39
|
+
_translate("Add plugin names here to load when a PsychoPy session starts.")
|
|
40
40
|
|
|
41
41
|
# baseNoArch.spec,[general],line45
|
|
42
|
-
_translate("
|
|
42
|
+
_translate("Google Cloud Platform key, required for the audio transcription using Google Speech Recognition. Specified as a path to a JSON file containing the key data.")
|
|
43
43
|
|
|
44
44
|
# baseNoArch.spec,[general],line47
|
|
45
|
-
_translate("
|
|
45
|
+
_translate("LEGACY: which system to use as a backend for drawing")
|
|
46
46
|
|
|
47
47
|
# baseNoArch.spec,[general],line50
|
|
48
48
|
_translate("display tips when starting PsychoPy")
|
|
@@ -70,260 +70,281 @@ _translate(
|
|
|
70
70
|
_translate("Theme")
|
|
71
71
|
|
|
72
72
|
# baseNoArch.spec,[app],line66
|
|
73
|
+
_translate("Show / hide splash screen")
|
|
74
|
+
|
|
75
|
+
# baseNoArch.spec,[app],line68
|
|
73
76
|
_translate(
|
|
74
77
|
"open Coder files as read-only (allows running without accidental changes)")
|
|
75
78
|
|
|
76
|
-
# baseNoArch.spec,[app],
|
|
79
|
+
# baseNoArch.spec,[app],line71
|
|
77
80
|
_translate("a list of font names; the first one found on the system will be used")
|
|
78
81
|
|
|
79
|
-
# baseNoArch.spec,[coder],
|
|
82
|
+
# baseNoArch.spec,[coder],line73
|
|
80
83
|
_translate("Font size (in pts) takes an integer between 6 and 24")
|
|
81
84
|
|
|
82
|
-
# baseNoArch.spec,[coder],
|
|
85
|
+
# baseNoArch.spec,[coder],line75
|
|
83
86
|
_translate("Spacing between lines")
|
|
84
87
|
|
|
85
|
-
# baseNoArch.spec,[coder],
|
|
88
|
+
# baseNoArch.spec,[coder],line79
|
|
86
89
|
_translate("Long line edge guide, specify zero to disable")
|
|
87
90
|
|
|
88
|
-
# baseNoArch.spec,[coder],
|
|
91
|
+
# baseNoArch.spec,[coder],line83
|
|
89
92
|
_translate("Set the source assistant panel to be visible by default")
|
|
90
93
|
|
|
91
|
-
# baseNoArch.spec,[coder],
|
|
94
|
+
# baseNoArch.spec,[coder],line85
|
|
92
95
|
_translate("Set the output/shell to be visible by default")
|
|
93
96
|
|
|
94
|
-
# baseNoArch.spec,[coder],
|
|
97
|
+
# baseNoArch.spec,[coder],line87
|
|
95
98
|
_translate(
|
|
96
99
|
"Show code completion suggestion and calltips automatically when typing.")
|
|
97
100
|
|
|
98
|
-
# baseNoArch.spec,[coder],
|
|
101
|
+
# baseNoArch.spec,[coder],line89
|
|
99
102
|
_translate("reload previously opened files after start")
|
|
100
103
|
|
|
101
|
-
# baseNoArch.spec,[coder],
|
|
104
|
+
# baseNoArch.spec,[coder],line91
|
|
102
105
|
_translate("for coder shell window, which shell to use")
|
|
103
106
|
|
|
104
|
-
# baseNoArch.spec,[coder],
|
|
107
|
+
# baseNoArch.spec,[coder],line93
|
|
105
108
|
_translate("whether to automatically reload a previously open experiment")
|
|
106
109
|
|
|
107
|
-
# baseNoArch.spec,[coder],
|
|
110
|
+
# baseNoArch.spec,[coder],line95
|
|
108
111
|
_translate("Default to when writing code components")
|
|
109
112
|
|
|
110
|
-
# baseNoArch.spec,[coder],
|
|
113
|
+
# baseNoArch.spec,[coder],line98
|
|
111
114
|
_translate(
|
|
112
115
|
"if False will create scripts with an 'easier' but more cluttered namespace")
|
|
113
116
|
|
|
114
|
-
# baseNoArch.spec,[builder],
|
|
117
|
+
# baseNoArch.spec,[builder],line100
|
|
115
118
|
_translate("folder names for custom components; expects a comma-separated list")
|
|
116
119
|
|
|
117
|
-
# baseNoArch.spec,[builder],
|
|
120
|
+
# baseNoArch.spec,[builder],line102
|
|
118
121
|
_translate("Only show components which work in...")
|
|
119
122
|
|
|
120
|
-
# baseNoArch.spec,[builder],
|
|
123
|
+
# baseNoArch.spec,[builder],line104
|
|
121
124
|
_translate("a list of components to hide (eg, because you never use them)")
|
|
122
125
|
|
|
123
|
-
# baseNoArch.spec,[builder],
|
|
126
|
+
# baseNoArch.spec,[builder],line106
|
|
127
|
+
_translate("Abbreviate long component names to maximise timeline space?")
|
|
128
|
+
|
|
129
|
+
# baseNoArch.spec,[builder],line108
|
|
124
130
|
_translate("where the Builder demos are located on this computer (after unpacking)")
|
|
125
131
|
|
|
126
|
-
# baseNoArch.spec,[builder],
|
|
132
|
+
# baseNoArch.spec,[builder],line110
|
|
127
133
|
_translate(
|
|
128
134
|
"name of the folder where subject data should be saved (relative to the script)")
|
|
129
135
|
|
|
130
|
-
# baseNoArch.spec,[builder],
|
|
136
|
+
# baseNoArch.spec,[builder],line112
|
|
131
137
|
_translate("Panels arrangement: Should Flow be on the top or bottom, and should Components be on the left or right?")
|
|
132
138
|
|
|
133
|
-
# baseNoArch.spec,[builder],
|
|
139
|
+
# baseNoArch.spec,[builder],line114
|
|
134
140
|
_translate("Display text in a floating window that describes the experiment")
|
|
135
141
|
|
|
136
|
-
# baseNoArch.spec,[builder],
|
|
142
|
+
# baseNoArch.spec,[builder],line116
|
|
137
143
|
_translate("Upper limit on how many components can be in favorites")
|
|
138
144
|
|
|
139
|
-
# baseNoArch.spec,[builder],
|
|
145
|
+
# baseNoArch.spec,[builder],line118
|
|
140
146
|
_translate("Ask for confirmation when closing a routine tab.")
|
|
141
147
|
|
|
142
|
-
# baseNoArch.spec,[builder],
|
|
143
|
-
_translate("choice of audio library")
|
|
148
|
+
# baseNoArch.spec,[builder],line120
|
|
149
|
+
_translate("LEGACY: choice of audio library")
|
|
144
150
|
|
|
145
|
-
# baseNoArch.spec,[builder],
|
|
151
|
+
# baseNoArch.spec,[builder],line122
|
|
146
152
|
_translate(
|
|
147
|
-
"latency mode for PsychToolbox audio (3 is good for most applications. See")
|
|
153
|
+
"LEGACY: latency mode for PsychToolbox audio (3 is good for most applications. See")
|
|
148
154
|
|
|
149
|
-
# baseNoArch.spec,[builder],
|
|
155
|
+
# baseNoArch.spec,[builder],line124
|
|
150
156
|
_translate("audio driver to use")
|
|
151
157
|
|
|
152
|
-
# baseNoArch.spec,[builder],
|
|
158
|
+
# baseNoArch.spec,[builder],line127
|
|
153
159
|
_translate("audio device to use (if audioLib allows control)")
|
|
154
160
|
|
|
155
|
-
# baseNoArch.spec,[hardware],
|
|
161
|
+
# baseNoArch.spec,[hardware],line129
|
|
156
162
|
_translate("a list of parallel ports")
|
|
157
163
|
|
|
158
|
-
# baseNoArch.spec,[hardware],
|
|
164
|
+
# baseNoArch.spec,[hardware],line131
|
|
159
165
|
_translate("The name of the Qmix pump configuration to use")
|
|
160
166
|
|
|
161
|
-
# baseNoArch.spec,[hardware],
|
|
167
|
+
# baseNoArch.spec,[hardware],line133
|
|
168
|
+
_translate("Prevent the experiment from being fullscreen when piloting")
|
|
169
|
+
|
|
170
|
+
# baseNoArch.spec,[hardware],line135
|
|
171
|
+
_translate("How much output to include in the log files when piloting ('error' is fewest messages, 'debug' is most)")
|
|
172
|
+
|
|
173
|
+
# baseNoArch.spec,[hardware],line137
|
|
174
|
+
_translate("Show an orange border around the window when in piloting mode")
|
|
175
|
+
|
|
176
|
+
# baseNoArch.spec,[hardware],line139
|
|
177
|
+
_translate("Prevent experiment from enabling rush mode when piloting")
|
|
178
|
+
|
|
179
|
+
# baseNoArch.spec,[hardware],line142
|
|
162
180
|
_translate("the http proxy for usage stats and auto-updating; format is host: port")
|
|
163
181
|
|
|
164
|
-
# baseNoArch.spec,[
|
|
182
|
+
# baseNoArch.spec,[piloting],line144
|
|
165
183
|
_translate(
|
|
166
184
|
"override the above proxy settings with values found in the environment (if possible)")
|
|
167
185
|
|
|
168
|
-
# baseNoArch.spec,[
|
|
186
|
+
# baseNoArch.spec,[piloting],line146
|
|
169
187
|
_translate("allow PsychoPy to send anonymous usage stats; please allow if possible, it helps PsychoPy's development")
|
|
170
188
|
|
|
171
|
-
# baseNoArch.spec,[
|
|
189
|
+
# baseNoArch.spec,[piloting],line148
|
|
172
190
|
_translate("allow PsychoPy to check for new features and bug fixes")
|
|
173
191
|
|
|
174
|
-
# baseNoArch.spec,[
|
|
192
|
+
# baseNoArch.spec,[piloting],line150
|
|
175
193
|
_translate("max time to wait for a connection response")
|
|
176
194
|
|
|
177
|
-
# baseNoArch.spec,[
|
|
195
|
+
# baseNoArch.spec,[piloting],line153
|
|
178
196
|
_translate("open an existing file")
|
|
179
197
|
|
|
180
|
-
# baseNoArch.spec,[connections],
|
|
198
|
+
# baseNoArch.spec,[connections],line155
|
|
181
199
|
_translate("start a new experiment or script")
|
|
182
200
|
|
|
183
|
-
# baseNoArch.spec,[connections],
|
|
201
|
+
# baseNoArch.spec,[connections],line157
|
|
184
202
|
_translate("save a Builder or Coder file")
|
|
185
203
|
|
|
186
|
-
# baseNoArch.spec,[connections],
|
|
204
|
+
# baseNoArch.spec,[connections],line159
|
|
187
205
|
_translate("save a Builder or Coder file under a new name")
|
|
188
206
|
|
|
189
|
-
# baseNoArch.spec,[connections],
|
|
207
|
+
# baseNoArch.spec,[connections],line161
|
|
190
208
|
_translate("Coder: print the file")
|
|
191
209
|
|
|
192
|
-
# baseNoArch.spec,[connections],
|
|
210
|
+
# baseNoArch.spec,[connections],line163
|
|
193
211
|
_translate("close the Builder or Coder window")
|
|
194
212
|
|
|
195
|
-
# baseNoArch.spec,[
|
|
213
|
+
# baseNoArch.spec,[connections],line166
|
|
196
214
|
_translate("end the application (PsychoPy)")
|
|
197
215
|
|
|
198
|
-
# baseNoArch.spec,[keyBindings],
|
|
216
|
+
# baseNoArch.spec,[keyBindings],line168
|
|
199
217
|
_translate("open the preferences dialog")
|
|
200
218
|
|
|
201
|
-
# baseNoArch.spec,[keyBindings],
|
|
219
|
+
# baseNoArch.spec,[keyBindings],line170
|
|
202
220
|
_translate("export Builder experiment to HTML")
|
|
203
221
|
|
|
204
|
-
# baseNoArch.spec,[keyBindings],
|
|
222
|
+
# baseNoArch.spec,[keyBindings],line172
|
|
205
223
|
_translate("Coder: cut")
|
|
206
224
|
|
|
207
|
-
# baseNoArch.spec,[keyBindings],
|
|
225
|
+
# baseNoArch.spec,[keyBindings],line174
|
|
208
226
|
_translate("Coder: copy")
|
|
209
227
|
|
|
210
|
-
# baseNoArch.spec,[keyBindings],
|
|
228
|
+
# baseNoArch.spec,[keyBindings],line176
|
|
211
229
|
_translate("Coder: paste")
|
|
212
230
|
|
|
213
|
-
# baseNoArch.spec,[keyBindings],
|
|
231
|
+
# baseNoArch.spec,[keyBindings],line178
|
|
214
232
|
_translate("Coder: duplicate")
|
|
215
233
|
|
|
216
|
-
# baseNoArch.spec,[keyBindings],
|
|
234
|
+
# baseNoArch.spec,[keyBindings],line180
|
|
217
235
|
_translate("Coder: indent code by one level (4 spaces)")
|
|
218
236
|
|
|
219
|
-
# baseNoArch.spec,[keyBindings],
|
|
237
|
+
# baseNoArch.spec,[keyBindings],line182
|
|
220
238
|
_translate("Coder: reduce indentation by one level (4 spaces)")
|
|
221
239
|
|
|
222
|
-
# baseNoArch.spec,[keyBindings],
|
|
240
|
+
# baseNoArch.spec,[keyBindings],line184
|
|
223
241
|
_translate("Coder: indent to fit python syntax")
|
|
224
242
|
|
|
225
|
-
# baseNoArch.spec,[keyBindings],
|
|
243
|
+
# baseNoArch.spec,[keyBindings],line187
|
|
226
244
|
_translate("Coder: find")
|
|
227
245
|
|
|
228
|
-
# baseNoArch.spec,[keyBindings],
|
|
246
|
+
# baseNoArch.spec,[keyBindings],line189
|
|
229
247
|
_translate("Coder: find again")
|
|
230
248
|
|
|
231
|
-
# baseNoArch.spec,[keyBindings],
|
|
249
|
+
# baseNoArch.spec,[keyBindings],line191
|
|
232
250
|
_translate("Coder: undo")
|
|
233
251
|
|
|
234
|
-
# baseNoArch.spec,[keyBindings],
|
|
252
|
+
# baseNoArch.spec,[keyBindings],line193
|
|
235
253
|
_translate("Coder: redo")
|
|
236
254
|
|
|
237
|
-
# baseNoArch.spec,[keyBindings],
|
|
255
|
+
# baseNoArch.spec,[keyBindings],line195
|
|
238
256
|
_translate("Coder: add a # to the start of the line(s)")
|
|
239
257
|
|
|
240
|
-
# baseNoArch.spec,[keyBindings],
|
|
258
|
+
# baseNoArch.spec,[keyBindings],line197
|
|
241
259
|
_translate("Coder: remove # from start of line(s)")
|
|
242
260
|
|
|
243
|
-
# baseNoArch.spec,[keyBindings],
|
|
261
|
+
# baseNoArch.spec,[keyBindings],line199
|
|
244
262
|
_translate("Coder: add or remove # from start of line(s)")
|
|
245
263
|
|
|
246
|
-
# baseNoArch.spec,[keyBindings],
|
|
264
|
+
# baseNoArch.spec,[keyBindings],line201
|
|
247
265
|
_translate("Coder: fold this block of code")
|
|
248
266
|
|
|
249
|
-
# baseNoArch.spec,[keyBindings],
|
|
267
|
+
# baseNoArch.spec,[keyBindings],line203
|
|
250
268
|
_translate("Coder: increase font size this block of code")
|
|
251
269
|
|
|
252
|
-
# baseNoArch.spec,[keyBindings],
|
|
270
|
+
# baseNoArch.spec,[keyBindings],line205
|
|
253
271
|
_translate("Coder: decrease font size this block of code")
|
|
254
272
|
|
|
255
|
-
# baseNoArch.spec,[keyBindings],
|
|
273
|
+
# baseNoArch.spec,[keyBindings],line207
|
|
256
274
|
_translate("Coder: check for basic syntax errors")
|
|
257
275
|
|
|
258
|
-
# baseNoArch.spec,[keyBindings],
|
|
276
|
+
# baseNoArch.spec,[keyBindings],line209
|
|
259
277
|
_translate(
|
|
260
278
|
"convert a Builder .psyexp script into a python script and open it in the Coder")
|
|
261
279
|
|
|
262
|
-
# baseNoArch.spec,[keyBindings],
|
|
280
|
+
# baseNoArch.spec,[keyBindings],line211
|
|
263
281
|
_translate("launch a script, Builder or Coder, or run unit-tests")
|
|
264
282
|
|
|
265
|
-
# baseNoArch.spec,[keyBindings],
|
|
283
|
+
# baseNoArch.spec,[keyBindings],line213
|
|
266
284
|
_translate("attempt to interrupt and halt a running script")
|
|
267
285
|
|
|
268
|
-
# baseNoArch.spec,[keyBindings],
|
|
286
|
+
# baseNoArch.spec,[keyBindings],line215
|
|
269
287
|
_translate("Coder: show / hide white-space dots")
|
|
270
288
|
|
|
271
|
-
# baseNoArch.spec,[keyBindings],
|
|
289
|
+
# baseNoArch.spec,[keyBindings],line217
|
|
272
290
|
_translate("Coder: show / hide end of line characters")
|
|
273
291
|
|
|
274
|
-
# baseNoArch.spec,[keyBindings],
|
|
292
|
+
# baseNoArch.spec,[keyBindings],line219
|
|
275
293
|
_translate("Coder: show / hide indentation level lines")
|
|
276
294
|
|
|
277
|
-
# baseNoArch.spec,[keyBindings],
|
|
295
|
+
# baseNoArch.spec,[keyBindings],line222
|
|
278
296
|
_translate("Builder: create a new routine")
|
|
279
297
|
|
|
280
|
-
# baseNoArch.spec,[keyBindings],
|
|
298
|
+
# baseNoArch.spec,[keyBindings],line224
|
|
281
299
|
_translate("Builder: copy an existing routine")
|
|
282
300
|
|
|
283
|
-
# baseNoArch.spec,[keyBindings],
|
|
301
|
+
# baseNoArch.spec,[keyBindings],line226
|
|
284
302
|
_translate("Builder: paste the copied routine")
|
|
285
303
|
|
|
286
|
-
# baseNoArch.spec,[keyBindings],
|
|
304
|
+
# baseNoArch.spec,[keyBindings],line230
|
|
287
305
|
_translate("Builder: paste the copied component")
|
|
288
306
|
|
|
289
|
-
# baseNoArch.spec,[keyBindings],
|
|
307
|
+
# baseNoArch.spec,[keyBindings],line233
|
|
308
|
+
_translate("Builder: find")
|
|
309
|
+
|
|
310
|
+
# baseNoArch.spec,[keyBindings],line235
|
|
290
311
|
_translate("Coder: show / hide the output panel")
|
|
291
312
|
|
|
292
|
-
# baseNoArch.spec,[keyBindings],
|
|
313
|
+
# baseNoArch.spec,[keyBindings],line237
|
|
293
314
|
_translate("Builder: rename an existing routine")
|
|
294
315
|
|
|
295
|
-
# baseNoArch.spec,[keyBindings],
|
|
316
|
+
# baseNoArch.spec,[keyBindings],line240
|
|
296
317
|
_translate("switch between windows")
|
|
297
318
|
|
|
298
|
-
# baseNoArch.spec,[keyBindings],
|
|
319
|
+
# baseNoArch.spec,[keyBindings],line242
|
|
299
320
|
_translate("increase display size in Flow")
|
|
300
321
|
|
|
301
|
-
# baseNoArch.spec,[keyBindings],
|
|
322
|
+
# baseNoArch.spec,[keyBindings],line244
|
|
302
323
|
_translate("decrease display size in Flow")
|
|
303
324
|
|
|
304
|
-
# baseNoArch.spec,[keyBindings],
|
|
325
|
+
# baseNoArch.spec,[keyBindings],line246
|
|
305
326
|
_translate("increase display size of Routines")
|
|
306
327
|
|
|
307
|
-
# baseNoArch.spec,[keyBindings],
|
|
328
|
+
# baseNoArch.spec,[keyBindings],line248
|
|
308
329
|
_translate("decrease display size of Routines")
|
|
309
330
|
|
|
310
|
-
# baseNoArch.spec,[keyBindings],
|
|
331
|
+
# baseNoArch.spec,[keyBindings],line250
|
|
311
332
|
_translate("show or hide the readme (info) for this experiment if possible")
|
|
312
333
|
|
|
313
|
-
# baseNoArch.spec,[keyBindings],
|
|
334
|
+
# baseNoArch.spec,[keyBindings],line252
|
|
314
335
|
_translate("Projects: Log in to pavlovia")
|
|
315
336
|
|
|
316
|
-
# baseNoArch.spec,[keyBindings],
|
|
337
|
+
# baseNoArch.spec,[keyBindings],line254
|
|
317
338
|
_translate("Projects: Log in to OSF")
|
|
318
339
|
|
|
319
|
-
# baseNoArch.spec,[keyBindings],
|
|
340
|
+
# baseNoArch.spec,[keyBindings],line256
|
|
320
341
|
_translate("Projects: Sync project")
|
|
321
342
|
|
|
322
|
-
# baseNoArch.spec,[keyBindings],
|
|
343
|
+
# baseNoArch.spec,[keyBindings],line258
|
|
323
344
|
_translate("Projects: Find projects")
|
|
324
345
|
|
|
325
|
-
# baseNoArch.spec,[keyBindings],
|
|
346
|
+
# baseNoArch.spec,[keyBindings],line260
|
|
326
347
|
_translate("Projects: Open project")
|
|
327
348
|
|
|
328
|
-
# baseNoArch.spec,[keyBindings],
|
|
349
|
+
# baseNoArch.spec,[keyBindings],line262
|
|
329
350
|
_translate("Projects: Create new project")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
from .test_base_components import
|
|
1
|
+
from .test_base_components import BaseComponentTests
|
psychopy/tests/test_experiment/test_components/{test_ButtonBox.py → test_ButtonBoxComponent.py}
RENAMED
|
@@ -11,21 +11,14 @@ from psychopy.hardware.button import ButtonResponse
|
|
|
11
11
|
from psychopy.experiment.routines import Routine
|
|
12
12
|
from psychopy.experiment.components.buttonBox import ButtonBoxComponent
|
|
13
13
|
from psychopy.experiment.components.code import CodeComponent
|
|
14
|
-
from .test_base_components import
|
|
14
|
+
from psychopy.tests.test_experiment.test_components.test_base_components import BaseComponentTests
|
|
15
|
+
from psychopy.hardware.button import ButtonBox
|
|
15
16
|
|
|
16
17
|
|
|
17
|
-
class TestButtonBoxComponent(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
self.routine = Routine(name="testRoutine", exp=self.exp)
|
|
22
|
-
self.exp.addRoutine("testRoutine", self.routine)
|
|
23
|
-
self.exp.flow.addRoutine(self.routine, 0)
|
|
24
|
-
# make component
|
|
25
|
-
self.comp = ButtonBoxComponent(
|
|
26
|
-
exp=self.exp, name="testPhotodiodeValidatorRoutine", parentName="testRoutine"
|
|
27
|
-
)
|
|
28
|
-
|
|
18
|
+
class TestButtonBoxComponent(BaseComponentTests):
|
|
19
|
+
comp = ButtonBoxComponent
|
|
20
|
+
libraryClass = ButtonBox
|
|
21
|
+
|
|
29
22
|
def test_values(self):
|
|
30
23
|
"""
|
|
31
24
|
Test that a variety of different values work when run from Builder.
|
|
@@ -65,9 +58,8 @@ class TestButtonBoxComponent(_TestBaseComponentsMixin):
|
|
|
65
58
|
thisCase[keys[i]] = val
|
|
66
59
|
# add case
|
|
67
60
|
cases.append(thisCase)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
exp = Experiment()
|
|
61
|
+
# make minimal experiment just for this test
|
|
62
|
+
comp, rt, exp = self.make_minimal_experiment()
|
|
71
63
|
# configure experiment
|
|
72
64
|
exp.requireImport("ButtonResponse", importFrom="psychopy.hardware.button")
|
|
73
65
|
exp.settings.params['Full-screen window'].val = False
|
|
@@ -79,18 +71,8 @@ class TestButtonBoxComponent(_TestBaseComponentsMixin):
|
|
|
79
71
|
resps = case.pop("resps")
|
|
80
72
|
if not isinstance(resps, (list, tuple)):
|
|
81
73
|
resps = [resps]
|
|
82
|
-
# make a name
|
|
83
|
-
name = f"rt{i}"
|
|
84
|
-
# make a Routine
|
|
85
|
-
rt = exp.addRoutine(name, Routine(name=name, exp=exp))
|
|
86
|
-
exp.flow.addRoutine(rt, 0)
|
|
87
74
|
# add timeout
|
|
88
75
|
rt.settings.params['stopVal'].val = 0.2
|
|
89
|
-
# make a Component
|
|
90
|
-
comp = ButtonBoxComponent(
|
|
91
|
-
exp, parentName=name, name=name + "_comp", **case
|
|
92
|
-
)
|
|
93
|
-
rt.addComponent(comp)
|
|
94
76
|
# make a Code Component to send responses
|
|
95
77
|
code = (
|
|
96
78
|
"if frameN > 1:\n"
|
|
@@ -104,7 +86,7 @@ class TestButtonBoxComponent(_TestBaseComponentsMixin):
|
|
|
104
86
|
name=comp.name, value=resp.value, channel=resp.channel
|
|
105
87
|
)
|
|
106
88
|
codeComp = CodeComponent(
|
|
107
|
-
exp, parentName=name + "_code", eachFrame=code
|
|
89
|
+
exp, parentName=comp.name + "_code", eachFrame=code
|
|
108
90
|
)
|
|
109
91
|
rt.addComponent(codeComp)
|
|
110
92
|
# save exp in temp directory
|
|
@@ -2,42 +2,30 @@ from pathlib import Path
|
|
|
2
2
|
from tempfile import mkdtemp
|
|
3
3
|
|
|
4
4
|
from psychopy import experiment
|
|
5
|
-
from . import
|
|
5
|
+
from . import BaseComponentTests
|
|
6
6
|
from psychopy.experiment.loops import TrialHandler
|
|
7
7
|
from psychopy.experiment.routines import Routine
|
|
8
8
|
from psychopy.experiment.components.code import CodeComponent
|
|
9
9
|
from psychopy.tests.utils import TESTS_DATA_PATH
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class TestCodeComponent(
|
|
12
|
+
class TestCodeComponent(BaseComponentTests):
|
|
13
13
|
"""
|
|
14
14
|
Test that Code coponents have the correct params and write as expected.
|
|
15
15
|
"""
|
|
16
|
+
comp = CodeComponent
|
|
16
17
|
|
|
17
18
|
@classmethod
|
|
18
19
|
def setup_class(cls):
|
|
19
|
-
cls.exp = experiment.Experiment() # create once, not every test
|
|
20
20
|
try:
|
|
21
21
|
cls.tempDir = mkdtemp(dir=Path(__file__).root, prefix='psychopy-tests-app')
|
|
22
22
|
except (PermissionError, OSError):
|
|
23
23
|
# can't write to root on Linux
|
|
24
24
|
cls.tempDir = mkdtemp(prefix='psychopy-tests-app')
|
|
25
25
|
|
|
26
|
-
def setup_method(self):
|
|
27
|
-
# Make blank experiment
|
|
28
|
-
self.exp = experiment.Experiment()
|
|
29
|
-
# Make blank routine
|
|
30
|
-
self.routine = Routine(name="testRoutine", exp=self.exp)
|
|
31
|
-
self.exp.addRoutine("testRoutine", self.routine)
|
|
32
|
-
self.exp.flow.addRoutine(self.routine, 0)
|
|
33
|
-
# Add loop around routine
|
|
34
|
-
self.loop = TrialHandler(exp=self.exp, name="testLoop")
|
|
35
|
-
self.exp.flow.addLoop(self.loop, 0, -1)
|
|
36
|
-
# Make Mouse component
|
|
37
|
-
self.comp = CodeComponent(exp=self.exp, parentName="testRoutine", name="testCode")
|
|
38
|
-
self.routine.addComponent(self.comp)
|
|
39
|
-
|
|
40
26
|
def test_all_code_component_tabs(self):
|
|
27
|
+
# make minimal experiment just for this test
|
|
28
|
+
comp, rt, exp = self.make_minimal_experiment()
|
|
41
29
|
# Names of each tab in a Code component
|
|
42
30
|
tabs = {
|
|
43
31
|
'Before Experiment': '___before_experiment___',
|
|
@@ -50,11 +38,11 @@ class TestCodeComponent(_TestBaseComponentsMixin, _TestDisabledMixin):
|
|
|
50
38
|
# Add markers to component
|
|
51
39
|
for paramName, marker in tabs.items():
|
|
52
40
|
jsParamName = paramName.replace(" ", " JS ")
|
|
53
|
-
|
|
41
|
+
comp.params[paramName].val = comp.params[jsParamName].val = " = ".join([self.comp.__name__, comp.name, marker])
|
|
54
42
|
|
|
55
43
|
# Write script
|
|
56
|
-
pyScript =
|
|
57
|
-
jsScript =
|
|
44
|
+
pyScript = exp.writeScript(target="PsychoPy")
|
|
45
|
+
jsScript = exp.writeScript(target="PsychoJS")
|
|
58
46
|
|
|
59
47
|
# Check that code from each tab exists in compiled script
|
|
60
48
|
for lang, script in {"Python": pyScript, "JS": jsScript}.items():
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
from psychopy.tests.test_experiment.test_components.test_base_components import BaseComponentTests, _TestLibraryClassMixin
|
|
2
|
+
from psychopy.experiment.components.grating import GratingComponent
|
|
3
|
+
from psychopy.visual import GratingStim
|
|
4
|
+
|
|
5
|
+
class TestGratingComponent(BaseComponentTests, _TestLibraryClassMixin):
|
|
6
|
+
comp = GratingComponent
|
|
7
|
+
libraryClass = GratingStim
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from psychopy.experiment.components.image import ImageComponent
|
|
2
|
+
from psychopy.tests.test_experiment.test_components.test_base_components import BaseComponentTests, _TestDepthMixin, _TestLibraryClassMixin
|
|
3
|
+
from psychopy.visual.image import ImageStim
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class TestImage(BaseComponentTests, _TestLibraryClassMixin):
|
|
7
|
+
comp = ImageComponent
|
|
8
|
+
libraryClass = ImageStim
|