-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ruleset template #302
Add ruleset template #302
Conversation
feedback_form=Form([question], submit_label='Continue', is_profile=True)).action() | ||
for question in questions | ||
] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To my understanding, a questionnaire cannot be part of first_round
. We don't have a session before the StartSession
view, so we wouldn't be able to process the results. So better to move this to next_round
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As things are now, we save profile data with Participant
, so asking Profile
questions in the first_round()
is common in many experiments. If we decide to link Profile
answers to Session
, then many other experiments will also have to be modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't been able to find any experiment rules in which there are Profile
questions in the first round. For the participant, the difference should also not be noticeable, as StartSession
is a "silent" view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, the categorization experiment has a questionnaire in the first_round
. Consent is also a profile question that is in every experiment's first_round
.
It should not be noticeable to the participant, but the implementation depends on what our choice for saving Profile questions will be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say the Categorization experiment is an atypical case, so perhaps better to follow the majority of the experiments here, which don't ask questions before StartSession
?
session.save() | ||
|
||
# Calculate average score | ||
score_avg = session.result_set.all().aggregate(Avg('score'))['score__avg'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this should be also moved to a class method get_final_view
or something along these lines? This makes this easier to override.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Also like the overview of the steps to be done in order to set up the experiment. I'd only suggest to factor out the final view, so this can be more easily overridden.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to have this updated, thanks! Before we merge though -- I've been wondering whether we can make the base.py
class the template, as all other rules files derive from that. It would be neat if the template is in itself a working experiment, then subclassing / overriding functions would make the first steps towards your own experiment easiest. Perhaps something to look into tomorrow?
@@ -200,6 +201,6 @@ def get_feedback(cls, session): | |||
instruction=instruction, | |||
steps=[], | |||
button_label=button_label | |||
).action() | |||
) | |||
|
|||
return feedback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing emtpy line
Should we close this PR now that we have a ruleset template in the |
We should incorporate this work as a starting place for the 2AFC paradigm, I think. I'm thinking |
Okay, in that case we might want to update the name of this PR and its corresponding issue to avoid confusion. |
I have updated this PR to reflect new changes in our infrastructure. I am not sure if there is any need to use a command to "generate" this template, because it is already "generated" and sitting in the rules directory. I think we should merge it as it is, close this PR and reopen if we come up with new ideas. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need an empty consent form. Consent is now set through admin or otherwise will be lorem ipsum by default.
You are perfectly right that we should merge this PR. I do think that instead of "ruleset_template", the experiment could be renamed to "2afc". And let's refer in the wiki to this experiment as a nice guideline of how to set up an experiment. Perhaps even ship a mini playlist in this repo to use it with? (Wiki / playlist: leave for later.) Calling it "ruleset_template" might suggest to users that this one is not an experiment in its own right, while I think it can be nicely tweaked for multiple purposes. |
Closes #99