psychTestR icon indicating copy to clipboard operation
psychTestR copied to clipboard

Addition of additional scripts argument to test_options

Open sebsilas opened this issue 3 years ago • 5 comments
trafficstars

Addition of feature to allow users to include additional scripts via test_options, as discussed in #93.

sebsilas avatar Dec 01 '21 15:12 sebsilas

Requested changes made.

sebsilas avatar Dec 01 '21 17:12 sebsilas

Hm, I don't get these most recent errors when I check() locally.

sebsilas avatar Dec 02 '21 10:12 sebsilas

Sure, I'll work on that now.

Out of interest, why keep includeScript for the native psychTestR scripts? I know they're pretty small and so don't degrade performance, but if they too used normal script tags, everything could be kept in one function.

Hi @sebsilas, the reason is that to use script tags psychTestR would have to take control of the user's www directory, to make sure that those scripts were always present on launch. We could do this but it's a bit invasive and requires a bit of coding overhead.

pmcharrison avatar Jun 20 '22 14:06 pmcharrison

Sure, I'll work on that now. Out of interest, why keep includeScript for the native psychTestR scripts? I know they're pretty small and so don't degrade performance, but if they too used normal script tags, everything could be kept in one function.

Hi @sebsilas, the reason is that to use script tags psychTestR would have to take control of the user's www directory, to make sure that those scripts were always present on launch. We could do this but it's a bit invasive and requires a bit of coding overhead.

I think you already responded to this somewhere else.

The commit I would like you to pull is 80416abc5bcc2591126f197b2a10071248be01c5. It wasn't what you previously suggested (2 separate arguments for different kinds of scripts), but has worked well for me. I can't remember exactly what now, but I ran into several issues with the separate argument approach and this heuristic works, at least for my use case.

sebsilas avatar Jun 20 '22 14:06 sebsilas

Thanks @sebsilas, the commit looks good to me. The way the process ordinarily works is that you create a pull request containing the changes you want to merge. Seems like the present pull request contains some other changes too?

pmcharrison avatar Jun 20 '22 15:06 pmcharrison