Skip to content

Commit

Permalink
Format whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ehennestad committed Oct 28, 2024
1 parent ab574a0 commit 3a7d1c4
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 39 deletions.
2 changes: 1 addition & 1 deletion tools/+ommtools/installMatBox.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function installFromCommit()

% Move to installation location
[~, repoFolderName] = fileparts(unzippedFolder);
%targetFolder = fullfile(userpath, "Add-Ons");
% targetFolder = fullfile(userpath, "Add-Ons");
targetFolder = fullfile(matlab.internal.addons.util.retrieveAddOnsInstallationFolder(), 'Toolboxes', 'Additional Software');
targetFolder = fullfile(targetFolder, repoFolderName);
if isfolder(targetFolder); rmdir(targetFolder, "s"); end
Expand Down
2 changes: 1 addition & 1 deletion tools/+ommtools/projectdir.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
L = dir(rootFolder);
assert(all(contains( {'code', 'tools'}, {L.name})), ...
'Expected project root directory to contain "code" and "tools" folder.');
end
end
2 changes: 1 addition & 1 deletion tools/hooks/pre_commit.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
end

try
%ommtools.stylecheckToolbox %todo...
% ommtools.stylecheckToolbox %todo...
catch %#ok<UNRCH>
failed = [failed, "stylecheck"];
end
Expand Down
2 changes: 1 addition & 1 deletion tools/tasks/packageToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function packageToolbox(releaseType, versionString)

projectRootDirectory = ommtools.projectdir();
% Not sure if this is needed:
run(fullfile(projectRootDirectory, 'code', 'startup.m'))
run(fullfile(projectRootDirectory, 'code', 'startup.m'))

% Specify toolbox path folders
toolboxPathFolders = [...
Expand Down
8 changes: 4 additions & 4 deletions tools/tests/oneOffs/organizationWithOneId.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function org = organizationWithOneId()
% organizationWithOneId - test creation of a organization with one digital ID
%
% = organizationWithOneId()
%
% Creates an example Organization object. If the procedure fails, an error is
% generated.
% o = organizationWithOneId()
%
% Creates an example Organization object. If the procedure fails, an error is
% generated.
%

ror = openminds.core.RORID('identifier','https://ror.org/01xtthb56');
Expand Down
8 changes: 4 additions & 4 deletions tools/tests/oneOffs/organizationWithTwoIds.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function org = organizationWithTwoIds()
% organizationWithTwoIds - test creation of a organization with two digital IDs
%
% o = organizationWithTwoIds()
%
% Creates an example Organization object. If the procedure fails, an error is
% generated.
% o = organizationWithTwoIds()
%
% Creates an example Organization object. If the procedure fails, an error is
% generated.
%

ror = openminds.core.RORID('identifier','https://ror.org/01xtthb56');
Expand Down
1 change: 0 additions & 1 deletion tools/tests/oneOffs/personArray.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
filePath = fullfile(openminds.internal.rootpath, "livescripts", "data", "spacecraft_crew_members.csv");
crewMembers = readtable(filePath, "TextType", "String");


contacts = dictionary;

for email = crewMembers.email'
Expand Down
5 changes: 1 addition & 4 deletions tools/tests/oneOffs/personWithOneAffiliation.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function p = personWithOneAffiliation()
% personWithOneAffiliation - test creation of a person object in openMINDS
%
%
% p = personWithOneAffiliation()
%
% Creates an example Person object. If the procedure fails, an error is
Expand All @@ -22,6 +22,3 @@
p = openminds.core.Person('familyName','Smith','givenName','John D.',...
'alternateName', "js", 'affiliation',af,'digitalIdentifier',orcid,...
'contactInformation',contact);



5 changes: 1 addition & 4 deletions tools/tests/oneOffs/personWithTwoAffiliations.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function p = personWithTwoAffiliations()
% personWithTwoAffiliations - test creation of a person object in openMINDS
%
%
% p = personWithTwoAffiliations()
%
% Creates an example Person object. If the procedure fails, an error is
Expand Down Expand Up @@ -28,6 +28,3 @@
p = openminds.core.Person('familyName','Smith','givenName','John D.',...
'affiliation',af,'digitalIdentifier',orcid,...
'contactInformation',contact);



3 changes: 1 addition & 2 deletions tools/tests/oneOffs/propertyValueListWithNestedEmbeddings.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

% Create a QuantitativeValue


stringValue = openminds.core.research.StringProperty('name', 'MyParameter', 'value', 'A');

ageUnit = openminds.controlledterms.UnitOfMeasurement('day');
Expand All @@ -17,4 +16,4 @@
pvl = openminds.core.research.PropertyValueList('propertyValuePair', {stringValue, numberValue});

disp(pvl)
end
end
4 changes: 1 addition & 3 deletions tools/tests/testDocLinks.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function result = testDocLinks()
% testDocLinks - Run test for openMINDS Read The Docs links
projectDirectory = ommtools.getProjectRootDir();
projectDirectory = ommtools.getProjectRootDir();

addpath( fullfile(projectDirectory, 'code') );
addpath( fullfile(projectDirectory, 'code', 'internal') );
Expand All @@ -12,5 +12,3 @@
testCase = testReadTheDocLinks();
result = run(testCase);
end


3 changes: 1 addition & 2 deletions tools/tests/unitTests/ControlledInstanceTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ function testGetControlledInstanceLocal(testCase, instanceSpecification, version

expectedIdUriPrefix = sprintf("%s/instances", openminds.constant.BaseURI(versionNumber));
testCase.assertTrue(contains(jsonStr.at_id, expectedIdUriPrefix));

end

function testGetControlledInstanceRemote(testCase, instanceSpecification, versionNumber)
jsonStr = openminds.internal.getControlledInstance(...
instanceSpecification{:}, versionNumber, "FileSource", "github");

expectedIdUriPrefix = sprintf("%s/instances", openminds.constant.BaseURI(versionNumber));
testCase.assertTrue(contains(jsonStr.at_id, expectedIdUriPrefix));
testCase.assertTrue(contains(jsonStr.at_id, expectedIdUriPrefix));
end
end
end
2 changes: 1 addition & 1 deletion tools/tests/unitTests/testInstanceSaveLoad.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

% Automatically generate a test case for each schema type
properties (TestParameter)
SchemaType = cellstr( enumeration('openminds.enum.Types') );
SchemaType = cellstr( enumeration('openminds.enum.Types') );
end

properties
Expand Down
16 changes: 6 additions & 10 deletions tools/tests/unitTests/testLinkedCategory.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
%
%  [ ] Test hetereogeneous linked types.
% [ ] Test multiple nested linked categories.
%  [ ] Test assigning of properties to linked categories
% [ ] Test assigning of properties to linked categories
%  
% HOMOGENEOUS


properties
% DatasetWithOnePersonAuthor - A dataset instance with a single
% author which is of type Person
Expand All @@ -20,7 +19,6 @@
DatasetWithTwoPersonAuthor
end


methods(TestClassSetup)
% Shared setup for the entire test class

Expand Down Expand Up @@ -77,9 +75,9 @@ function testRetrievePropertyOfNestedScalarHomogeneousType(testCase)
testCase.assertClass(organizationName, "string")

% Alternative: This does not work.
%thisAuthor = ds.author;
%thisOrganizationName = thisAuthor.affiliation.memberOf.fullName;
end
% thisAuthor = ds.author;
% thisOrganizationName = thisAuthor.affiliation.memberOf.fullName;
end

function testRetrievePropertyOfNestedNonScalarHomogeneousType(testCase)
% Get dataset for testing
Expand All @@ -93,7 +91,7 @@ function testRetrievePropertyOfNestedNonScalarHomogeneousType(testCase)

S = ds.author.affiliation; % Assert length of this is 3
testCase.assertLength(S, 3)
end
end

function testRetrieveNonScalarHomogeneousType(testCase)
% Test the retrieval of a linked type property which is a linked
Expand Down Expand Up @@ -155,7 +153,5 @@ function testRetreivePropertyOfScalarLinkedCategoryType(testCase)
'Failed to retrieve property from author')
end
end

end

end
end

0 comments on commit 3a7d1c4

Please sign in to comment.