Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 0 additions & 100 deletions +dj/+lib/compareVersions.m

This file was deleted.

11 changes: 1 addition & 10 deletions +dj/Connection.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,7 @@
% specify the connection to the database.
% initQuery is the SQL query to be executed at the start
% of each new session.
setupDJ(true);
try
mymVersion = mym('version');
assert(mymVersion.major > 2 || mymVersion.major==2 && mymVersion.minor>=6)
catch
error 'Outdated version of mYm. Please upgrade to version 2.6 or later'
end
if verLessThan('matlab', '8.6')
error 'MATLAB version 8.6 (R2015b) or greater is required'
end
dj.setup('prompt', ~dj.set('suppressPrompt'));
self.host = host;
self.user = username;
self.password = password;
Expand Down
1 change: 0 additions & 1 deletion +dj/conn.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
end
end
else
% invoke setupDJ
% optional environment variables specifying the connection.
env = struct(...
'host', 'DJ_HOST', ...
Expand Down
51 changes: 51 additions & 0 deletions +dj/setup.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
function setup(varargin)
p = inputParser;
addOptional(p, 'force', false);
addOptional(p, 'prompt', true);
parse(p, varargin{:});
force = p.Results.force;
prompt = p.Results.prompt;
persistent INVOKED
if ~isempty(INVOKED) && ~force
return
end
% check MATLAB
if verLessThan('matlab', '9.1')
error('DataJoint:System:UnsupportedMatlabVersion', ...
'MATLAB version 9.1 (R2016b) or greater is required');
end
% require certain toolboxes
requiredToolboxes = {...
struct(...
'Name', 'GHToolbox', ...
'ResolveTarget', 'datajoint/GHToolbox'...
), ...
struct(...
'Name', 'mym', ...
'ResolveTarget', 'guzman-raphael/mym', ...
'Version', '2.7.3'...
)...
};
try
ghtb.require(requiredToolboxes, 'prompt', prompt);
catch ME
if 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'''.'
};
error('DataJoint:verifyGHToolbox:Failed', ...
sprintf('%s\n', GHToolboxMsg{:}));
else
rethrow(ME)
end
end
% check mym
mymVersion = mym('version');
assert(mymVersion.major > 2 || mymVersion.major==2 && mymVersion.minor>=6, ...
'DataJoint:System:mYmIncompatible', ...
'Outdated version of mYm. Please upgrade to version 2.6 or later');
% set cache
INVOKED = true;
end
2 changes: 1 addition & 1 deletion +dj/version.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function varargout = version
% report DataJoint version

v = struct('major',3,'minor',3,'bugfix',1);
v = struct('major',3,'minor',3,'bugfix',2);

if nargout
varargout{1}=v;
Expand Down
100 changes: 0 additions & 100 deletions +tests/+lib/compareVersions.m

This file was deleted.

5 changes: 0 additions & 5 deletions +tests/Main.m

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
*.m~
mym/
*.mltbx
*.env
notebook
*getSchema.m
docker-compose.yml
.vscode
matlab.prf
win.*
macos.*
macos.*
package.prj
Empty file removed .gitmodules
Empty file.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ jobs:
- <<: *slim
env:
- MATLAB_VERSION: R2018b
- MYSQL_TAG: 5.7
- <<: *slim
env:
- MATLAB_VERSION: R2016b
- MYSQL_TAG: 5.7
Binary file added DataJoint.mltbx
Binary file not shown.
33 changes: 22 additions & 11 deletions LNX-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ services:
app:
<<: *net
environment:
- DISPLAY
- MATLAB_LICENSE
- MATLAB_USER
- DJ_HOST=fakeservices.datajoint.io
Expand All @@ -35,17 +34,29 @@ services:
fakeservices.datajoint.io:
condition: service_healthy
user: ${MATLAB_UID}:${MATLAB_GID}
working_dir: /src
command: >
/bin/bash -c "
matlab -nodisplay -r \"\
res=run(tests.Main);\
disp(res);\
if all([res.Passed]) exit, else exit(1), end;\
\";
"
working_dir: /main
command:
- /bin/bash
- -c
- |
matlab -nodisplay -r "
websave([tempdir 'GHToolbox.mltbx'],\
['https://github.com/datajoint/GHToolbox' \
'/releases/download/' subsref(webread(['https://api.github.com/repos' \
'/datajoint/GHToolbox' \
'/releases/latest']),\
substruct('.', 'tag_name')) \
'/GHToolbox.mltbx']);\
matlab.addons.toolbox.installToolbox([tempdir 'GHToolbox.mltbx']);\
ghtb.install('DataJoint.mltbx');\
addpath('tests');\
res=run(Main);\
disp(res);\
if all([res.Passed]) exit, else exit(1), end;\
"
mac_address: $MATLAB_HOSTID
volumes:
- .:/src
- ./tests:/main/tests
- ./DataJoint.mltbx:/main/DataJoint.mltbx
networks:
main:
Loading