Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion psychopy/experiment/components/static/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(
"saveData",
]
self.params['code'] = Param(
code, valType='code', inputType="multi", categ='Custom',
code, valType='code', inputType="code", categ='Custom',
label=_translate("Custom code"),
hint=_translate(
"Custom code to be run during the static period (after updates)"
Expand Down
11 changes: 11 additions & 0 deletions psychopy/experiment/loops.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ class _BaseLoopHandler:
plugin = None
# indicates the tag which refers to this loop type in experiment files
tag = None
# label to be displayed in the "Add loop" button
label = None
# should this be hidden in the "Add loop" button?
hidden = False

@classmethod
def getTemplateJSON(cls):
Expand All @@ -65,6 +69,8 @@ def getTemplateJSON(cls):
'__class__': f"{cls.__module__}:{cls.__qualname__}",
'__name__': cls.__name__,
"plugin": cls.plugin,
'label': cls.label,
'hidden': cls.hidden,
"params": {}
}
# make an object for defaults
Expand All @@ -90,6 +96,7 @@ def getJSON(self):
profile = {
'tag': type(self).__name__,
'plugin': self.plugin,
'label': type(self).label,
'params': {}
}
# populate params
Expand All @@ -102,6 +109,7 @@ def applyJSON(self, profile):
# set basic info
self.tag = profile['tag']
self.plugin = profile['plugin']
self.label = profile['label']
# set params
for key, value in profile['params'].items():
self.params[key] = Param.fromJSON(value)
Expand Down Expand Up @@ -159,6 +167,7 @@ class TrialHandler(_BaseLoopHandler):
"""

tag = "TrialHandler"
label = _translate("Loop")

def __init__(self, exp, name="trials", loopType='random', nReps=5,
conditions=(), conditionsFile='', endPoints=(0, 1),
Expand Down Expand Up @@ -559,6 +568,7 @@ class StairHandler(_BaseLoopHandler):
"""

tag = "StairHandler"
label = "Staircase"

def __init__(self, exp, name="stair", nReps='50', startVal='', nReversals='',
nUp=1, nDown=3, minVal=0, maxVal=1,
Expand Down Expand Up @@ -728,6 +738,7 @@ class MultiStairHandler(_BaseLoopHandler):
"""

tag = "MultiStairHandler"
label = _translate("Interleaved staircases")

def __init__(self, exp, name="stair", nReps='50', stairType='simple',
switchStairs='random',
Expand Down
Empty file removed setup.py
Empty file.
Loading