psychopy 2024.1.4__py3-none-any.whl → 2024.2.0__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.

Files changed (325) hide show
  1. psychopy/.DS_Store +0 -0
  2. psychopy/CHANGELOG.txt +206 -0
  3. psychopy/GIT_SHA +1 -0
  4. psychopy/VERSION +1 -0
  5. psychopy/__init__.py +77 -15
  6. psychopy/app/Resources/classic/plugin16.png +0 -0
  7. psychopy/app/Resources/classic/plugin16@2x.png +0 -0
  8. psychopy/app/Resources/dark/plugin16.png +0 -0
  9. psychopy/app/Resources/dark/plugin16@2x.png +0 -0
  10. psychopy/app/Resources/light/plugin16.png +0 -0
  11. psychopy/app/Resources/light/plugin16@2x.png +0 -0
  12. psychopy/app/__init__.py +76 -2
  13. psychopy/app/_psychopyApp.py +126 -101
  14. psychopy/app/builder/builder.py +14 -10
  15. psychopy/app/builder/dialogs/__init__.py +8 -8
  16. psychopy/app/builder/dialogs/dlgsConditions.py +12 -13
  17. psychopy/app/builder/dialogs/paramCtrls.py +24 -57
  18. psychopy/app/builder/validators.py +2 -2
  19. psychopy/app/coder/codeEditorBase.py +8 -8
  20. psychopy/app/coder/coder.py +4 -4
  21. psychopy/app/connections/sendusage.py +2 -2
  22. psychopy/app/connections/updates.py +9 -9
  23. psychopy/app/dialogs.py +34 -2
  24. psychopy/app/idle.py +31 -0
  25. psychopy/app/jobs.py +21 -3
  26. psychopy/app/linuxconfig/__init__.py +9 -0
  27. psychopy/app/locale/ar_001/LC_MESSAGE/messages.mo +0 -0
  28. psychopy/app/locale/ar_001/LC_MESSAGE/messages.po +4602 -2540
  29. psychopy/app/locale/es_CO/LC_MESSAGE/messages.mo +0 -0
  30. psychopy/app/locale/es_CO/LC_MESSAGE/messages.po +56 -54
  31. psychopy/app/locale/es_ES/LC_MESSAGE/messages.po +53 -43
  32. psychopy/app/locale/es_US/LC_MESSAGE/messages.mo +0 -0
  33. psychopy/app/locale/es_US/LC_MESSAGE/messages.po +56 -54
  34. psychopy/app/locale/ja_JP/LC_MESSAGE/messages.mo +0 -0
  35. psychopy/app/locale/ja_JP/LC_MESSAGE/messages.po +1011 -942
  36. psychopy/app/locale/pt_PT/LC_MESSAGE/messages.po +9415 -5
  37. psychopy/app/pavlovia_ui/_base.py +33 -3
  38. psychopy/app/pavlovia_ui/search.py +0 -1
  39. psychopy/app/plugin_manager/dialog.py +104 -51
  40. psychopy/app/plugin_manager/packages.py +5 -0
  41. psychopy/app/plugin_manager/plugins.py +145 -67
  42. psychopy/app/preferencesDlg.py +8 -8
  43. psychopy/app/psychopyApp.py +11 -5
  44. psychopy/app/ribbon.py +124 -14
  45. psychopy/app/runner/runner.py +6 -1
  46. psychopy/app/stdout/stdOutRich.py +27 -11
  47. psychopy/app/themes/icons.py +52 -2
  48. psychopy/assets/__init__.py +0 -0
  49. psychopy/assets/click.png +0 -0
  50. psychopy/assets/clicknext.png +0 -0
  51. psychopy/assets/next.png +0 -0
  52. psychopy/assets/psychopy.ico +0 -0
  53. psychopy/assets/psychopy.png +0 -0
  54. psychopy/assets/templates/__init__.py +0 -0
  55. psychopy/assets/touch.png +0 -0
  56. psychopy/assets/touchnext.png +0 -0
  57. psychopy/assets/window.ico +0 -0
  58. psychopy/changes/2023.1.0.md +9 -0
  59. psychopy/changes/2024.1.0.md +16 -0
  60. psychopy/changes/__init__.py +0 -0
  61. psychopy/clock.py +2 -2
  62. psychopy/colors.py +2 -1
  63. psychopy/compatibility.py +53 -1
  64. psychopy/contrib/.DS_Store +0 -0
  65. psychopy/contrib/configobj/__init__.py +10 -8
  66. psychopy/data/__init__.py +3 -2
  67. psychopy/data/base.py +5 -5
  68. psychopy/data/experiment.py +130 -4
  69. psychopy/data/routine.py +56 -0
  70. psychopy/data/staircase.py +2 -2
  71. psychopy/data/trial.py +559 -97
  72. psychopy/data/utils.py +56 -21
  73. psychopy/demos/.DS_Store +0 -0
  74. psychopy/demos/builder/.DS_Store +0 -0
  75. psychopy/demos/builder/Design Templates/.DS_Store +0 -0
  76. psychopy/demos/builder/Experiments/.DS_Store +0 -0
  77. psychopy/demos/builder/Feature Demos/.DS_Store +0 -0
  78. psychopy/demos/builder/Feature Demos/buttonBox/buttonBoxDemo.psyexp +375 -0
  79. psychopy/demos/builder/Feature Demos/buttonBox/readme.md +5 -0
  80. psychopy/demos/builder/Feature Demos/pilotMode/pilotMode.psyexp +433 -0
  81. psychopy/demos/builder/Feature Demos/pilotMode/readme.md +7 -0
  82. psychopy/demos/builder/Hardware/.DS_Store +0 -0
  83. psychopy/demos/builder/Helper Tools/.DS_Store +0 -0
  84. psychopy/demos/coder/.DS_Store +0 -0
  85. psychopy/demos/coder/hardware/testSoundLatency.py +2 -2
  86. psychopy/demos/coder/iohub/.DS_Store +0 -0
  87. psychopy/demos/coder/misc/hdf5_2_csv +33 -0
  88. psychopy/event.py +30 -29
  89. psychopy/experiment/.DS_Store +0 -0
  90. psychopy/experiment/_experiment.py +6 -6
  91. psychopy/experiment/components/.DS_Store +0 -0
  92. psychopy/experiment/components/__init__.py +6 -3
  93. psychopy/experiment/components/_base.py +286 -131
  94. psychopy/experiment/components/aperture/.DS_Store +0 -0
  95. psychopy/experiment/components/brush/.DS_Store +0 -0
  96. psychopy/experiment/components/button/.DS_Store +0 -0
  97. psychopy/experiment/components/button/__init__.py +5 -1
  98. psychopy/experiment/components/buttonBox/.DS_Store +0 -0
  99. psychopy/experiment/components/camera/.DS_Store +0 -0
  100. psychopy/experiment/components/code/.DS_Store +0 -0
  101. psychopy/experiment/components/dots/.DS_Store +0 -0
  102. psychopy/experiment/components/eyetracker_record/.DS_Store +0 -0
  103. psychopy/experiment/components/eyetracker_record/__init__.py +92 -30
  104. psychopy/experiment/components/form/.DS_Store +0 -0
  105. psychopy/experiment/components/form/__init__.py +6 -2
  106. psychopy/experiment/components/grating/.DS_Store +0 -0
  107. psychopy/experiment/components/grating/__init__.py +14 -3
  108. psychopy/experiment/components/image/.DS_Store +0 -0
  109. psychopy/experiment/components/image/__init__.py +14 -3
  110. psychopy/experiment/components/joyButtons/.DS_Store +0 -0
  111. psychopy/experiment/components/joystick/.DS_Store +0 -0
  112. psychopy/experiment/components/keyboard/.DS_Store +0 -0
  113. psychopy/experiment/components/keyboard/__init__.py +22 -10
  114. psychopy/experiment/components/microphone/.DS_Store +0 -0
  115. psychopy/experiment/components/microphone/__init__.py +59 -39
  116. psychopy/experiment/components/mouse/.DS_Store +0 -0
  117. psychopy/experiment/components/mouse/__init__.py +44 -29
  118. psychopy/experiment/components/movie/.DS_Store +0 -0
  119. psychopy/experiment/components/movie/__init__.py +1 -1
  120. psychopy/experiment/components/panorama/.DS_Store +0 -0
  121. psychopy/experiment/components/parallelOut/.DS_Store +0 -0
  122. psychopy/experiment/components/patch/.DS_Store +0 -0
  123. psychopy/experiment/components/polygon/.DS_Store +0 -0
  124. psychopy/experiment/components/polygon/__init__.py +26 -6
  125. psychopy/experiment/components/progress/.DS_Store +0 -0
  126. psychopy/experiment/components/ratingScale/.DS_Store +0 -0
  127. psychopy/experiment/components/resourceManager/.DS_Store +0 -0
  128. psychopy/experiment/components/roi/.DS_Store +0 -0
  129. psychopy/experiment/components/roi/__init__.py +5 -0
  130. psychopy/experiment/components/routineSettings/.DS_Store +0 -0
  131. psychopy/experiment/components/routineSettings/__init__.py +57 -10
  132. psychopy/experiment/components/serialOut/.DS_Store +0 -0
  133. psychopy/experiment/components/settings/.DS_Store +0 -0
  134. psychopy/experiment/components/settings/__init__.py +117 -42
  135. psychopy/experiment/components/slider/.DS_Store +0 -0
  136. psychopy/experiment/components/sound/.DS_Store +0 -0
  137. psychopy/experiment/components/sound/__init__.py +54 -19
  138. psychopy/experiment/components/static/.DS_Store +0 -0
  139. psychopy/experiment/components/static/__init__.py +1 -1
  140. psychopy/experiment/components/text/.DS_Store +0 -0
  141. psychopy/experiment/components/text/__init__.py +28 -3
  142. psychopy/experiment/components/textbox/.DS_Store +0 -0
  143. psychopy/experiment/components/textbox/__init__.py +12 -2
  144. psychopy/experiment/components/unknown/.DS_Store +0 -0
  145. psychopy/experiment/components/unknown/__init__.py +1 -2
  146. psychopy/experiment/components/unknownPlugin/.DS_Store +0 -0
  147. psychopy/experiment/components/unknownPlugin/__init__.py +2 -2
  148. psychopy/experiment/components/variable/.DS_Store +0 -0
  149. psychopy/experiment/flow.py +11 -4
  150. psychopy/experiment/loops.py +85 -37
  151. psychopy/experiment/params.py +74 -32
  152. psychopy/experiment/py2js_transpiler.py +8 -1
  153. psychopy/experiment/routines/.DS_Store +0 -0
  154. psychopy/experiment/routines/_base.py +102 -22
  155. psychopy/experiment/routines/counterbalance/.DS_Store +0 -0
  156. psychopy/experiment/routines/counterbalance/__init__.py +5 -1
  157. psychopy/experiment/routines/eyetracker_calibrate/.DS_Store +0 -0
  158. psychopy/experiment/routines/eyetracker_validate/.DS_Store +0 -0
  159. psychopy/experiment/routines/pavlovia_survey/.DS_Store +0 -0
  160. psychopy/experiment/routines/photodiodeValidator/.DS_Store +0 -0
  161. psychopy/experiment/routines/photodiodeValidator/__init__.py +6 -5
  162. psychopy/experiment/routines/unknown/.DS_Store +0 -0
  163. psychopy/gui/wxgui.py +4 -4
  164. psychopy/hardware/.DS_Store +0 -0
  165. psychopy/hardware/__init__.py +1 -1
  166. psychopy/hardware/base.py +12 -0
  167. psychopy/hardware/camera/__init__.py +1 -15
  168. psychopy/hardware/cedrus.py +10 -11
  169. psychopy/hardware/crs/colorcal.py +13 -22
  170. psychopy/hardware/crs/optical.py +10 -20
  171. psychopy/hardware/emulator.py +17 -14
  172. psychopy/hardware/eyetracker.py +42 -118
  173. psychopy/hardware/gammasci.py +4 -15
  174. psychopy/hardware/keyboard.py +102 -10
  175. psychopy/hardware/listener.py +3 -0
  176. psychopy/hardware/microphone.py +148 -18
  177. psychopy/hardware/minolta.py +8 -15
  178. psychopy/hardware/photodiode.py +191 -16
  179. psychopy/hardware/photometer/__init__.py +11 -19
  180. psychopy/hardware/pr.py +8 -15
  181. psychopy/hardware/speaker.py +39 -4
  182. psychopy/info.py +0 -71
  183. psychopy/iohub/.DS_Store +0 -0
  184. psychopy/iohub/__init__.py +1 -1
  185. psychopy/iohub/client/__init__.py +30 -20
  186. psychopy/iohub/client/keyboard.py +24 -24
  187. psychopy/iohub/datastore/__init__.py +2 -2
  188. psychopy/iohub/datastore/util.py +2 -2
  189. psychopy/iohub/default_config.yaml +1 -1
  190. psychopy/iohub/devices/.DS_Store +0 -0
  191. psychopy/iohub/devices/__init__.py +112 -25
  192. psychopy/iohub/devices/deviceConfigValidation.py +2 -1
  193. psychopy/iohub/devices/experiment/default_experiment.yaml +12 -1
  194. psychopy/iohub/devices/experiment/supported_config_settings.yaml +5 -1
  195. psychopy/iohub/devices/eyetracker/.DS_Store +0 -0
  196. psychopy/iohub/devices/eyetracker/__init__.py +46 -0
  197. psychopy/iohub/devices/eyetracker/calibration/procedure.py +2 -2
  198. psychopy/iohub/devices/eyetracker/hw/gazepoint/__init__.py +14 -2
  199. psychopy/iohub/devices/eyetracker/hw/mouse/eyetracker.py +3 -4
  200. psychopy/iohub/server.py +2 -2
  201. psychopy/iohub/start_iohub_process.py +3 -0
  202. psychopy/iohub/util/__init__.py +62 -70
  203. psychopy/layout.py +5 -5
  204. psychopy/logging.py +8 -1
  205. psychopy/microphone.py +10 -37
  206. psychopy/platform_specific/__init__.py +0 -2
  207. psychopy/platform_specific/darwin.py +1 -3
  208. psychopy/platform_specific/linux.py +31 -33
  209. psychopy/platform_specific/win32.py +38 -13
  210. psychopy/plugins/__init__.py +148 -116
  211. psychopy/plugins/util.py +39 -0
  212. psychopy/preferences/Darwin.spec +4 -2
  213. psychopy/preferences/FreeBSD.spec +4 -2
  214. psychopy/preferences/Linux.spec +4 -2
  215. psychopy/preferences/Windows.spec +4 -2
  216. psychopy/preferences/baseNoArch.spec +4 -2
  217. psychopy/preferences/preferences.py +47 -24
  218. psychopy/projects/pavlovia.py +47 -4
  219. psychopy/scripts/psyexpCompile.py +0 -4
  220. psychopy/session.py +153 -21
  221. psychopy/sound/__init__.py +31 -21
  222. psychopy/sound/_base.py +20 -3
  223. psychopy/sound/audioclip.py +320 -33
  224. psychopy/sound/backend_ptb.py +47 -58
  225. psychopy/sound/backend_pygame.py +1 -1
  226. psychopy/sound/backend_pysound.py +6 -15
  227. psychopy/sound/transcribe.py +53 -0
  228. psychopy/tests/.DS_Store +0 -0
  229. psychopy/tests/data/.DS_Store +0 -0
  230. psychopy/tests/data/TestUnknownPluginComponent_load_resave.psyexp +135 -0
  231. psychopy/tests/data/Test_textbox/test_ori_0_bottom right.png +0 -0
  232. psychopy/tests/data/Test_textbox/test_ori_0_center.png +0 -0
  233. psychopy/tests/data/Test_textbox/test_ori_0_top left.png +0 -0
  234. psychopy/tests/data/Test_textbox/test_ori_120_bottom right.png +0 -0
  235. psychopy/tests/data/Test_textbox/test_ori_120_center.png +0 -0
  236. psychopy/tests/data/Test_textbox/test_ori_120_top left.png +0 -0
  237. psychopy/tests/data/Test_textbox/test_ori_180_bottom right.png +0 -0
  238. psychopy/tests/data/Test_textbox/test_ori_180_center.png +0 -0
  239. psychopy/tests/data/Test_textbox/test_ori_180_top left.png +0 -0
  240. psychopy/tests/data/Test_textbox/test_ori_240_bottom right.png +0 -0
  241. psychopy/tests/data/Test_textbox/test_ori_240_center.png +0 -0
  242. psychopy/tests/data/Test_textbox/test_ori_240_top left.png +0 -0
  243. psychopy/tests/data/correctScript/.DS_Store +0 -0
  244. psychopy/tests/data/test_components/testClearKeyboard/testClearKeyboard.psyexp +200 -0
  245. psychopy/tests/data/test_session/.DS_Store +0 -0
  246. psychopy/tests/data/test_session/root/testFutureTrials/testFutureTrials.psyexp +155 -0
  247. psychopy/tests/data/test_session/root/testTrialNav/trialNav.psyexp +158 -0
  248. psychopy/tests/test_app/.DS_Store +0 -0
  249. psychopy/tests/test_app/conftest.py +2 -2
  250. psychopy/tests/test_app/test_speed.py +4 -1
  251. psychopy/tests/test_data/test_TrialHandler2.py +146 -1
  252. psychopy/tests/test_experiment/.DS_Store +0 -0
  253. psychopy/tests/test_experiment/needs_wx/genComponsTemplate.py +3 -3
  254. psychopy/tests/test_experiment/needs_wx/test_components.py +2 -2
  255. psychopy/tests/test_experiment/test_components/test_KeyboardComponent.py +28 -0
  256. psychopy/tests/test_experiment/test_components/test_UnknownPluginComponent.py +27 -0
  257. psychopy/tests/test_experiment/test_components/test_base_components.py +58 -0
  258. psychopy/tests/test_experiment/test_py2js.py +1 -1
  259. psychopy/tests/test_hardware/test_keyboard.py +31 -0
  260. psychopy/tests/test_hardware/test_ports.py +1 -11
  261. psychopy/tests/test_liaison/test_Liaison.py +47 -0
  262. psychopy/tests/test_misc/test_core.py +5 -0
  263. psychopy/tests/test_session/test_Session.py +5 -1
  264. psychopy/tests/test_tools/test_versionchooser.py +39 -8
  265. psychopy/tests/test_visual/test_all_stimuli.py +0 -97
  266. psychopy/tests/test_visual/test_image.py +6 -5
  267. psychopy/tests/test_visual/test_textbox.py +36 -0
  268. psychopy/tests/utils.py +4 -0
  269. psychopy/tools/filetools.py +1 -1
  270. psychopy/tools/pkgtools.py +160 -137
  271. psychopy/tools/versionchooser.py +10 -10
  272. psychopy/tools/wizard.py +3 -3
  273. psychopy/visual/.DS_Store +0 -0
  274. psychopy/visual/backends/pygletbackend.py +24 -13
  275. psychopy/visual/basevisual.py +5 -11
  276. psychopy/visual/button.py +2 -14
  277. psychopy/visual/helpers.py +5 -5
  278. psychopy/visual/line.py +1 -2
  279. psychopy/visual/movie2.py +7 -816
  280. psychopy/visual/movie3.py +7 -589
  281. psychopy/visual/movies/__init__.py +8 -11
  282. psychopy/visual/movies/frame.py +5 -2
  283. psychopy/visual/movies/players/ffpyplayer_player.py +5 -2
  284. psychopy/visual/noise.py +8 -7
  285. psychopy/visual/patch.py +7 -16
  286. psychopy/visual/radial.py +9 -7
  287. psychopy/visual/ratingscale.py +8 -1415
  288. psychopy/visual/secondorder.py +10 -9
  289. psychopy/visual/shape.py +7 -2
  290. psychopy/visual/text.py +1 -1
  291. psychopy/visual/textbox2/textbox2.py +28 -5
  292. {psychopy-2024.1.4.dist-info → psychopy-2024.2.0.dist-info}/METADATA +8 -13
  293. {psychopy-2024.1.4.dist-info → psychopy-2024.2.0.dist-info}/RECORD +307 -213
  294. {psychopy-2024.1.4.dist-info → psychopy-2024.2.0.dist-info}/WHEEL +1 -1
  295. psychopy/app/Resources/click.png +0 -0
  296. psychopy/app/Resources/next.png +0 -0
  297. psychopy/experiment/components/patch/__init__.py +0 -121
  298. psychopy/experiment/components/patch/classic/patch.png +0 -0
  299. psychopy/experiment/components/patch/dark/patch.png +0 -0
  300. psychopy/experiment/components/patch/dark/patch@2x.png +0 -0
  301. psychopy/experiment/components/patch/light/patch.png +0 -0
  302. psychopy/experiment/components/patch/light/patch@2x.png +0 -0
  303. psychopy/experiment/components/ratingScale/__init__.py +0 -337
  304. psychopy/experiment/components/ratingScale/classic/ratingscale.png +0 -0
  305. psychopy/experiment/components/ratingScale/classic/ratingscale@2x.png +0 -0
  306. psychopy/experiment/components/ratingScale/dark/ratingScale@2x.png +0 -0
  307. psychopy/experiment/components/ratingScale/dark/ratingscale.png +0 -0
  308. psychopy/experiment/components/ratingScale/light/ratingScale@2x.png +0 -0
  309. psychopy/experiment/components/ratingScale/light/ratingscale.png +0 -0
  310. psychopy/platform_specific/posix.py +0 -16
  311. psychopy/tests/test_sound/test_microphone.py +0 -217
  312. psychopy/tests/test_visual/test_ratingScale.py +0 -299
  313. /psychopy/{app/Resources → assets}/Psychopy Window Favicon@16w.png +0 -0
  314. /psychopy/{app/Resources → assets}/Psychopy Window Favicon@32w.png +0 -0
  315. /psychopy/{app/Resources → assets}/USB-C.png +0 -0
  316. /psychopy/{app/Resources → assets}/USB.png +0 -0
  317. /psychopy/{app/Resources → assets}/creditCard.png +0 -0
  318. /psychopy/{app/Resources → assets}/default.mp3 +0 -0
  319. /psychopy/{app/Resources → assets}/default.mp4 +0 -0
  320. /psychopy/{app/Resources → assets}/default.png +0 -0
  321. /psychopy/{app/Resources → assets/templates}/instruct1.png +0 -0
  322. /psychopy/{app/Resources → assets/templates}/instruct2.png +0 -0
  323. {psychopy-2024.1.4.dist-info → psychopy-2024.2.0.dist-info}/entry_points.txt +0 -0
  324. {psychopy-2024.1.4.dist-info → psychopy-2024.2.0.dist-info}/licenses/AUTHORS.md +0 -0
  325. {psychopy-2024.1.4.dist-info → psychopy-2024.2.0.dist-info}/licenses/LICENSE +0 -0
psychopy/.DS_Store ADDED
Binary file
psychopy/CHANGELOG.txt CHANGED
@@ -15,6 +15,212 @@ to run on the same PsychoPy version even where a different version is installed
15
15
  That setting often even allows PsychoPy to run experiments from versions that have not yet
16
16
  been installed! If the dependencies haven't changed it will run.
17
17
 
18
+ PsychoPy 2024.1
19
+ -----------------
20
+
21
+ **Highlights:**
22
+
23
+ * **Counterbalance Routine**: Standalone Routine to handle counterbalancing *between participants*, using the "shelf" to maintain records inbetween
24
+ * **Piloting Mode**: Run experiments in "piloting" mode - adjusts settings to avoid common pitfalls while you're building (e.g. getting stuck in a full screen experiment), then switch to "running" when you're ready to start gathering data
25
+ * **Improved UI**: Toolbars across the app have a clearer layout for buttons and a more intuitive interface for Pavlovia. Runner especially has had a visual overhaul, with a lot more space for reading stdout/alerts and a new output specifically for Pavlovia sync messages.
26
+ * **Fixes to Eye tracker plugins**: Several eye trackers had not been working since being moved out to plugins and these should all now be back in operation
27
+
28
+ PsychoPy 2024.1.0
29
+ ~~~~~~~~~~~~~~~~~
30
+
31
+ **New features and enhancements:**
32
+
33
+ * Added plugin support for standalone plugins by @mdcutone in #5866
34
+ * **Button Box Component**: Component for using button boxes, which will always have the same methods and properties but by installing plugins you can add functionality for different devices
35
+ * Allow speech-to-text engine configuration from Builder by @mdcutone in #5905
36
+ * Replace toolbars with a "Ribbon" by @TEParsons in #5920
37
+ * Method for processing device info on Windows by @TEParsons in #5940
38
+ * Added tools for creating and managing hardware interfaces by @mdcutone in #5950
39
+ * Allow expInfo fields to be ordered, required, hidden and deprioritised using a new name syntax by @TEParsons in #5949
40
+ * Added Counterbalance Routine (and Python implementation of Shelf) by @TEParsons in #5967
41
+ * Add component for Button Box, with plugin-able backends by @TEParsons in #6006
42
+ * Option in Builder to skip/customise frame rate check by @TEParsons in #6049
43
+ * Option in Builder to specify globalClock format by @TEParsons in #6048
44
+ * Added method to Window to get value of specific pixels by @mdcutone in #6054
45
+ * Added piloting mode by @TEParsons in #6066
46
+ * Add param to enable "rush" mode by @TEParsons in #6279
47
+ * Speed up plugin dialog by @mdcutone in #5796
48
+ * Better handling when opening e.g. png files in Coder by @TEParsons in #5788
49
+ * Speed up app by using faster string tools for labels and methods by @TEParsons in #5826
50
+ * Improved plugin installation method by @mdcutone in #5872
51
+ * Allow prefs dialog menu to be resized by @TEParsons in #5869
52
+ * Add method to manually create a keypress, photodiode response, etc. by @TEParsons in #6022
53
+ * Add option to ignore keypresses outside of PsychoPy window by @TEParsons in #6039
54
+ * Allow Sound to specify a Speaker rather than using general system audio by @TEParsons in #6079
55
+ * Add method to wait for responses to SerialDevice by @TEParsons in #6092
56
+ * Include link to project in "Successful sync" message by @TEParsons in #6171
57
+ * Silence "Unrecognised Parameter" warnings if params came from a plugin by @TEParsons in #6179
58
+ * Speed up experiment loading by @TEParsons in #6180
59
+ * Catch fails in Packages dialog by @TEParsons in #6193
60
+ * Hide components/routines from future versions by @TEParsons in #6200
61
+ * More intuitive label on Pavlovia project info update button by @TEParsons in #6217
62
+ * Added menu item in Builder to reveal current folder by @TEParsons in #6218
63
+ * Install packages in editable mode via a pyproject.toml file by @TEParsons in #6228
64
+ * Improvements to Code component UI behaviour by @TEParsons in #6265
65
+ * Open news from menu by @peircej in #6205
66
+ * Make expInfo dialog always on top by @TEParsons in #6301
67
+
68
+ **Bug fixes:**
69
+
70
+ * Fix matrix questions Survey Routine by @TEParsons in #5797
71
+ * Fix crash which happened if wx wasn't installed by @peircej in #5832
72
+ * Make sure icons & labels in preferences dialog are always visible by @TEParsons in #5868
73
+ * Handle when Component has no start time in JS by @TEParsons in #5864
74
+ * Static component was preventing Movie from starting by @TEParsons in #5928
75
+ * Change default logging level to warning by @suelynnmah in #5941
76
+ * Let experiments run without git installed by @TEParsons in #5939
77
+ * Fix bug whereby Brush wouldn't pick up on mouse clicks by @TEParsons in #6056
78
+ * Fix inconsistent data outside trial loop by @monique2208 in #6004
79
+ * Fix shape setting on Polygon-derived components (e.g. ROI) by @TEParsons in #5971
80
+ * Remove darc toolbox demos (maintainer no longer supporting package) by @RebeccaHirst in #6094
81
+ * Fixed error when `audioLib` is `None` by @mdcutone in #6103
82
+ * Handle unconventional launch methods (e.g. launching from command line with unrecognised args) by @peircej in #6118
83
+ * Fixed error with resizing "sash" in Preferences dialogby @mdcutone in #6146
84
+ * If psychtoolbox can't detect devices, log warning rather than crashing by @TEParsons in #6150
85
+ * Fixed error when using Save in Coder when there is no file open by @nvanhaute in #6158
86
+ * Fixed "missing reference" error with setting Sound device by @mdcutone in #6122
87
+ * Fix _set function for NoiseStim to handle input length by @simonfei123 in #6136
88
+ * Draw expected duration from Routine Settings in Builder by @TEParsons in #6190
89
+ * Fix error when loading window whose size is negative by @mdcutone in #6192
90
+ * Stop Builder from assuming the current folder is .../psychopy/app whenever filename is "untitled.psyexp" by @TEParsons in #6198
91
+ * Catch error when package info is missing by @mdcutone in #6202
92
+ * Experiments weren't working online if experiment name differed from filename by @TEParsons in #6221
93
+ * Fixed iohub eyetracker calibration (keyboard was losing input) by @mdcutone in #6226
94
+ * Handle when Static component has no start time by @TEParsons in #6248
95
+ * Don't scroll to top after opening a Builder component category by @TEParsons in #6251
96
+ * Fixed Mouse.visible attribute not applying requested state by @mdcutone in #6254
97
+ * Fixed freeze when running eyetracker validation by @mdcutone in #6264
98
+ * Fix error when cancelling a commit by @TEParsons in #6271
99
+ * Special code for when Slider is "radio" was missed in JS code by @TEParsons in #6272
100
+ * Fix "iCCP profiles" error with classic icons by @TEParsons in #6276
101
+ * Fix wrong setter name in Textbox/TextStim JS code by @TEParsons in #6277
102
+ * New Pavlovia projects were being created empty until first commit by @TEParsons in #6273
103
+ * Fix UI inconsistencies on Ubuntu by @TEParsons in #6242
104
+ * Fix code for sound component stop values by @zuazo in #6300
105
+ * Fixed selecting audio device in builder and coder by @zuazo in #6299
106
+ * Fix bug where local PsychoJS server kept running after quitting by @TEParsons in #6323
107
+
108
+ **Documentation and testing improvements** by @alexander-pastukhov @peircej @suelynnmah @patrickabolger @richardnaar @JensBoelte
109
+ @d-scanzi @psych575 @shun2wang @Solveig-Castelli @carosamu @Ahmad-Abudoush @RebeccaHirst @ice-yu @domstoppable @kimDundas
110
+ @afuetterer @TEParsons
111
+
112
+ **Translation works:**
113
+
114
+ * Continued translation into Simplified Chinese (and now Traditional Chinese) and beginnings of translations into Spanish, Hebrew: #5891 #5892 #5893 #5894 #5895 #5897 #5904 #5912 #5915 #5917 #5923 #5903 #5932 #5925
115
+
116
+
117
+ ### New contributors
118
+
119
+ * @mscheltienne made their first contribution in #5889
120
+ * @JensBoelte made their first contribution in #5956
121
+ * @d-scanzi made their first contribution in #5952
122
+ * @kshtjkumar made their first contribution in #5955
123
+ * @Solveig-Castelli made their first contribution in #5961
124
+ * @carosamu made their first contribution in #5972
125
+ * @monique2208 made their first contribution in #6004
126
+ * @afuetterer made their first contribution in #6110
127
+ * @bartuatabek made their first contribution in #5942
128
+ * @FS94 made their first contribution in #6121
129
+ * @simonfei123 made their first contribution in #6136
130
+ * @tomdstone made their first contribution in #6261
131
+ * @zuazo made their first contribution in #6299
132
+
133
+ **Full Changelog**: https://github.com/psychopy/psychopy/compare/2023.2.3...2024.1.0
134
+
135
+ PsychoPy 2024.1.1
136
+ ~~~~~~~~~~~~~~~~~
137
+
138
+ **Bug fixes**
139
+
140
+ * Handle errors when loading list of plugins by @TEParsons in #6334
141
+ * Counterbalance in online studies was still trying to confirm entries after finishing by @TEParsons in #6345
142
+ * Make sure the drawn max time in Builder is never None by @TEParsons in #6347
143
+ * Fixed translation issues by @hsogo in #6348
144
+ * Fixed inability to load plugins list from local with non-utf-8 default encoding by @peircej in #6349
145
+
146
+ **Full Changelog**: https://github.com/psychopy/psychopy/compare/2024.1.0...2024.1.1
147
+
148
+ PsychoPy 2024.1.2
149
+ ~~~~~~~~~~~~~~~~~
150
+
151
+ **Enhancements**
152
+ * Default TextStim font set to Arial (TextBox default was already Arial) by @wakecarter in #6378
153
+
154
+ **Bug fixes**
155
+
156
+ * Keyboard clock wasn't being reset properly, so `.rt` values were from exp start by @TEParsons in #6360
157
+ * Safer (and faster) behaviour when copying a param, avoids "infinite recursion" (app hangs) by @TEParsons in #6362
158
+ * Make line spacing specific to just one TextBox2 object by @Catherine9811 in #6356
159
+ * Fixes to the Gazepoint eyetracker plugin by @mdcutone in #6365
160
+ * Fixed error when camera tries to close when it's already closed by @mdcutone in #6364
161
+ * Fixed editable TextBox2 cursor location with line breaks by @Catherine9811 in #6358
162
+ * Remove "constant" updates option from SoundComponent (as it wasn't used) by @TEParsons in #6351
163
+ * Python 3.8 was falsely marked as incompatible with 2024.1.x onwards in "use version" interface by @TEParsons in #6366
164
+ * Form Component wasn't finding the correct table template by @TEParsons in #6381
165
+ * Remove blank rows from form template by @wakecarter in #6382
166
+ * Error saving icons from plugin details by @TEParsons in #6368
167
+ * Transparent colours online by @wakecarter in #6386
168
+ * Button numclicks defined by timesOn.length by @wakecarter in #6385
169
+
170
+ **Documentation and testing improvements** by... @peircej @TEParsons @kimDundas @suelynnmah
171
+
172
+ **New contributors: **
173
+
174
+ * @Catherine9811 made their first contribution in #6356
175
+
176
+ **Full Changelog**: https://github.com/psychopy/psychopy/compare/2024.1.1...2024.1.2
177
+
178
+
179
+ PsychoPy 2024.1.3
180
+ ~~~~~~~~~~~~~~~~~
181
+
182
+ **Bug fixes**
183
+
184
+ * Telling Mouse Component to check new clicks without clickable stim raised syntax error by @TEParsons in #6398
185
+ * Keyboard responses in ioHub weren't using relative time by @TEParsons in #6407
186
+
187
+ PsychoPy 2024.1.4
188
+ ~~~~~~~~~~~~~~~~~
189
+
190
+ **Bug fixes**
191
+
192
+ * ioHub keyboard was registering key releases before presses, so duration was always None. We now have a test in place that confirms keyboard RT timing using hardware which will be used on each new release going forwards. By @TEParsons in #6416
193
+ * Fixed some translation issues by @hsogo in #6409
194
+ * Fixed JSON encoding error when opening plugin dialog by @mdcutone in #6411
195
+
196
+ **Documentation updates**
197
+
198
+ * updated screenshots by @charlottej3673 in #6392
199
+
200
+ PsychoPy 2024.1.5
201
+ ~~~~~~~~~~~~~~~~~
202
+
203
+ * Failing to find Eyetracker Components (Eyelink by @KirstenWilliams in #6406 and Gazepoint by @mdcutone in #6424 )
204
+ * Installed plugins were not being found on Linux/MacOS by @mdcutone in #6441
205
+ * Faster MovieStim rendering (don't call `play()` when already playing) by @aforren1 in #6448
206
+ * Fixed eyetracker calibration target units (height -> pix) by @peircej in #6451
207
+ * KeyboardComponent allowed keys from spreadsheet caused namespace errors by @TEParsons in #6458
208
+ * hide that visible mouse, please by @mh105 in #6465
209
+ * Fix an issue with etRecord component for Stop Only (not stopping the eytracker) by @mh105 in #6463
210
+ * Only change Mouse visibility if explicitly asked to by @TEParsons in #6467
211
+ * Fix "Stop only" issue regardless of Component order by @TEParsons in #6468
212
+ * Clear keys to initialize keyboard when starting a routine by @mh105 in #6471
213
+ * Allow getKeys() to return the same key pressed multiple times by @mh105 in #6479
214
+
215
+ ## Documentation fixes and updates
216
+
217
+ * by @suelynnmah in #6341 #6426 #6427
218
+ * by @KirstenWilliams in #6480 #6481 #6487 #6498 #6506
219
+ * by @RebeccaHirst in #6504 #6505
220
+ * Arabic app translations by @Ahmad-Abudoush in #6476
221
+
222
+
223
+ **Full Changelog**: https://github.com/psychopy/psychopy/compare/2024.1.4...2024.1.5
18
224
 
19
225
  PsychoPy 2023.2
20
226
  ---------------
psychopy/GIT_SHA ADDED
@@ -0,0 +1 @@
1
+ 21e8c98452ff86f45dcc22206bef29647fe6a0da
psychopy/VERSION ADDED
@@ -0,0 +1 @@
1
+ 2024.2.0
psychopy/__init__.py CHANGED
@@ -5,21 +5,22 @@
5
5
  # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
6
6
  # Distributed under the terms of the GNU General Public License (GPL).
7
7
 
8
- # --------------------------------------------------------------------------
9
- # This file is automatically generated during build (do not edit directly).
10
- # --------------------------------------------------------------------------
11
-
12
8
  import os
13
9
  import sys
10
+ import pathlib
11
+
14
12
 
15
- __version__ = '2024.1.4'
13
+ def getVersion():
14
+ return (pathlib.Path(__file__).parent/"VERSION").read_text(encoding="utf-8").strip()
15
+
16
+ __version__ = getVersion()
17
+ __git_sha__ = (pathlib.Path(__file__).parent/"GIT_SHA").read_text(encoding="utf-8").strip()
16
18
  __license__ = 'GPL v3'
17
19
  __author__ = 'Open Science Tools Ltd'
18
20
  __author_email__ = 'support@opensciencetools.org'
19
21
  __maintainer_email__ = 'support@opensciencetools.org'
20
22
  __url__ = 'https://www.psychopy.org/'
21
23
  __download_url__ = 'https://github.com/psychopy/psychopy/releases/'
22
- __git_sha__ = '8ccc6ec19'
23
24
  __build_platform__ = 'n/a'
24
25
 
25
26
  __all__ = ["gui", "misc", "visual", "core",
@@ -42,17 +43,78 @@ if __git_sha__ == 'n/a':
42
43
  # update preferences and the user paths
43
44
  if 'installing' not in locals():
44
45
  from psychopy.preferences import prefs
46
+ import site
47
+
48
+ # Configure the environment to use our custom site-packages location for
49
+ # user-installed packages. In the future, this will be configured outside of
50
+ # the running environment, but for now, we need to do it here.
51
+ useDefaultSite = False
52
+ if 'PSYCHOPYNOPACKAGES' in os.environ:
53
+ # Custom environment variable for people using PsychoPy as a library,
54
+ # who don't want to use the custom site-packages location. If set to 1,
55
+ # this will disable the custom site-packages location. Packages will be
56
+ # installed in the default, system dependent user's site-packages
57
+ # location.
58
+ useDefaultSite = os.environ['PSYCHOPYNOPACKAGES'] == '1'
59
+
60
+ # configure environment for custom site-packages location
61
+ if not useDefaultSite:
62
+ env = os.environ.copy()
63
+ if 'PYTHONPATH' in env: # append entries to existing PYTHONPATH
64
+ _userSitePackages = str(prefs.paths['userPackages'])
65
+ if _userSitePackages not in env['PYTHONPATH']:
66
+ env['PYTHONPATH'] = os.pathsep.join([
67
+ env['PYTHONPATH'], _userSitePackages])
68
+ _userPackages = str(prefs.paths['packages'])
69
+ if _userPackages not in env['PYTHONPATH']:
70
+ env['PYTHONPATH'] = os.pathsep.join([
71
+ env['PYTHONPATH'], _userPackages])
72
+ else:
73
+ env['PYTHONPATH'] = os.pathsep.join([
74
+ str(prefs.paths['userPackages']),
75
+ str(prefs.paths['packages'])])
76
+
77
+ # set user site packages
78
+ env['PYTHONUSERBASE'] = prefs.paths['packages']
79
+
80
+ # update environment, pass this to sub-processes (e.g. pip)
81
+ os.environ.update(env)
82
+
83
+ # make sure site knows about our custom user site-packages
84
+ site.USER_SITE = prefs.paths['userPackages']
85
+ site.ENABLE_USER_SITE = True
86
+ # site.main()
87
+
88
+ # add paths from main plugins/packages (installed by plugins manager)
89
+ site.addsitedir(prefs.paths['userPackages']) # user site-packages
90
+ site.addsitedir(prefs.paths['userInclude']) # user include
91
+ site.addsitedir(prefs.paths['packages']) # base package dir
92
+
93
+ _envPath = os.environ.get('PATH', None)
94
+ if _envPath is not None:
95
+ # add user include path to system PATH (for C extensions)
96
+ if str(prefs.paths['userInclude']) not in _envPath:
97
+ os.environ['PATH'] = os.pathsep.join([
98
+ os.environ['PATH'], str(prefs.paths['userInclude'])])
99
+ # add scripts path for user packages to system PATH
100
+ if str(prefs.paths['userScripts']) not in _envPath:
101
+ os.environ['PATH'] = os.pathsep.join([
102
+ os.environ['PATH'], str(prefs.paths['userScripts'])])
103
+
104
+ if sys.platform == 'darwin' and sys._framework:
105
+ # add scripts path for user packages to system PATH
106
+ fwBinPath = os.path.join(sys.prefix, 'bin')
107
+ if fwBinPath not in os.environ['PATH']:
108
+ os.environ['PATH'] = os.pathsep.join([
109
+ fwBinPath, os.environ['PATH']])
110
+
111
+ # add paths from general preferences
45
112
  for _pathName in prefs.general['paths']:
46
113
  sys.path.append(_pathName)
47
114
 
48
- # add paths from main plugins/packages (installed by plugins manager)
49
- _userPackagePath = prefs.paths['userPackages']
50
- _userScripts = prefs.paths['userScripts']
51
- if _userPackagePath.is_dir():
52
- sys.path.append(str(_userPackagePath)) # user site-packages
53
- sys.path.append(str(_userScripts)) # user scripts
54
-
55
- # add paths from individual plugins/packages (installed by plugins manager)
115
+ # Add paths from individual plugins/packages (installed by plugins manager),
116
+ # this is to support legacy plugins that don't use the customized user
117
+ # site-packages location. This will be removed in the future.
56
118
  import pathlib as _pathlib
57
119
  for _pathName in _pathlib.Path(prefs.paths['packages']).glob("*"):
58
120
  if _pathName.is_dir():
@@ -60,6 +122,7 @@ if 'installing' not in locals():
60
122
 
61
123
  from psychopy.tools.versionchooser import useVersion, ensureMinimal
62
124
 
125
+
63
126
  if sys.version_info.major < 3:
64
127
  raise ImportError("psychopy does not support Python2 installations. "
65
128
  "The last version to support Python2.7 was PsychoPy "
@@ -71,4 +134,3 @@ try:
71
134
  import readline
72
135
  except ImportError:
73
136
  pass # all that will happen is the stderr/stdout might get redirected
74
-
Binary file
psychopy/app/__init__.py CHANGED
@@ -11,6 +11,9 @@
11
11
  __all__ = [
12
12
  'startApp',
13
13
  'quitApp',
14
+ 'restartApp',
15
+ 'setRestartRequired',
16
+ 'isRestartRequired',
14
17
  'getAppInstance',
15
18
  'getAppFrame',
16
19
  'isAppStarted']
@@ -24,8 +27,13 @@ from .frametracker import openFrames
24
27
  # to allow the plugin system to access GUI to allow for changes after startup.
25
28
  _psychopyAppInstance = None
26
29
 
30
+ # Flag to indicate if the app requires a restart. This is set by the app when
31
+ # it needs to restart after an update or plugin installation. We can check this
32
+ # flag to determine if the app is in a state that it is recommended to restart.
33
+ REQUIRES_RESTART = False
27
34
 
28
- def startApp(showSplash=True, testMode=False, safeMode=False):
35
+
36
+ def startApp(showSplash=True, testMode=False, safeMode=False, startView=None):
29
37
  """Start the PsychoPy GUI.
30
38
 
31
39
  This function is idempotent, where additional calls after the app starts
@@ -52,6 +60,11 @@ def startApp(showSplash=True, testMode=False, safeMode=False):
52
60
  safeMode : bool
53
61
  Start PsychoPy in safe-mode. If `True`, the GUI application will launch
54
62
  with without loading plugins.
63
+ startView : str, None
64
+ Name of the view to start the app with. Valid values are 'coder',
65
+ 'builder' or 'runner'. If `None`, the app will start with the default
66
+ view or the view specifed with the `PSYCHOPYSTARTVIEW` environment
67
+ variable.
55
68
 
56
69
  """
57
70
  global _psychopyAppInstance
@@ -82,7 +95,7 @@ def startApp(showSplash=True, testMode=False, safeMode=False):
82
95
  # console.
83
96
  from psychopy.app._psychopyApp import PsychoPyApp
84
97
  _psychopyAppInstance = PsychoPyApp(
85
- 0, testMode=testMode, showSplash=showSplash, safeMode=safeMode)
98
+ 0, testMode=testMode, showSplash=showSplash, safeMode=safeMode, startView=startView)
86
99
 
87
100
  # After the app is loaded, we hand off logging to the stream dispatcher
88
101
  # using the provided log file path. The dispatcher will write out any log
@@ -131,6 +144,65 @@ def quitApp():
131
144
  raise AttributeError('Object `_psychopyApp` has no attribute `quit`.')
132
145
 
133
146
 
147
+ def restartApp():
148
+ """Restart the PsychoPy application instance.
149
+
150
+ This will write a file named '.restart' to the user preferences directory
151
+ and quit the application. The presence of this file will indicate to the
152
+ launcher parent process that the app should restart.
153
+
154
+ The app restarts with the same arguments as the original launch. This is
155
+ useful for updating the application or plugins without requiring the user
156
+ to manually restart the app.
157
+
158
+ The user will be prompted to save any unsaved work before the app restarts.
159
+
160
+ """
161
+ if not isAppStarted():
162
+ return
163
+
164
+ # write a restart file to the user preferences directory
165
+ from psychopy.preferences import prefs
166
+ restartFilePath = os.path.join(prefs.paths['userPrefsDir'], '.restart')
167
+
168
+ with open(restartFilePath, 'w') as restartFile:
169
+ restartFile.write('') # empty file
170
+
171
+ quitApp()
172
+
173
+
174
+ def setRestartRequired(state=True):
175
+ """Set the flag to indicate that the app requires a restart.
176
+
177
+ This function is used by the app to indicate that a restart is required
178
+ after an update or plugin installation. The flag is checked by the launcher
179
+ parent process to determine if the app should restart.
180
+
181
+ Parameters
182
+ ----------
183
+ state : bool
184
+ Set the restart flag. If `True`, the app will restart after quitting.
185
+
186
+ """
187
+ global REQUIRES_RESTART
188
+ REQUIRES_RESTART = bool(state)
189
+
190
+
191
+ def isRestartRequired():
192
+ """Check if the app requires a restart.
193
+
194
+ Parts of the application may set this flag to indicate that a restart is
195
+ required after an update or plugin installation.
196
+
197
+ Returns
198
+ -------
199
+ bool
200
+ `True` if the app requires a restart else `False`.
201
+
202
+ """
203
+ return REQUIRES_RESTART
204
+
205
+
134
206
  def getAppInstance():
135
207
  """Get a reference to the `PsychoPyApp` object.
136
208
 
@@ -216,6 +288,8 @@ def getAppFrame(frameName):
216
288
  _psychopyAppInstance.showRunner()
217
289
  else:
218
290
  raise AttributeError('Cannot load frame. Method not available.')
291
+
292
+ frameRef = getattr(_psychopyAppInstance, frameName, None)
219
293
 
220
294
  return frameRef
221
295