From 2c263f00af1467948be70d2836c40a099f3daeb0 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 6 Oct 2020 17:15:57 -0500 Subject: [PATCH] Pull into prompts GHToolbox dependency handling (via GitHub). --- +dj/setup.m | 37 +++++++++++++++++++++++++++++++++---- +dj/version.m | 2 +- DataJoint.mltbx | Bin 70595 -> 71102 bytes LNX-docker-compose.yml | 10 +--------- tests/Prep.m | 2 +- 5 files changed, 36 insertions(+), 15 deletions(-) diff --git a/+dj/setup.m b/+dj/setup.m index fc5d9eb1..2ae665bc 100644 --- a/+dj/setup.m +++ b/+dj/setup.m @@ -29,11 +29,40 @@ function setup(varargin) try ghtb.require(requiredToolboxes, 'prompt', prompt); catch ME - if strcmp(ME.identifier, 'MATLAB:undefinedVarOrClass') + installPromptMsg = { + 'Toolbox ''%s'' did not meet the minimum requirements.' + 'Would you like to proceed with an upgrade?' + }; + if strcmp(ME.identifier, 'MATLAB:undefinedVarOrClass') && (~prompt || strcmpi('yes',... + dj.internal.ask(sprintf(sprintf('%s\n', installPromptMsg{:}), 'GHToolbox')))) + % fetch + tmp_toolbox = [tempname '.mltbx']; + websave(tmp_toolbox, ['https://github.com/' requiredToolboxes{1}.ResolveTarget ... + '/releases/download/' ... + subsref(webread(['https://api.github.com/repos/' ... + requiredToolboxes{1}.ResolveTarget ... + '/releases/latest'], ... + weboptions('Timeout', 60)), ... + substruct('.', 'tag_name')) ... + '/GHToolbox.mltbx'], weboptions('Timeout', 60)); + % install + try + matlab.addons.install(tmp_toolbox, 'overwrite'); + catch ME + if strcmp(ME.identifier, 'MATLAB:undefinedVarOrClass') + matlab.addons.toolbox.installToolbox(tmp_toolbox); + else + rethrow(ME); + end + end + % remove temp toolbox file + delete(tmp_toolbox); + % retrigger dependency validation + ghtb.require(requiredToolboxes, 'prompt', prompt); + elseif strcmp(ME.identifier, 'MATLAB:undefinedVarOrClass') GHToolboxMsg = { - 'Toolbox ''GHToolbox'' did not meet the minimum minimum requirements.' - 'Please install it via instructions in ' - '''https://github.com/datajoint/GHToolbox'''.' + 'Toolbox ''GHToolbox'' did not meet the minimum requirements.' + 'Please proceed to install it.' }; error('DataJoint:verifyGHToolbox:Failed', ... sprintf('%s\n', GHToolboxMsg{:})); diff --git a/+dj/version.m b/+dj/version.m index 3efacd05..1fb2916e 100644 --- a/+dj/version.m +++ b/+dj/version.m @@ -1,7 +1,7 @@ function varargout = version % report DataJoint version -v = struct('major',3,'minor',3,'bugfix',2); +v = struct('major',3,'minor',3,'bugfix',3); if nargout varargout{1}=v; diff --git a/DataJoint.mltbx b/DataJoint.mltbx index feb1a4996ac5e24495753848b2c3ec2aa34eb2a7..d2251b3462a1ffa6963df44795bf18d595a79d61 100644 GIT binary patch delta 5587 zcmZX21ymK?_x2sSk+`Hvr$~!5h_r-A3ew%62$EMi1Zl2HNJ!U3Qc}7E$xB_jB_#!k zKaTkQ*1Nv5)~xfaXFq$-J~M01?6X^QF&Yao2p>N}#~_D5AUKd4W%6Z&sQ~)bTwV-_ zLqV`f0c8OJhIleA(UnPKwC`Z}E&zcDqQw)7)0TJ1N&R)fQ?O!^LShX#qa|H{0(AH{43HQ~_5=yFltdg5tbBS0f_VR8FHmt&tOCxeCH>%h zyYvMpOenqocR~FKA2N_pZ7U@JC6@z#6I~kg1q~KM;+P=F8jA#PTh5R20@q$%I#d03 z4YqS;prn6p2(-j!Er!GXJV&`=CuS842qb|30wKM60ah=bJ3G7a+_A9Zd12}H(uLcx zSl8HjO6Ugcdu|Opfq!mL70V(o&}|Lruz?hO0Jo&7%}j5P?~`W~iBtZO(``Mgk>k+q zUdOf8(8av-wsZFUrN)Lhdsee~o})WUii>78wwScVJWfK@OPDZOf0meoP;f%7P(&Di z`9qUnSCP*Q=Sar zk|Hh!JJ}4?nSeoS;cMq7Dr=G2j0t8k-_6y3-KOQL%y`jZx%mZWK{v~d>Qa)ex8Nt; zF(kFzNsEF{<4eW3kHN=QHd*Dtdm$0OrC56HqriG7`wFVD2SB>M=k|=ri z;y6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