Feature/generate dev question responses#214
Conversation
EdoStorm96
left a comment
There was a problem hiding this comment.
Besides merge conflicts, this all seems to be working well. Nice!
This did lead me to discover (as I've discussed with you) that a fully loaded USF cannot (with my patience) be loaded in the admin interface due to the heaviness of loading all the QuestionResponseInline's for one USF ... If you would fix that in this PR, it would be nice, but it is not really related to this, so it is not a must for me.
I would appreciate if you could bring this up to date with develop, so I can see the generated responses in action. Would you notify me when you've done this so I can have a quick last look?
Done! I have added a bit of prefetching to make the query fetching the UFS more performant. Now the Django Admin page loads within seconds. Have a look! |
EdoStorm96
left a comment
There was a problem hiding this comment.
Wow, crazy how much time this saves! Nice one.
Thanks to @EdoStorm96! Co-authored-by: Edo Storm <111129464+EdoStorm96@users.noreply.github.com>
Closes #194
As discussed a few weeks ago, this adjusts the
create_dev_dataset.pyscript. Ifcreate_dev_datasetis run without any flags, it will generate a random form with random steps and random questions. If you runcreate_dev_dataset --vwr, on the other hand, this will load the existing processing registry fixtures instead.Regardless, the script will then take the generated form (random or procreg) and create 1-4 random studies and 1 submission for each study for each user in the database. This takes a while (2:20 mins when I ran it), which is why I opted for not generating more than 1 submission per study. We can perhaps make this a bit more performant in the future, but for now this will do.