Skip to content

Commit

Permalink
fix CI bug - attempt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Feb 8, 2021
1 parent 7989172 commit d94eb5a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
10 changes: 5 additions & 5 deletions +bids/+internal/append_to_layout.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,19 @@
% the following loop could probably be improved with some cellfun magic
% cellfun(@(x, y) any(strcmp(x,y)), {p.type}, suffix_groups)
for i = 1:size(schema.datatypes.(modality), 1)

this_suffix_group = schema.datatypes.(modality)(i);

% for CI
if iscell(this_suffix_group)
this_suffix_group = this_suffix_group{1};
this_suffix_group = this_suffix_group{1};
end

if any(strcmp(suffix, this_suffix_group.suffixes))
idx = i;
break
end

end

if isempty(idx)
Expand Down
5 changes: 5 additions & 0 deletions +bids/+internal/return_modality_extensions.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

extensions = '(';

% for CI
if iscell(modality)
modality = modality{1};
end

for iExt = 1:numel(modality.extensions)
if ~strcmp(modality.extensions{iExt}, '.json')
extensions = [extensions, modality.extensions{iExt}, '|']; %#ok<AGROW>
Expand Down
6 changes: 3 additions & 3 deletions +bids/+internal/return_modality_suffixes.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function suffixes = return_modality_suffixes(modality)

suffixes = '_(';
% For CI

% For CI
if iscell(modality)
modality = modality{1};
modality = modality{1};
end

for iExt = 1:numel(modality(:).suffixes)
Expand Down
5 changes: 5 additions & 0 deletions +bids/+schema/return_modality_entities.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
function entities = return_modality_entities(suffix_group, schema)

% for CI
if iscell(suffix_group)
suffix_group = suffix_group{1};
end

entity_names = fieldnames(suffix_group.entities);

for i = 1:size(entity_names, 1)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_load_schema.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
initTestSuite;
end

function test_load_schema_basic()
function test_load_schema_path()

use_schema = fullfile(fileparts(mfilename('fullpath')), 'schema');

Expand Down

0 comments on commit d94eb5a

Please sign in to comment.