Recruiters#

class psynet.recruiters.BaseCapRecruiter[source]#

Bases: PsyNetRecruiter

The CapRecruiter base class

close_recruitment()[source]#

Talk about closing recruitment.

open_recruitment(n=1)[source]#

Return an empty list which otherwise would be a list of recruitment URLs.

reward_bonus(participant, amount, reason)[source]#

Return values for basePay and bonus to cap-recruiter application.

class psynet.recruiters.BaseLucidRecruiter(*args, **kwargs)[source]#

Bases: PsyNetRecruiter

The LucidRecruiter base class

close_recruitment()[source]#

Lucid automatically ends recruitment when the number of completes has reached the target.

current_survey_number()[source]#

Return the survey number associated with the active experiment ID if any such survey exists.

exit_response(experiment, participant)[source]#

Delegate to the experiment for possible values to show to the participant and complete the survey.

property in_progress#

Does a Lucid survey for the current experiment ID already exist?

normalize_entry_information(entry_information)[source]#

Accepts data from the recruited user and returns data needed to validate, create or load a Dallinger Participant.

See create_participant() for details.

The default implementation extracts hit_id, assignment_id, and worker_id values directly from entry_information.

This implementation extracts the RID from entry_information and assigns the value to hit_id, assignment_id, and worker_id.

open_recruitment(n=1)[source]#

Open a connection to Lucid and create a survey.

alias of LucidConsentPage

reward_bonus(participant, amount, reason)[source]#

Set completed_at timestamp on participant’s LucidRID entry

class psynet.recruiters.CapRecruiter[source]#

Bases: BaseCapRecruiter

The production cap-recruiter.

class psynet.recruiters.DevCapRecruiter[source]#

Bases: BaseCapRecruiter

The development cap-recruiter.

class psynet.recruiters.DevLucidRecruiter(*args, **kwargs)[source]#

Bases: BaseLucidRecruiter

Development recruiter for the Lucid Marketplace.

class psynet.recruiters.GenericRecruiter[source]#

Bases: PsyNetRecruiter

An improved version of Dallinger’s Hot-Air Recruiter.

exit_response(experiment, participant)[source]#

Delegate to the experiment for possible values to show to the participant.

open_recruitment(n=1)[source]#

Return initial experiment URL list, plus instructions for finding subsequent recruitment events in experiment logs.

class psynet.recruiters.LucidRID(*args, **kwargs)[source]#

Bases: Base, SQLMixin

creation_time#

the time at which the Network was created.

details#

a generic column for storing structured JSON data

failed = None#

boolean indicating whether the Network has failed which prompts Dallinger to ignore it unless specified otherwise. Objects are usually failed to indicate something has gone wrong.

failed_reason = None#

an optional reason the object was failed. If the object is failed as part of a cascading failure triggered from another object, the chain of objects will be captured in this field.

id#

a unique number for every entry. 1, 2, 3 and so on…

property1#

a generic column that can be used to store experiment-specific details in String form.

property2#

a generic column that can be used to store experiment-specific details in String form.

property3#

a generic column that can be used to store experiment-specific details in String form.

property4#

a generic column that can be used to store experiment-specific details in String form.

property5#

a generic column that can be used to store experiment-specific details in String form.

time_of_death = None#

the time at which failing occurred

type#
vars#
class psynet.recruiters.LucidRecruiter(*args, **kwargs)[source]#

Bases: BaseLucidRecruiter

The production Lucid recruiter. Recruit participants from the Lucid Marketplace.

exception psynet.recruiters.LucidRecruiterException[source]#

Bases: Exception

Custom exception for LucidRecruiter

class psynet.recruiters.PsyNetRecruiter[source]#

Bases: CLIRecruiter

The PsyNetRecruiter base class

compensate_worker(*args, **kwargs)[source]#

A recruiter may provide a means to directly compensate a worker.

notify_duration_exceeded(participants, reference_time)[source]#

The participant has been working longer than the time defined in the “duration” config value.

recruit(n=1)[source]#

Incremental recruitment isn’t implemented for now, so we return an empty list.

class psynet.recruiters.StagingCapRecruiter[source]#

Bases: BaseCapRecruiter

The staging cap-recruiter.