dicarlolab / mturkutils

High-throughput web-based human psychophysics
0 stars 4 forks source link

Conformity to the new sample-then-test proposal #3

Closed hahong closed 10 years ago

hahong commented 11 years ago

For the new proposal, see: https://github.com/dicarlolab/dldata/issues/30

mturkutils.base.update_mongodb_once() needs to be updated to make it compatible to the new proposal. I'm thinking about adding a new parameter mode that specifies the function's mode of action. Possible values would include:

Comments/suggestions are welcome. @ardila @yamins81 @jiaxx @esolomon @RishiRajalingham

yamins81 commented 11 years ago

It does make sense to keep track of the of the versions ("classic" and "sample_test_v1"). Notice that there's also some collections that were put in using what were effectively earlier versions of the mturkutils and which have somewhat different format still.

I think the right way to do this is to have something like:

def update_mongodb_once_base(args, .... callable):
     use callable to update

but which is never called alone. Note that there is NO default setting for callable.

Then one defines

def update_mongodb_once_sample_test(args)
     callable = the relevant setting for sample_test_format
     update_mongodb_once_base(args, callable)

This is what is called to actually put records in the DB. Similarly, you can define "classic" in the same way. But ultimately, all the records should be converted to the new format since it actually has more information. So it's not clear we really need to do that. Ha, what's your main reason for really wanting to keep track of the old versions?