spitschan / SilentSubstitutionToolbox

Toolbox to simulate colorimetric observers for evaluation of photoreceptor isolation
Other
7 stars 5 forks source link

Tighten up TbTb includes #36

Closed DavidBrainard closed 6 years ago

DavidBrainard commented 6 years ago

SST includes both PTB and BLTB. It needs some of what is in those toolboxes, but not all. We might think about tightening up to include just the subfolders that we need.

spitschan commented 6 years ago

That's a good call. Do you have an example json config which shows how to only get subfolders? Thanks.

DavidBrainard commented 6 years ago

{ "flavor": "", "hook": "", "importance": "", "localHookTemplate": "Configuration/BrainardLabToolboxLocalHookTemplate.m", "name": "BrainardLabToolbox", "pathPlacement": "append", "subfolder": ["Ellipsoids" "OneLiners"], "toolboxRoot": "", "type": "git", "update": "", "url": "https://github.com/brainardlab/BrainardLabToolbox.git" },

spitschan commented 6 years ago

The specification of the subfolder doesn't work. Running the below example from which it is borrowed throws an error. Any ideas? This is MATLAB 2017b.

>> tbUse('tfeQCM')
Local copy of ToolboxToolbox is up to date.
Updating "ToolboxRegistry".
Already up-to-date.
Error using tbToolboxRecord (line 64)
The value of 'subfolder' is invalid. It
must satisfy the function:
@(val)ischar(val)||iscellstr(val)||isstring(val).

Error in tbReadConfig (line 65)
    wellFormedRecords{tt} =
    tbToolboxRecord(record);

Error in
TbIncludeStrategy.resolveIncludedConfigs
(line 66)
                    newConfig =
                    tbReadConfig(prefs,
                    'configPath', url);

Error in tbDeployToolboxes (line 127)
[resolved, included] =
TbIncludeStrategy.resolveIncludedConfigs(config,
prefs);

Error in tbUse (line 32)
results = tbDeployToolboxes(prefs,
'registered', registered);
DavidBrainard commented 6 years ago

Can you send me the exact json file you are using?

DB

From: Manuel Spitschan notifications@github.com Reply-To: spitschan/SilentSubstitutionToolbox reply@reply.github.com Date: Thursday, October 18, 2018 at 5:15 AM To: spitschan/SilentSubstitutionToolbox SilentSubstitutionToolbox@noreply.github.com Cc: "Brainard, David H" brainard@psych.upenn.edu, Author author@noreply.github.com Subject: Re: [spitschan/SilentSubstitutionToolbox] Tighten up TbTb includes (#36)

The specification of the subfolder doesn't work. Running the below example from which it is borrowed throws an error. Any ideas? This is MATLAB 2017b.

tbUse('tfeQCM')

Local copy of ToolboxToolbox is up to date.

Updating "ToolboxRegistry".

Already up-to-date.

Error using tbToolboxRecord (line 64)

The value of 'subfolder' is invalid. It

must satisfy the function:

@(val)ischar(val)||iscellstr(val)||isstring(val).

Error in tbReadConfig (line 65)

wellFormedRecords{tt} =

tbToolboxRecord(record);

Error in

TbIncludeStrategy.resolveIncludedConfigs

(line 66)

                newConfig =

                tbReadConfig(prefs,

                'configPath', url);

Error in tbDeployToolboxes (line 127)

[resolved, included] =

TbIncludeStrategy.resolveIncludedConfigs(config,

prefs);

Error in tbUse (line 32)

results = tbDeployToolboxes(prefs,

'registered', registered);

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/spitschan/SilentSubstitutionToolbox/issues/36#issuecomment-430936256, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABGuZWx84JgFbvJkBk1E2IYGdDSxKbP3ks5umEawgaJpZM4XjyOH.

spitschan commented 6 years ago

I'm just using the running tbUse('tfeQCM') which uses the tfeQCM.json from the ToolboxRegistry repo:

[

        {
        "flavor": "",
        "hook": "",
        "name": "UnitTestToolbox",
        "pathPlacement": "append",
        "subfolder": "",
        "toolboxRoot": "",
        "type": "include",
        "update": "",
        "url": ""
    },
        {
        "flavor": "",
        "hook": "",
        "name": "RemoteDataToolbox",
        "pathPlacement": "append",
        "subfolder": "",
        "toolboxRoot": "",
        "type": "include",
        "update": "",
        "url": ""
    },
    {
        "flavor": "",
        "hook": "",
        "importance": "",
        "localHookTemplate": "Configuration/BrainardLabToolboxLocalHookTemplate.m",
        "name": "BrainardLabToolbox",
        "pathPlacement": "append",
        "subfolder": ["Ellipsoids" "OneLiners"],
        "toolboxRoot": "",
        "type": "git",
        "update": "",
        "url": "https://github.com/brainardlab/BrainardLabToolbox.git"
    },
    {
        "flavor": "",
        "hook": "",
        "localHookTemplate": "",
        "name": "Psychtoolbox-3",
        "pathPlacement": "append",
        "subfolder": ["Psychtoolbox/Psychometric"],
        "toolboxRoot": "",
        "type": "git",
        "update": "",
        "url": "https://github.com/Psychtoolbox-3/Psychtoolbox-3.git"
    },
    {
        "flavor": "",
        "hook": "",
        "importance": "",
        "localHookTemplate": "",
        "name": "fshift",
        "pathPlacement": "append",
        "subfolder": "",
        "toolboxRoot": "",
        "type": "webget",
        "update": "",
        "url": "https:\/\/www.mathworks.com\/matlabcentral\/mlc-downloads\/downloads\/submissions\/7886\/versions\/5\/download\/zip"
    },
    {
        "flavor": "",
        "hook": "",
        "localHookTemplate": "",
        "name": "temporalFittingEngine",
        "pathPlacement": "append",
        "subfolder": "",
        "toolboxRoot": "",
        "type": "include",
        "update": "",
        "url": ""
    },
    {
        "flavor": "",
        "hook": "",
        "localHookTemplate": "",
        "name": "tfeQCM",
        "pathPlacement": "append",
        "subfolder": "",
        "toolboxRoot": "",
        "type": "git",
        "update": "",
        "url": "https://github.com/BrainardLab/tfeQCM.git"
    }
]
DavidBrainard commented 6 years ago

Very dd. That works just fine for me on my Mac and I think Michael uses it regularly on Linux. Are you up to date on TbTb (although, this is not a new feature)? Output below, note that it correctly spits out what it is doing with the subfolders.

It looks like the string fails a type check. What version of Matlab are you running? That string checking has been a bit of a moving target across Matlab revisions, although I didn't think we were highly version dependent in what we had.

DB

tbUse('tfeQCM') Local copy of ToolboxToolbox is up to date. Updating "ToolboxRegistry". Already up-to-date. Updating "BrainardLabToolbox". Already up-to-date. Updating "Psychtoolbox-3". Already up-to-date. Updating "fshift". Updating "tfeQCM". Already up-to-date. Updating "UnitTestToolbox". Already up-to-date. Updating "RemoteDataToolbox". Already up-to-date. Updating "temporalFittingEngine". Already up-to-date. Found "jsonlab_v1.2" and skipping update. Resetting path to factory state. Adding "ToolboxToolbox" to path at "/Users/dhb/Documents/MATLAB/ToolboxToolbox". Adding "BrainardLabToolbox" to path at "/Users/dhb/Documents/MATLAB/toolboxes/BrainardLabToolbox/Ellipsoids". Adding "BrainardLabToolbox" to path at "/Users/dhb/Documents/MATLAB/toolboxes/BrainardLabToolbox/OneLiners". Adding "Psychtoolbox-3" to path at "/Users/dhb/Documents/MATLAB/toolboxes/Psychtoolbox-3/Psychtoolbox/Psychometric". Adding "fshift" to path at "/Users/dhb/Documents/MATLAB/toolboxes/matlabcentral/fshift". Adding "tfeQCM" to path at "/Users/dhb/Documents/MATLAB/toolboxes/tfeQCM". Adding "UnitTestToolbox" to path at "/Users/dhb/Documents/MATLAB/toolboxes/UnitTestToolbox". Adding "RemoteDataToolbox" to path at "/Users/dhb/Documents/MATLAB/toolboxes/RemoteDataToolbox". Adding "temporalFittingEngine" to path at "/Users/dhb/Documents/MATLAB/toolboxes/temporalFittingEngine". Adding "jsonlab_v1.2" to path at "/Users/dhb/Documents/MATLAB/toolboxes/jsonlab_v1.2". Checking for "BrainardLabToolbox" local hook. Running local hook "/Users/dhb/Documents/MATLAB/localHookFolder/BrainardLabToolboxLocalHook.m". Hook success with status 0. Checking for "Psychtoolbox-3" local hook. Checking for "fshift" local hook. Checking for "tfeQCM" local hook. Checking for "UnitTestToolbox" local hook. Checking for "RemoteDataToolbox" local hook. Checking for "temporalFittingEngine" local hook. Running local hook "/Users/dhb/Documents/MATLAB/localHookFolder/temporalFittingEngine.m". Hook success with status 0. Checking for "jsonlab_v1.2" local hook. Looks good: 8 resolved toolboxes deployed OK.

ans =

1×8 struct array with fields:

extra
flavor
hook
importance
localHookTemplate
name
pathPlacement
requirementHook
subfolder
toolboxRoot
type
update
url
path
status
message
operation
command
strategy
isOk

From: Manuel Spitschan notifications@github.com Reply-To: spitschan/SilentSubstitutionToolbox reply@reply.github.com Date: Thursday, October 18, 2018 at 8:31 AM To: spitschan/SilentSubstitutionToolbox SilentSubstitutionToolbox@noreply.github.com Cc: "Brainard, David H" brainard@psych.upenn.edu, Author author@noreply.github.com Subject: Re: [spitschan/SilentSubstitutionToolbox] Tighten up TbTb includes (#36)

I'm just using the running tbUse('tfeQCM') which uses the tfeQCM.json from the ToolboxRegistry repo:

[

    {

     "flavor": "",

     "hook": "",

     "name": "UnitTestToolbox",

     "pathPlacement": "append",

     "subfolder": "",

     "toolboxRoot": "",

     "type": "include",

     "update": "",

     "url": ""

},

    {

     "flavor": "",

     "hook": "",

     "name": "RemoteDataToolbox",

     "pathPlacement": "append",

     "subfolder": "",

     "toolboxRoot": "",

     "type": "include",

     "update": "",

     "url": ""

},

{

    "flavor": "",

     "hook": "",

     "importance": "",

     "localHookTemplate": "Configuration/BrainardLabToolboxLocalHookTemplate.m",

     "name": "BrainardLabToolbox",

     "pathPlacement": "append",

     "subfolder": ["Ellipsoids" "OneLiners"],

     "toolboxRoot": "",

     "type": "git",

     "update": "",

     "url": "https://github.com/brainardlab/BrainardLabToolbox.git"

},

{

     "flavor": "",

     "hook": "",

     "localHookTemplate": "",

     "name": "Psychtoolbox-3",

     "pathPlacement": "append",

     "subfolder": ["Psychtoolbox/Psychometric"],

     "toolboxRoot": "",

     "type": "git",

     "update": "",

     "url": "https://github.com/Psychtoolbox-3/Psychtoolbox-3.git"

},

{

     "flavor": "",

     "hook": "",

     "importance": "",

     "localHookTemplate": "",

     "name": "fshift",

     "pathPlacement": "append",

     "subfolder": "",

     "toolboxRoot": "",

     "type": "webget",

     "update": "",

     "url": "https:\/\/www.mathworks.com\/matlabcentral\/mlc-downloads\/downloads\/submissions\/7886\/versions\/5\/download\/zip"

},

{

     "flavor": "",

     "hook": "",

     "localHookTemplate": "",

     "name": "temporalFittingEngine",

     "pathPlacement": "append",

     "subfolder": "",

     "toolboxRoot": "",

     "type": "include",

     "update": "",

     "url": ""

},

{

     "flavor": "",

     "hook": "",

     "localHookTemplate": "",

     "name": "tfeQCM",

     "pathPlacement": "append",

     "subfolder": "",

     "toolboxRoot": "",

     "type": "git",

     "update": "",

     "url": "https://github.com/BrainardLab/tfeQCM.git"

}

]

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/spitschan/SilentSubstitutionToolbox/issues/36#issuecomment-430989911, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABGuZfuxeQdJt0MvqEXlQG72aL1qlQLVks5umHRPgaJpZM4XjyOH.

spitschan commented 6 years ago

That is odd. I'm running MATLAB 2017b.

spitschan commented 6 years ago

Whatever I did just now seemed to have fixed it.

And, I just updated the SST json in the ToolboxRegistry with only the subdirs required (I think), so closing this.