Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.0.1_fixes'
Browse files Browse the repository at this point in the history
Conflicts:
	psiturk/version.py
  • Loading branch information
gureckis committed May 29, 2014
2 parents c10c2ba + 2276a75 commit cb281fe
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions psiturk/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ def get_random_condcount():
filter(Participant.codeversion == config.get('Task Parameters', 'experiment_code_version')).\
filter(or_(Participant.status == COMPLETED,
Participant.status == CREDITED,
Participant.status == SUBMITTED,
Participant.status == BONUSED,
Participant.beginhit > starttime)).\
all()
counts = Counter()
Expand Down
11 changes: 6 additions & 5 deletions psiturk/psiturk_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,19 +567,20 @@ def worker_bonus(self, chosenHit, auto, amount, reason, assignment_ids = None):
init_db()
part = Participant.query.\
filter(Participant.assignmentid == assignmentID).\
filter(Participant.endhit != None).\
one()
if auto:
amount = part.bonus
status = part.status
if amount<=0:
print "bonus amount <=$0, no bonus given to", assignmentID
elif status==6 and not overrideStatus:
elif status==7 and not overrideStatus:
print "bonus already awarded to ", assignmentID
else:
success = self.amt_services.bonus_worker(assignmentID, amount, reason)
if success:
print "gave bonus of $" + str(amount) + " to " + assignmentID
part.status = 6
part.status = 7
db_session.add(part)
db_session.commit()
db_session.remove()
Expand Down Expand Up @@ -1299,7 +1300,7 @@ def do_hit(self, arg):
"""
Usage:
hit create [<numWorkers> <reward> <duration>]
hit extend <HITid> [--assignments <number>] [--expiration <minutes>]
hit extend <HITid> [(--assignments <number>)] [(--expiration <minutes>)]
hit expire (--all | <HITid> ...)
hit dispose (--all | <HITid> ...)
hit list [--active | --reviewable]
Expand Down Expand Up @@ -1337,7 +1338,7 @@ def do_worker(self, arg):
worker reject (--hit <hit_id> | <assignment_id> ...)
worker unreject (--hit <hit_id> | <assignment_id> ...)
worker bonus (--amount <amount> | --auto) (--hit <hit_id> | <assignment_id> ...)
worker list [--submitted | --approved | --rejected] [--hit <hit_id>]
worker list [--submitted | --approved | --rejected] [(--hit <hit_id>)]
worker help
"""
if arg['approve']:
Expand Down Expand Up @@ -1414,7 +1415,7 @@ def run(cabinmode=False, script=None):
print colorize('\n'.join(['libedit version of readline detected.',
'readline will not be well behaved, which may cause all sorts',
'of problems for the psiTurk shell. We highly recommend installing',
'the gnu version of readline by running "sudo easy_install -a readline".',
'the gnu version of readline by running "sudo pip install gnureadline".',
'Note: "pip install readline" will NOT work because of how the OSX',
'pythonpath is structured.']), 'red', False)
sys.argv = [sys.argv[0]] # drop arguments which were already processed in command_line.py
Expand Down
2 changes: 1 addition & 1 deletion psiturk/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version_number = '2.0.0'
version_number = '2.0.1'
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gunicorn==18.0
boto==2.15.0
cmd2==0.6.7
docopt==0.6.1
readline==6.2.4.1
gnureadline==6.3.3
requests==2.2.1
user-agents==0.2.0
sh==1.09
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
]
},
setup_requires = [],
install_requires = ["argparse", "Flask", "SQLAlchemy", "gunicorn", "boto>=2.9","cmd2","docopt","readline","requests>=2.2.1","user_agents", "sh", "fake-factory", "gitpython"],
install_requires = ["argparse", "Flask", "SQLAlchemy", "gunicorn", "boto>=2.9","cmd2","docopt","gnureadline","requests>=2.2.1","user_agents", "sh", "fake-factory", "gitpython"],
author = "NYU Computation and Cognition Lab",
author_email = "authors@psiturk.org",
description = "An open platform for science on Amazon Mechanical Turk",
Expand Down

0 comments on commit cb281fe

Please sign in to comment.