YaleDecisionNeuro / PsychTaskFramework

2 stars 4 forks source link

Make into a sharable Matlab toolbox #69

Open shippy opened 7 years ago

shippy commented 7 years ago

This will require many steps; apart from the process of toolbox creation itself, it will most certainly require a re-thinking of the framework's structure, decisions about what to include as defaults and what to leave as demos (should RA/MDM get its own repo that merely uses this toolbox?), et cetera.

This seems like the ultimate pie-in-the-sky feature, but it's not. There's more than minimal functionality here. Elegant rewrites and testing can wait; real artists ship.

shippy commented 7 years ago

So it seems that "creating a toolbox" is a fancy way of saying "put your scripts under %MATLABPATH%/toolbox/{nameOfYourToolbox}. There's the packaging and the live scripts and all that jazz that you can do on top of that, but at its most basic, this is easier than I'd imagined. (And you can create an installable file, which means that I could check for version compatibility / PTB presence.)

Maybe the first step is to try and see if the following re-structuring breaks anything:

This might actually be a good idea in its own right, since developing 5+ tasks in a single repository might lead into versioning hell. git submodule means that the state of the framework can be tagged and frozen in place for each task individually, all the while the task is being developed.

shippy commented 7 years ago

MPath is a potentially useful tool, which provides "on Windows the ability to modify MATLAB's path environment without any requirements upon the end user".

shippy commented 7 years ago

No, it's even easier. Matlab has a three-click way of creating an add-on, which will then generate a (1) .prj file that has information about what belongs in the add-on, (2) a .mltbx file that's installable, modifies the path correctly, etc.

Managing updates is a little unclear. There seems to be a way to do this with Matlab MiniMart, but it seems that it's a decentralized approach that would have to be hosted somewhere? (Minimart File Exchange page.) It's worth trying if re-installing the .mlbtx file just adds more stuff to the path, or if there is a recognition that it's a newer version.