id
int64
0
458k
file_name
stringlengths
4
119
file_path
stringlengths
14
227
content
stringlengths
24
9.96M
size
int64
24
9.96M
language
stringclasses
1 value
extension
stringclasses
14 values
total_lines
int64
1
219k
avg_line_length
float64
2.52
4.63M
max_line_length
int64
5
9.91M
alphanum_fraction
float64
0
1
repo_name
stringlengths
7
101
repo_stars
int64
100
139k
repo_forks
int64
0
26.4k
repo_open_issues
int64
0
2.27k
repo_license
stringclasses
12 values
repo_extraction_date
stringclasses
433 values
5,500
test_components.py
psychopy_psychopy/psychopy/tests/test_experiment/needs_wx/test_components.py
from pathlib import Path import os import io import pytest import warnings from psychopy import constants from psychopy.experiment import getAllComponents, Param, utils from psychopy import experiment from packaging.version import Version # use "python genComponsTemplate.py --out" to generate a new profile to test a...
7,095
Python
.py
144
35.111111
108
0.552924
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,501
test_Experiment.py
psychopy_psychopy/psychopy/tests/test_experiment/needs_wx/test_Experiment.py
from pathlib import Path import psychopy.experiment from psychopy.experiment.components.text import TextComponent from psychopy.experiment._experiment import RequiredImport from psychopy.tests.utils import TESTS_FONT from os import path import os, shutil, glob import py_compile import difflib from tempfile import mkdt...
16,508
Python
.py
322
40.92236
123
0.617625
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,502
test_base_routine.py
psychopy_psychopy/psychopy/tests/test_experiment/test_routines/test_base_routine.py
from pathlib import Path import pytest from psychopy import experiment def _make_minimal_experiment(obj): """ Make a minimal experiment with just one routine, the same class as the current standalone routine but with all default params. """ # Skip whole test if required attributes aren't present...
6,396
Python
.py
141
34.765957
121
0.596924
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,503
test_standalone_routines.py
psychopy_psychopy/psychopy/tests/test_experiment/test_routines/test_standalone_routines.py
import pytest from pathlib import Path from psychopy import experiment @pytest.mark.stdroutines class TestStandaloneRoutines: @classmethod def setup_class(cls): cls.routines = experiment.getAllStandaloneRoutines() # Make basic experiments with one of each standalone routine cls.expPy ...
1,124
Python
.py
30
28.266667
84
0.630515
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,504
test_PhotodiodeValidationRoutine.py
psychopy_psychopy/psychopy/tests/test_experiment/test_routines/test_PhotodiodeValidationRoutine.py
from . import _TestDisabledMixin, _TestBaseStandaloneRoutinesMixin from psychopy import experiment from psychopy.experiment.routines.photodiodeValidator import PhotodiodeValidatorRoutine class TestEyetrackerCalibrationRoutine(_TestBaseStandaloneRoutinesMixin, _TestDisabledMixin): def setup_method(self): s...
451
Python
.py
7
60.428571
97
0.841986
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,505
test_EyetrackerCalibrationRoutine.py
psychopy_psychopy/psychopy/tests/test_experiment/test_routines/test_EyetrackerCalibrationRoutine.py
from . import _TestDisabledMixin, _TestBaseStandaloneRoutinesMixin from psychopy import experiment from psychopy.experiment.routines.eyetracker_calibrate import EyetrackerCalibrationRoutine class TestEyetrackerCalibrationRoutine(_TestBaseStandaloneRoutinesMixin, _TestDisabledMixin): def setup_method(self): ...
459
Python
.py
7
61.428571
101
0.842222
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,506
test_all_routines.py
psychopy_psychopy/psychopy/tests/test_experiment/test_routines/test_all_routines.py
from . import _TestBaseStandaloneRoutinesMixin, _TestDisabledMixin from psychopy import experiment import inspect class _Generic(_TestBaseStandaloneRoutinesMixin, _TestDisabledMixin): def __init__(self, rtClass): self.exp = experiment.Experiment() self.rt = rtClass(exp=self.exp, name=f"test{rtClas...
948
Python
.py
19
41.947368
76
0.695135
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,507
test_DlgFromDictWx.py
psychopy_psychopy/psychopy/tests/test_gui/test_DlgFromDictWx.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from collections import OrderedDict from psychopy.gui.wxgui import DlgFromDict import pytest @pytest.mark.needs_wx class TestDlgFromDictWx: def setup_method(self): self.d = dict( participant='000', handedness=['r', 'l'], ex...
2,613
Python
.py
64
32.8125
73
0.619123
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,508
test_DlgFromDictQt.py
psychopy_psychopy/psychopy/tests/test_gui/test_DlgFromDictQt.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from collections import OrderedDict from psychopy.gui.qtgui import DlgFromDict import pytest @pytest.mark.needs_qt class TestDlgFromDictQt: def setup_method(self): self.d = dict( participant='000', handedness=['r', 'l'], ex...
2,677
Python
.py
65
33.169231
73
0.616185
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,509
test_sound_pygame.py
psychopy_psychopy/psychopy/tests/test_sound/test_sound_pygame.py
"""Test PsychoPy sound.py using pygame backend; will fail if have already used pyo """ from psychopy import prefs, core, plugins prefs.hardware['audioLib'] = ['ptb', 'sounddevice'] import pytest import shutil from tempfile import mkdtemp from psychopy import sound #, microphone import numpy # py.test --cov-report t...
1,998
Python
.py
55
29
88
0.624029
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,510
test_sound.py
psychopy_psychopy/psychopy/tests/test_sound/test_sound.py
"""Test PsychoPy sound.py using pygame backend; will fail if have already used pyo """ from psychopy import prefs, core, plugins prefs.hardware['audioLib'] = ['ptb', 'sounddevice'] import pytest import shutil from tempfile import mkdtemp from psychopy import sound #, microphone import numpy # py.test --cov-report t...
1,989
Python
.py
55
28.836364
88
0.622789
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,511
test_audioclip.py
psychopy_psychopy/psychopy/tests/test_sound/test_audioclip.py
"""Tests for the `AudioClip` class. """ import os from tempfile import mkdtemp import pytest import numpy as np import psychopy from psychopy.sound import ( AudioClip, AUDIO_CHANNELS_STEREO, AUDIO_CHANNELS_MONO, SAMPLE_RATE_96kHz, SAMPLE_RATE_48kHz, SAMPLE_RATE_16kHz) @pytest.mark.audioclip de...
11,490
Python
.py
269
34
80
0.665293
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,512
test_hamming.py
psychopy_psychopy/psychopy/tests/test_sound/test_hamming.py
from psychopy.sound._base import apodize, HammingWindow from psychopy.constants import FINISHED from psychopy.exceptions import DependencyError import numpy as np import pytest import psychopy.sound.backend_ptb as ptb """ We need to test that the new block-by-block hamming works the same as the (simpler) method of ad...
1,236
Python
.py
38
28.131579
75
0.70361
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,513
test_launch.py
psychopy_psychopy/psychopy/tests/test_iohub/test_launch.py
""" Test starting and stopping iohub server """ from psychopy.tests.test_iohub.testutil import startHubProcess, stopHubProcess def testDefaultServerLaunch(): """ """ io = startHubProcess() # check that a kb and mouse have been created keyboard=io.devices.keyboard mouse=io.devices.mouse ex...
444
Python
.py
15
25.4
78
0.722353
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,514
test_event_get_and_clear.py
psychopy_psychopy/psychopy/tests/test_iohub/test_event_get_and_clear.py
""" Test getting events (experiment events only) and clearing event logic for 'global' and 'device' level event buffers. """ import pytest from psychopy.tests import skip_under_vm from psychopy.tests.test_iohub.testutil import startHubProcess, stopHubProcess, getTime @skip_under_vm def testGetEvents(): """ ...
2,355
Python
.py
73
27.684932
87
0.684653
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,515
test_computer.py
psychopy_psychopy/psychopy/tests/test_iohub/test_computer.py
""" Test starting and stopping iohub server """ from psychopy.tests import skip_under_vm from psychopy.tests.test_iohub.testutil import startHubProcess, stopHubProcess, skip_not_completed from psychopy.iohub import Computer from psychopy.core import getTime @skip_under_vm class TestComputer(): """ Computer Dev...
4,426
Python
.py
102
35.313725
98
0.663645
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,516
testutil.py
psychopy_psychopy/psychopy/tests/test_iohub/testutil.py
import pytest __author__ = 'Sol' import psutil, sys from psychopy.iohub import launchHubServer, Computer getTime = Computer.getTime from psychopy.tests import skip_under_vm @skip_under_vm def startHubProcess(): io = launchHubServer() assert io != None io_proc = Computer.getIoHubProcess() io_proc_...
1,486
Python
.py
35
34.514286
94
0.662011
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,517
test_keyboard.py
psychopy_psychopy/psychopy/tests/test_iohub/test_keyboard.py
""" Test starting and stopping iohub server """ from psychopy.tests import skip_under_vm from psychopy.tests.test_iohub.testutil import startHubProcess, stopHubProcess @skip_under_vm class TestKeyboard(): """ Keyboard Device tests. Starts iohub server, runs test set, then stops iohub server. Since the...
2,744
Python
.py
72
30.402778
79
0.670939
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,518
test_Color.py
psychopy_psychopy/psychopy/tests/test_colors/test_Color.py
from psychopy import colors, visual, event, logging def test_readable(): """ Test method of Color which returns readable pairing for the given color. Currently no validation - just making sure the method runs without error. Commented out sections are for local use when previewing the colors to co...
1,200
Python
.py
36
26.75
77
0.583261
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,519
conftest.py
psychopy_psychopy/psychopy/tests/test_app/conftest.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python-mode; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: """ py.test fixtures to create an instance of PsychoPyApp for testing """ import pytest from packaging.version import Version import psychopy.app ...
952
Python
.py
29
29.758621
92
0.70472
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,520
test_command_line.py
psychopy_psychopy/psychopy/tests/test_app/test_command_line.py
""" Test that PsychoPy can be initialised from the command line with all API options """ import sys import time from pathlib import Path from psychopy import core from psychopy.tests import utils def test_version_query(): """ Check that we can call the PsychoPy app with -v to get the version """ ...
1,787
Python
.py
59
23.508475
91
0.571429
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,521
test_speed.py
psychopy_psychopy/psychopy/tests/test_app/test_speed.py
import sys import numpy from pathlib import Path from psychopy.tests.utils import TESTS_DATA_PATH, RUNNING_IN_VM import shutil from tempfile import mkdtemp import pytest import time from ... import logging class TestSpeed: def setup_method(self): self.tmp_dir = mkdtemp(prefix='psychopy-tests-app') ...
4,701
Python
.py
132
26.106061
117
0.572464
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,522
test_BuilderFrame.py
psychopy_psychopy/psychopy/tests/test_app/test_builder/test_BuilderFrame.py
from os import path import shutil import py_compile from tempfile import mkdtemp import codecs import pytest import locale import time import psychopy.experiment from psychopy import prefs from psychopy.app.builder.dialogs import DlgComponentProperties from psychopy.experiment import Param # Jeremy Gray March 2011 #...
5,938
Python
.py
129
37.697674
202
0.654225
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,523
test_CompileFromBuilder.py
psychopy_psychopy/psychopy/tests/test_app/test_builder/test_CompileFromBuilder.py
import pytest import shutil from tempfile import mkdtemp import os """Each test class creates a context subclasses _baseVisualTest to run a series of tests on a single graphics context (e.g. pyglet with shaders) To add a new stimulus test use _base so that it gets tested in all contexts """ import psychopy from psy...
4,962
Python
.py
113
36.265487
107
0.66936
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,524
test_ComponentDialogs.py
psychopy_psychopy/psychopy/tests/test_app/test_builder/test_ComponentDialogs.py
import pytest from psychopy import experiment from psychopy.app.builder.dialogs import DlgCodeComponentProperties from psychopy.experiment.components.code import CodeComponent class TestComponentDialogs: def setup_method(self): # Create experiment self.exp = experiment.Experiment() self...
4,356
Python
.py
91
34.472527
117
0.545796
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,525
test_RunnerFrame.py
psychopy_psychopy/psychopy/tests/test_app/test_runner/test_RunnerFrame.py
import sys import pytest import os import time from psychopy import prefs import wx from psychopy.app import psychopyApp class Test_RunnerFrame: """ This test opens Runner, and several processes. """ def setup_method(self): self.tempFile = os.path.join( prefs.paths['tests'], 'data...
5,975
Python
.py
138
33.181159
82
0.625925
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,526
test_icons.py
psychopy_psychopy/psychopy/tests/test_app/test_themes/test_icons.py
import pytest from pathlib import Path from psychopy.app.themes import icons from psychopy.experiment.components.unknown import UnknownComponent class TestIcons: @pytest.mark.usefixtures("get_app") def test_button_icons(self, get_app): exemplars = [ # File open, 32px (icons.But...
3,131
Python
.py
73
31.410959
81
0.565858
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,527
test_gammasci.py
psychopy_psychopy/psychopy/tests/test_hardware/test_gammasci.py
import math from unittest.mock import patch from psychopy import hardware @patch('serial.Serial') def test_S470(MockSerial): """ Test the photometer class without the device by mocking the serial connection.""" # Test setup Photometer = hardware.getPhotometerByName('S470') if Photometer is N...
1,140
Python
.py
28
35.285714
89
0.691606
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,528
test_keyboard_events.py
psychopy_psychopy/psychopy/tests/test_hardware/test_keyboard_events.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from psychopy import event, core from psychopy.preferences import prefs from psychopy.visual import Window from pyglet.window.key import (MOD_SHIFT, MOD_CTRL, MOD_ALT, ...
10,995
Python
.py
278
30.133094
84
0.586807
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,529
test_ports.py
psychopy_psychopy/psychopy/tests/test_hardware/test_ports.py
import psychopy.hardware as hw import pytest try: import mock except Exception: def require_mock(fn): def _inner(): pytest.skip("Can't test without Mock") _inner.__name__ = fn.__name__ return _inner else: def require_mock(fn): return fn try: from collections...
4,747
Python
.py
117
33.931624
120
0.6637
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,530
test_emulator.py
psychopy_psychopy/psychopy/tests/test_hardware/test_emulator.py
"""Tests for psychopy.hardware.emulator""" # covers most lines of code but does not test all possible logic # py.test -k emulator --cov-report term-missing --cov hardware/emulator.py tests/test_hardware import os, sys import pytest from psychopy import visual, core, event from psychopy.hardware import emulator from...
4,227
Python
.py
88
38.477273
108
0.622422
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,531
test_keyboard.py
psychopy_psychopy/psychopy/tests/test_hardware/test_keyboard.py
import sys from psychopy.hardware import keyboard import pytest import time from psychopy import logging from psychopy.tests.utils import RUNNING_IN_VM class _TestBaseKeyboard: """ Tests for the general functionality which should exist across Keyboard backends. """ def testReceiveGeneratedKeypress(sel...
8,566
Python
.py
212
30.778302
99
0.605886
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,532
test_device_manager.py
psychopy_psychopy/psychopy/tests/test_hardware/test_device_manager.py
from psychopy.hardware import manager from psychopy.tests import skip_under_vm class TestDeviceManager: def setup_class(cls): cls.mgr = manager.getDeviceManager() @skip_under_vm def test_all_devices(self): devices = ( "psychopy.hardware.keyboard.KeyboardDevice", "p...
1,240
Python
.py
31
31.354839
101
0.656146
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,533
test_photodiode.py
psychopy_psychopy/psychopy/tests/test_hardware/test_photodiode.py
import pytest from psychopy import core, visual from psychopy.tests.utils import RUNNING_IN_VM from psychopy.hardware.photodiode import BasePhotodiodeGroup, PhotodiodeResponse class DummyPhotodiode(BasePhotodiodeGroup): def __init__(self, channels=1, threshold=None, pos=None, size=None, units=None): # ma...
2,088
Python
.py
54
29.907407
99
0.63051
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,534
test_projections_interactive.py
psychopy_psychopy/psychopy/tests/test_visual/test_projections_interactive.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from pyglet.window import key from psychopy.visual import * from psychopy.visual.windowwarp import * from psychopy.visual.windowframepack import * foregroundColor=[-1,-1,-1] backgroundColor=[1,1,1] class ProjectionsLinesAndCircles(): """ Test jig for projection ...
6,780
Python
.py
136
38.551471
243
0.591053
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,535
test_brush.py
psychopy_psychopy/psychopy/tests/test_visual/test_brush.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from psychopy import event from psychopy.visual.window import Window from psychopy.visual.brush import Brush from psychopy.visual.shape import ShapeStim class Test_Brush(): """Test suite for Brush component""" def setup_class(self): self.wi...
1,982
Python
.py
54
28.222222
63
0.626437
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,536
test_window.py
psychopy_psychopy/psychopy/tests/test_visual/test_window.py
import importlib from copy import copy from pathlib import Path from psychopy import visual, colors from psychopy.tests import utils from psychopy.tests.test_visual.test_basevisual import _TestColorMixin from psychopy.tools.stimulustools import serialize from psychopy import colors class TestWindow: def test_seri...
4,891
Python
.py
114
29.254386
100
0.510384
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,537
test_progress.py
psychopy_psychopy/psychopy/tests/test_visual/test_progress.py
from psychopy import visual from .test_basevisual import _TestColorMixin, _TestUnitsMixin, _TestSerializationMixin from psychopy.tests.test_experiment.test_component_compile_python import _TestBoilerplateMixin from psychopy.tests import utils from pathlib import Path class TestProgress(_TestColorMixin, _TestUnitsMixi...
3,699
Python
.py
88
30.693182
109
0.547599
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,538
test_slider.py
psychopy_psychopy/psychopy/tests/test_visual/test_slider.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from pathlib import Path from psychopy.tests import utils from psychopy.tests.test_visual.test_basevisual import _TestColorMixin, _TestSerializationMixin from psychopy.tests.test_experiment.test_component_compile_python import _TestBoilerplateMixin from psychopy.visual.win...
13,483
Python
.py
261
41.555556
126
0.590795
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,539
test_winFlipTiming.py
psychopy_psychopy/psychopy/tests/test_visual/test_winFlipTiming.py
import sys from psychopy import visual, clock import pytest import numpy as np try: from psychtoolbox import GetSecs havePTB = True except ImportError: havePTB = False class Test_WinFlipTiming(): def setup_class(self): self.win = visual.Window(size=(200, 200), units='pix', ...
3,275
Python
.py
79
31.367089
92
0.596226
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,540
test_circle.py
psychopy_psychopy/psychopy/tests/test_visual/test_circle.py
from pathlib import Path import pytest from psychopy import visual from .test_basevisual import _TestColorMixin, _TestUnitsMixin, _TestSerializationMixin from psychopy.tests.test_experiment.test_component_compile_python import _TestBoilerplateMixin from .. import utils class TestCircle(_TestColorMixin, _TestUnitsMix...
2,815
Python
.py
58
37.948276
99
0.550382
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,541
test_textbox.py
psychopy_psychopy/psychopy/tests/test_visual/test_textbox.py
from pathlib import Path import numpy as np from psychopy import layout from psychopy.alerts import addAlertHandler from psychopy.alerts._errorHandler import _BaseErrorHandler from psychopy.tests.test_visual.test_basevisual import _TestColorMixin, _TestUnitsMixin, _TestSerializationMixin from psychopy.tests.test_expe...
25,750
Python
.py
482
36.390041
1,029
0.55982
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,542
test_basevisual.py
psychopy_psychopy/psychopy/tests/test_visual/test_basevisual.py
import json import pytest import importlib from copy import copy from pathlib import Path from psychopy import visual, layout, event, colors from psychopy.tools.stimulustools import serialize, actualize from psychopy.monitors import Monitor from psychopy.tests import utils class _TestSerializationMixin: """ T...
24,981
Python
.py
533
32.037523
151
0.497727
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,543
test_gamma.py
psychopy_psychopy/psychopy/tests/test_visual/test_gamma.py
from psychopy import visual, monitors import numpy from psychopy.tests import skip_under_vm @skip_under_vm(reason="Cannot test gamma in a virtual machine") def test_low_gamma(): """setting gamma low (dark screen)""" win = visual.Window([600,600], gamma=0.5, autoLog=False) # should make the entire screen bri...
4,645
Python
.py
115
33.330435
100
0.643223
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,544
test_target.py
psychopy_psychopy/psychopy/tests/test_visual/test_target.py
from psychopy import visual, layout from .test_basevisual import _TestColorMixin, _TestUnitsMixin, _TestSerializationMixin class TestTarget(_TestUnitsMixin, _TestSerializationMixin): # Pixel which is the border color borderPoint = (0, 55) borderUsed = True # Pixel which is the fill color fillPoint ...
1,400
Python
.py
31
36.290323
96
0.608059
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,545
test_form.py
psychopy_psychopy/psychopy/tests/test_visual/test_form.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from pathlib import Path import pytest from pandas import DataFrame from psychopy.tests.test_visual.test_basevisual import _TestColorMixin, _TestSerializationMixin from psychopy.tests.test_experiment.test_component_compile_python import _TestBoilerplateMixin fr...
17,071
Python
.py
378
30.791005
122
0.501351
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,546
measure_parity.py
psychopy_psychopy/psychopy/tests/test_visual/measure_parity.py
import ast from collections import OrderedDict import esprima import pandas as pd from copy import deepcopy from pathlib import Path def measure_js_parity(pypath, jspath, outpath=None): """ Get all methods and attributes for classes in psychopy.visual and psychojs.visual, for comparison """ def _list...
9,550
Python
.py
222
30.085586
120
0.498332
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,547
test_image.py
psychopy_psychopy/psychopy/tests/test_visual/test_image.py
from pathlib import Path from psychopy import visual, colors, core from .test_basevisual import _TestUnitsMixin, _TestSerializationMixin from psychopy.tests.test_experiment.test_component_compile_python import _TestBoilerplateMixin from psychopy.tests import utils import pytest class TestImage(_TestUnitsMixin, _TestB...
8,727
Python
.py
208
28.5625
118
0.493233
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,548
test_all_stimuli.py
psychopy_psychopy/psychopy/tests/test_visual/test_all_stimuli.py
import sys, os, copy from pathlib import Path from psychopy import visual, monitors, prefs, constants from psychopy.visual import filters from psychopy.tools.coordinatetools import pol2cart from psychopy.tests import utils import numpy import pytest import shutil from tempfile import mkdtemp """Each test class create...
26,499
Python
.py
583
35.732419
119
0.607259
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,549
test_glfw_backend.py
psychopy_psychopy/psychopy/tests/test_visual/test_glfw_backend.py
# Provisional (super simple) test file which doesn't really test anything else # besides simply opening a `pyGLFW` window. Add more complete `glfw` backend # tests to other scripts ASAP, then remove this file. from psychopy.tests import skip_under_vm import pytest @skip_under_vm(reason="GLFW doesn't work on (macOS) v...
524
Python
.py
12
40.833333
78
0.754902
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,550
test_panorama.py
psychopy_psychopy/psychopy/tests/test_visual/test_panorama.py
from psychopy import visual from .. import utils from pathlib import Path class TestPanorama: def setup_class(cls): cls.path = Path(utils.TESTS_DATA_PATH) / "test_panorama" cls.win = visual.Window(monitor="testMonitor") cls.obj = visual.PanoramicImageStim(cls.win, image=cls.path / "panoram...
1,545
Python
.py
37
31.027027
103
0.565824
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,551
test_dots.py
psychopy_psychopy/psychopy/tests/test_visual/test_dots.py
import numpy as np from psychopy import visual, colors class TestDots: @classmethod def setup_method(self): self.win = visual.Window([128, 128], monitor="testMonitor", pos=[50,50], allowGUI=False, autoLog=False) def test_fieldSize(self): """ Check that dot stim field size is inte...
6,360
Python
.py
147
31.591837
120
0.542862
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,552
test_roi.py
psychopy_psychopy/psychopy/tests/test_visual/test_roi.py
import numpy as np from .test_basevisual import _TestUnitsMixin, _TestSerializationMixin from psychopy.tests.test_experiment.test_component_compile_python import _TestBoilerplateMixin from psychopy import visual, core class TestROI(_TestUnitsMixin, _TestBoilerplateMixin, _TestSerializationMixin): def setup_meth...
3,516
Python
.py
90
28.9
112
0.565116
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,553
test_custommouse.py
psychopy_psychopy/psychopy/tests/test_visual/test_custommouse.py
from psychopy.visual import Window, CustomMouse, TextStim import pytest import pyglet # currently just a placeholder for better coverage # checks for syntax errors not proper function: flip, opacity, pos, etc class Test_Custommouse(): @classmethod def setup_class(self): self.win = Window([128,256]) ...
1,515
Python
.py
41
29.365854
101
0.623978
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,554
test_projections.py
psychopy_psychopy/psychopy/tests/test_visual/test_projections.py
import sys from pyglet.window import key from psychopy.visual import Window, TextStim, GratingStim, Circle from psychopy.visual.windowwarp import Warper from psychopy import event import pytest, copy """define WindowWarp configurations, test the logic test: cd psychopy/psychopy/ py.test -k projections --c...
8,092
Python
.py
180
33.383333
133
0.57141
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,555
test_framepacking.py
psychopy_psychopy/psychopy/tests/test_visual/test_framepacking.py
import pytest from psychopy.visual import Window from psychopy.visual.windowframepack import ProjectorFramePacker """define ProjectorFramePack configurations, test the logic test: cd psychopy/psychopy/ py.test -k projectorframepack --cov-report term-missing --cov visual/windowframepack.py """ class Test...
1,199
Python
.py
34
30.058824
106
0.680484
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,556
test_contains_overlaps.py
psychopy_psychopy/psychopy/tests/test_visual/test_contains_overlaps.py
"""Test polygon .contains and .overlaps methods py.test -k polygon --cov-report term-missing --cov visual/helpers.py """ from pathlib import Path from psychopy import visual, monitors, layout from psychopy.tests import utils from psychopy.visual import helpers from numpy import sqrt import matplotlib mon = monitors....
8,987
Python
.py
203
35.37931
126
0.575071
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,557
test_winScalePos.py
psychopy_psychopy/psychopy/tests/test_visual/test_winScalePos.py
from psychopy import visual from psychopy.tests import utils import os import pytest v = [(1, 1), (1, -1), (-1, -1), (-1, 1)] # vertices to use = square n = 15 # size of the base square pimg = (n, n) # position for the image pgrn = (-n, -n) # position for green square img_name = os.path.join(utils.TESTS_DATA_PATH...
3,444
Python
.py
66
34.287879
78
0.485298
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,558
test_button.py
psychopy_psychopy/psychopy/tests/test_visual/test_button.py
from psychopy import visual from psychopy.tests.test_visual.test_basevisual import _TestColorMixin, _TestSerializationMixin from psychopy.tests.test_experiment.test_component_compile_python import _TestBoilerplateMixin class TestButton(_TestColorMixin, _TestBoilerplateMixin, _TestSerializationMixin): @classmetho...
637
Python
.py
11
52.181818
97
0.736334
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,559
test_shape.py
psychopy_psychopy/psychopy/tests/test_visual/test_shape.py
import pytest from psychopy import visual from .test_basevisual import _TestColorMixin, _TestUnitsMixin, _TestSerializationMixin from psychopy.tests.test_experiment.test_component_compile_python import _TestBoilerplateMixin class TestShape(_TestColorMixin, _TestUnitsMixin, _TestBoilerplateMixin, _TestSerializationMi...
838
Python
.py
17
42.764706
98
0.711656
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,560
test_event.py
psychopy_psychopy/psychopy/tests/test_misc/test_event.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from psychopy.visual import Window, ShapeStim from psychopy import event, core, monitors from psychopy.constants import NOT_STARTED import pyglet from pyglet.window.mouse import LEFT, MIDDLE, RIGHT try: import pygame havePygame = True except Exception: havePyga...
10,304
Python
.py
263
30.365019
99
0.603641
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,561
test_web.py
psychopy_psychopy/psychopy/tests/test_misc/test_web.py
from psychopy import web import pytest # py.test -k web --cov-report term-missing --cov web.py @pytest.mark.web class TestWeb(): @classmethod def setup_class(self): try: web.requireInternetAccess() except web.NoInternetAccessError: pytest.skip() def teardown_method...
511
Python
.py
18
21.833333
59
0.656442
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,562
test_GammaFun.py
psychopy_psychopy/psychopy/tests/test_misc/test_GammaFun.py
from psychopy.monitors import calibTools import numpy yy=[0,0.2,0.4,0.8,1.0] minLum=2.0 maxLum=100.0 gamma=2.2 xxTest=numpy.array([ 0., 0.48115651, 0.65935329, 0.90354543, 1. ]) def test_GammaInverse_Eq1(): xx= calibTools.gammaInvFun(yy, minLum, maxLum, gamma, b=0, eq=1) assert numpy.allclo...
483
Python
.py
13
34.769231
85
0.705128
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,563
test_color.py
psychopy_psychopy/psychopy/tests/test_misc/test_color.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """All tests in this file involve rapidly changing colours, do not run these tests in a setting where you can view the output if you have photosensitive epilepsy. """ from psychopy.alerts import addAlertHandler from psychopy.alerts._errorHandler import _BaseErrorHandler f...
11,123
Python
.py
189
46.444444
152
0.556421
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,564
test_layout.py
psychopy_psychopy/psychopy/tests/test_misc/test_layout.py
import numpy from psychopy import layout, visual class TestVector: def setup_method(self): self.win = visual.Window(size=(128, 64), monitor="testMonitor") def teardown_method(self): self.win.close() del self.win def test_values(self): """ Check that Vector objects...
2,162
Python
.py
44
37.340909
120
0.498344
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,565
test_core.py
psychopy_psychopy/psychopy/tests/test_misc/test_core.py
# -*- coding: utf-8 -*- """ Created on Tue Apr 23 11:18:47 2013 Tests the psychopy.core.getTime Function: On Windows: 1) Checks that the currently used core.getTime() implementation gives duration results consistent with directly using the Python high resolution timer. 2) Checks that the time between ...
13,416
Python
.py
350
31.028571
118
0.612958
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,566
test_clock.py
psychopy_psychopy/psychopy/tests/test_misc/test_clock.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from psychopy.clock import wait, StaticPeriod, CountdownTimer from psychopy.visual import Window from psychopy.tools import systemtools from psychopy.tests import skip_under_vm def test_StaticPeriod_finish_on_time(): """Test successful completion ...
1,746
Python
.py
51
29.039216
80
0.699346
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,567
test_locale.py
psychopy_psychopy/psychopy/tests/test_misc/test_locale.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import locale from psychopy import localization from psychopy.localization import _translate welcome = u'Welcome to PsychoPy3!' trans = {'en': welcome, 'ja': u'PsychoPy3へようこそ!' } ### needs rewriting since localization.init() no longer sets...
1,042
Python
.py
30
27.8
71
0.621976
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,568
memory_usage.py
psychopy_psychopy/psychopy/tests/test_misc/memory_usage.py
from psychopy import visual, event, info import pytest import numpy as np import shutil, os from tempfile import mkdtemp from psychopy.tests import utils # Testing for memory leaks in PsychoPy classes (experiment run-time, not Builder, Coder, etc) # The tests are too unstable to include in travis-ci at this point. ...
5,930
Python
.py
132
37.674242
97
0.650711
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,569
test_info.py
psychopy_psychopy/psychopy/tests/test_misc/test_info.py
# -*- coding: utf-8 -*- from psychopy import info, visual import pytest # py.test -k info --cov-report term-missing --cov info.py @pytest.mark.info class TestInfo(): @classmethod def setup_class(self): self.win = visual.Window(size=(100,100), autoLog=False) def teardown_method(self): sel...
437
Python
.py
13
29.153846
76
0.694511
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,570
test_alerttools.py
psychopy_psychopy/psychopy/tests/test_alerts/test_alerttools.py
import sys from psychopy.alerts import addAlertHandler, alerttools from psychopy.alerts._errorHandler import _BaseErrorHandler from psychopy.experiment import getAllComponents, Experiment class TestAlertTools(): """A class for testing the alerttools module""" def setup_method(self): # Set ErrorHandle...
5,751
Python
.py
107
45.074766
129
0.646022
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,571
test_alerts.py
psychopy_psychopy/psychopy/tests/test_alerts/test_alerts.py
import sys from psychopy.alerts import _alerts, validateCatalogue def test_catalogue(): valid, missing = validateCatalogue(dev=False) assert valid, f"Missing alerts: {missing}" class TestAlertsModule(): """A class for testing the alerts module""" def teardown_method(self): sys.stderr = sys....
1,407
Python
.py
28
43.214286
76
0.684672
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,572
exports.py
psychopy_psychopy/psychopy/experiment/exports.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Experiment classes: Experiment, Flow, Routine, Param, Loop*, *Handlers, and NameSpa...
13,876
Python
.py
337
31.175074
85
0.588449
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,573
plugins.py
psychopy_psychopy/psychopy/experiment/plugins.py
class PluginDevicesMixin: """ Mixin for Components and Routines which adds behaviour to get parameters and values from plugins and use them to create different devices for different plugin backends. """ def __init_subclass__(cls): # list of backends for this component - each should be a sub...
4,245
Python
.py
100
30.86
98
0.585956
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,574
_experiment.py
psychopy_psychopy/psychopy/experiment/_experiment.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Experiment classes: Experiment, Flow, Routine, Param, Loop*, *Handlers, and NameSpa...
64,566
Python
.py
1,272
36.227201
120
0.563586
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,575
params.py
psychopy_psychopy/psychopy/experiment/params.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Experiment classes: Experiment, Flow, Routine, Param, Loop*, *Handlers, and NameSpa...
19,992
Python
.py
458
33.218341
160
0.564745
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,576
flow.py
psychopy_psychopy/psychopy/experiment/flow.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Describes the Flow of an experiment """ from xml.etree.ElementTree import Element fro...
24,641
Python
.py
501
35.219561
115
0.553214
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,577
py2js.py
psychopy_psychopy/psychopy/experiment/py2js.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Converting code parameters and components from python (PsychoPy) to JS (ES6/PsychoJS) "...
7,115
Python
.py
151
37.536424
129
0.631852
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,578
py2js_transpiler.py
psychopy_psychopy/psychopy/experiment/py2js_transpiler.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). import ast import sys import re try: from metapensiero.pj.api import translates excep...
21,501
Python
.py
504
31.035714
153
0.560213
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,579
utils.py
psychopy_psychopy/psychopy/experiment/utils.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Utility functions to support Experiment classes """ import re # this needs to be acces...
1,372
Python
.py
34
36.235294
86
0.679217
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,580
__init__.py
psychopy_psychopy/psychopy/experiment/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Experiment classes: Experiment, Flow, Routine, Param, Loop*, *Handlers, and NameSpa...
1,727
Python
.py
41
37.560976
79
0.75358
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,581
localization.py
psychopy_psychopy/psychopy/experiment/localization.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """These are probably going to get used a lot so translate them once and reuse """ from p...
359
Python
.py
8
43.5
79
0.758621
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,582
loops.py
psychopy_psychopy/psychopy/experiment/loops.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Experiment classes: Experiment, Flow, Routine, Param, Loop*, *Handlers, and NameSpa...
45,898
Python
.py
941
35.553666
120
0.553636
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,583
__init__.py
psychopy_psychopy/psychopy/experiment/routines/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Classes and functions for routines in Builder. """ # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). from importlib import import_module ...
3,672
Python
.py
85
37.2
85
0.707351
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,584
_base.py
psychopy_psychopy/psychopy/experiment/routines/_base.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Describes the Flow of an experiment """ import copy import textwrap from psychopy.cons...
42,032
Python
.py
975
31.515897
241
0.562948
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,585
__init__.py
psychopy_psychopy/psychopy/experiment/routines/counterbalance/__init__.py
from .. import BaseStandaloneRoutine from ... import Param from pathlib import Path from psychopy.localization import _translate class CounterbalanceRoutine(BaseStandaloneRoutine): categories = ['Custom'] targets = ["PsychoPy", "PsychoJS"] iconFile = Path(__file__).parent / "counterbalance.png" label ...
12,744
Python
.py
295
30.989831
120
0.525913
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,586
__init__.py
psychopy_psychopy/psychopy/experiment/routines/pavlovia_survey/__init__.py
from psychopy.experiment.components import getInitVals from psychopy.experiment.routines import BaseStandaloneRoutine from psychopy.localization import _translate from psychopy.experiment import Param from pathlib import Path class PavloviaSurveyRoutine(BaseStandaloneRoutine): categories = ['Responses'] targe...
9,324
Python
.py
215
31.567442
132
0.534441
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,587
__init__.py
psychopy_psychopy/psychopy/experiment/routines/eyetracker_validate/__init__.py
from copy import deepcopy from .. import BaseStandaloneRoutine from psychopy.localization import _translate from psychopy.experiment import Param from pathlib import Path from psychopy.alerts import alert positions = ['THREE_POINTS', 'FIVE_POINTS', 'NINE_POINTS', "THIRTEEN_POINTS", "SEVENTEEN_POINTS"] class Eyetrac...
17,578
Python
.py
307
37.267101
159
0.499477
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,588
__init__.py
psychopy_psychopy/psychopy/experiment/routines/eyetracker_calibrate/__init__.py
from .. import BaseStandaloneRoutine from psychopy.localization import _translate from psychopy.experiment import Param from pathlib import Path from psychopy.alerts import alert class EyetrackerCalibrationRoutine(BaseStandaloneRoutine): categories = ['Eyetracking'] targets = ["PsychoPy"] version = "2021....
14,143
Python
.py
242
37.743802
159
0.497693
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,589
__init__.py
psychopy_psychopy/psychopy/experiment/routines/photodiodeValidator/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from pathlib import Path from psychopy.experiment import Param from psychopy.experiment.plugins import PluginDevicesMixin, DeviceBackend from psychopy.experiment.components import getInitVals from psychopy.experiment.routines import Routine, BaseValidatorRoutine from psych...
15,995
Python
.py
393
29.407125
130
0.555156
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,590
__init__.py
psychopy_psychopy/psychopy/experiment/routines/unknown/__init__.py
from .. import BaseStandaloneRoutine from pathlib import Path class UnknownRoutine(BaseStandaloneRoutine): categories = ['Other'] targets = [] iconFile = Path(__file__).parent / "unknown.png" tooltip = "Unknown routine" def __init__(self, exp, name=''): BaseStandaloneRoutine.__init__(self...
773
Python
.py
23
25.608696
63
0.591946
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,591
__init__.py
psychopy_psychopy/psychopy/experiment/components/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Extensible set of components for the PsychoPy Builder view. """ import sys import os i...
15,947
Python
.py
352
35.454545
102
0.59687
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,592
_base.py
psychopy_psychopy/psychopy/experiment/components/_base.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Part of the PsychoPy library Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. Distributed under the terms of the GNU General Public License (GPL). """ import copy import textwrap from pathlib import Path from xml.etree.ElementTree import El...
64,957
Python
.py
1,468
32.222752
148
0.55515
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,593
__init__.py
psychopy_psychopy/psychopy/experiment/components/progress/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from pathlib import Path from psychopy.experiment.components import Param, _translate, getInitVals, BaseVisualComponent class ProgressComponent(BaseVisualComponent): """ """ categories = ['Stimuli'] targets = ['PsychoPy', 'PsychoJS'] version = "2023....
5,516
Python
.py
118
34.669492
101
0.549016
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,594
__init__.py
psychopy_psychopy/psychopy/experiment/components/grating/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). from pathlib import Path from psychopy.experiment.components import BaseVisualComponent, P...
9,162
Python
.py
178
38.303371
125
0.541243
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,595
__init__.py
psychopy_psychopy/psychopy/experiment/components/textbox/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). from pathlib import Path from psychopy.alerts import alerttools, alert from psychopy.exper...
16,374
Python
.py
322
36.468944
111
0.534115
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,596
__init__.py
psychopy_psychopy/psychopy/experiment/components/roi/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). from pathlib import Path from psychopy.experiment.components import Param, getInitVals, _...
12,802
Python
.py
286
33.374126
120
0.564312
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,597
__init__.py
psychopy_psychopy/psychopy/experiment/components/routineSettings/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from pathlib import Path from psychopy.experiment.components import BaseComponent, Param, _translate from psychopy.experiment.utils import CodeGenerationException class RoutineSettingsComponent(BaseComponent): """ """ categories = ['Other'] targets = ['Ps...
15,700
Python
.py
358
31.603352
285
0.545152
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,598
__init__.py
psychopy_psychopy/psychopy/experiment/components/dots/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). from os import path from pathlib import Path from psychopy.experiment.components import Ba...
9,039
Python
.py
173
39.421965
132
0.568739
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)
5,599
__init__.py
psychopy_psychopy/psychopy/experiment/components/mouse/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). from pathlib import Path from psychopy.experiment.components import BaseComponent, Param, ...
35,364
Python
.py
686
36.59621
146
0.529964
psychopy/psychopy
1,662
900
218
GPL-3.0
9/5/2024, 5:09:29 PM (Europe/Amsterdam)