Skip to content

Commit cb281fe

Browse files
committed
Merge remote-tracking branch 'origin/2.0.1_fixes'
Conflicts: psiturk/version.py
2 parents c10c2ba + 2276a75 commit cb281fe

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

psiturk/experiment.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ def get_random_condcount():
135135
filter(Participant.codeversion == config.get('Task Parameters', 'experiment_code_version')).\
136136
filter(or_(Participant.status == COMPLETED,
137137
Participant.status == CREDITED,
138+
Participant.status == SUBMITTED,
139+
Participant.status == BONUSED,
138140
Participant.beginhit > starttime)).\
139141
all()
140142
counts = Counter()

psiturk/psiturk_shell.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -567,19 +567,20 @@ def worker_bonus(self, chosenHit, auto, amount, reason, assignment_ids = None):
567567
init_db()
568568
part = Participant.query.\
569569
filter(Participant.assignmentid == assignmentID).\
570+
filter(Participant.endhit != None).\
570571
one()
571572
if auto:
572573
amount = part.bonus
573574
status = part.status
574575
if amount<=0:
575576
print "bonus amount <=$0, no bonus given to", assignmentID
576-
elif status==6 and not overrideStatus:
577+
elif status==7 and not overrideStatus:
577578
print "bonus already awarded to ", assignmentID
578579
else:
579580
success = self.amt_services.bonus_worker(assignmentID, amount, reason)
580581
if success:
581582
print "gave bonus of $" + str(amount) + " to " + assignmentID
582-
part.status = 6
583+
part.status = 7
583584
db_session.add(part)
584585
db_session.commit()
585586
db_session.remove()
@@ -1299,7 +1300,7 @@ def do_hit(self, arg):
12991300
"""
13001301
Usage:
13011302
hit create [<numWorkers> <reward> <duration>]
1302-
hit extend <HITid> [--assignments <number>] [--expiration <minutes>]
1303+
hit extend <HITid> [(--assignments <number>)] [(--expiration <minutes>)]
13031304
hit expire (--all | <HITid> ...)
13041305
hit dispose (--all | <HITid> ...)
13051306
hit list [--active | --reviewable]
@@ -1337,7 +1338,7 @@ def do_worker(self, arg):
13371338
worker reject (--hit <hit_id> | <assignment_id> ...)
13381339
worker unreject (--hit <hit_id> | <assignment_id> ...)
13391340
worker bonus (--amount <amount> | --auto) (--hit <hit_id> | <assignment_id> ...)
1340-
worker list [--submitted | --approved | --rejected] [--hit <hit_id>]
1341+
worker list [--submitted | --approved | --rejected] [(--hit <hit_id>)]
13411342
worker help
13421343
"""
13431344
if arg['approve']:
@@ -1414,7 +1415,7 @@ def run(cabinmode=False, script=None):
14141415
print colorize('\n'.join(['libedit version of readline detected.',
14151416
'readline will not be well behaved, which may cause all sorts',
14161417
'of problems for the psiTurk shell. We highly recommend installing',
1417-
'the gnu version of readline by running "sudo easy_install -a readline".',
1418+
'the gnu version of readline by running "sudo pip install gnureadline".',
14181419
'Note: "pip install readline" will NOT work because of how the OSX',
14191420
'pythonpath is structured.']), 'red', False)
14201421
sys.argv = [sys.argv[0]] # drop arguments which were already processed in command_line.py

psiturk/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version_number = '2.0.0'
1+
version_number = '2.0.1'

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gunicorn==18.0
55
boto==2.15.0
66
cmd2==0.6.7
77
docopt==0.6.1
8-
readline==6.2.4.1
8+
gnureadline==6.3.3
99
requests==2.2.1
1010
user-agents==0.2.0
1111
sh==1.09

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
]
3232
},
3333
setup_requires = [],
34-
install_requires = ["argparse", "Flask", "SQLAlchemy", "gunicorn", "boto>=2.9","cmd2","docopt","readline","requests>=2.2.1","user_agents", "sh", "fake-factory", "gitpython"],
34+
install_requires = ["argparse", "Flask", "SQLAlchemy", "gunicorn", "boto>=2.9","cmd2","docopt","gnureadline","requests>=2.2.1","user_agents", "sh", "fake-factory", "gitpython"],
3535
author = "NYU Computation and Cognition Lab",
3636
author_email = "[email protected]",
3737
description = "An open platform for science on Amazon Mechanical Turk",

0 commit comments

Comments
 (0)