Closed hahong closed 10 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?
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 parametermode
that specifies the function's mode of action. Possible values would include:"sample_test_v1"
: Update the db according to the proposal (what I call "version 1.0"). I might also add another parameteropts
that specifies which fields in the json should be used to construct the proposal's fields, namely"StimShown"
and"ImgData"
."classic"
: No change. Work as it has been doing.callable
: User supplied custom function.Comments/suggestions are welcome. @ardila @yamins81 @jiaxx @esolomon @RishiRajalingham