Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
plotID_matlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
plotID
plotID_matlab
Merge requests
!7
Merge general Fixes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Merge general Fixes
dev/generalFixes
into
development
Overview
0
Commits
1
Pipelines
0
Changes
4
Merged
Lemmer, Jan
requested to merge
dev/generalFixes
into
development
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
4
Expand
Fixed a Bug that no linked hdfs were created in the first folder, remove some hard coding
0
0
Merge request reports
Compare
development
development (base)
and
latest version
latest version
e16219c0
1 commit,
3 years ago
4 files
+
35
−
18
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
+PlotID/Publish.m
+
23
−
12
Options
@@ -76,15 +76,20 @@ end
%% Research data handeling
switch
options
.
Method
case
'centralized'
DataFolderName
=
'data'
;
% check if data folder exists
if
~
isfolder
(
fullfile
(
storPath
,
'd
ata
'
))
mkdir
(
fullfile
(
storPath
,
'd
ata
'
));
if
~
isfolder
(
fullfile
(
storPath
,
D
ata
FolderName
))
mkdir
(
fullfile
(
storPath
,
D
ata
FolderName
));
end
% to get relative Paths
currentPath
=
fullfile
(
storPath
);
%list all files
fList
=
dir
(
fullfile
(
storPath
,
'data'
,
'**\*.*'
));
%get list of files and folders in any subfolder
fList
=
dir
(
fullfile
(
storPath
,
DataFolderName
,
'**\*.*'
));
%get list of files and folders in any subfolder
fList
=
fList
(
~
[
fList
.
isdir
]);
%remove folders from list
fList
=
struct2table
(
fList
);
% Check if the new plot is based on the original data-set
% copy the data(once)
for
i
=
1
:
numel
(
DataPaths
.
rdata
)
@@ -92,20 +97,26 @@ switch options.Method
[
~
,
idx
]
=
PlotID
.
fileCompare
(
DataPaths
.
rdata
{
i
},
fList
);
% create Linked HDF5 files for identical files
if
any
(
idx
)
sourcePath
=
fList
{
idx
,
'name'
};
% If there are multiple copies already, this only picks the last entry
fList
.
path
=
fullfile
(
fList
.
folder
,
fList
.
name
);
sourcePath
=
fList
{
idx
,
'path'
};
relativeSourcePath
=
strrep
(
sourcePath
,
currentPath
,
''
);
%WIP relative PATh!!
if
contains
(
sourcePath
,{
'.h5'
,
'.hdf5'
})
% Linking only for HDF5
PlotID
.
createLinkedHDF5
(
s
ourcePath
{
1
,
1
},
storPath
,
ID
);
PlotID
.
createLinkedHDF5
(
relativeS
ourcePath
{
1
,
1
},
storPath
,
ID
);
end
else
% no identical file exists
%Copy the file in data
PlotID
.
createFileCopy
(
DataPaths
.
rdata
{
i
},
'data'
,
storPath
,
ID
,
'dataCentral'
);
%Copy the file in data and create the links (if hdf5)
[
dataPath
]
=
PlotID
.
createFileCopy
(
DataPaths
.
rdata
{
i
},
'data'
,
storPath
,
ID
,
'dataCentral'
);
relativeDataPath
=
strrep
(
dataPath
,
currentPath
,
''
);
%WIP
%
if contains(DataPaths.rdata{i},{'.h5','.hdf5'}) % Linking only for HDF5
%
% and create linked files in the plot folder
%
PlotID.createLinkedHDF5(DataPath
s.rdata{i}
,storPath,ID);
%
end %if
if
contains
(
DataPaths
.
rdata
{
i
},{
'.h5'
,
'.hdf5'
})
% Linking only for HDF5
% and create
also
linked files in the plot folder
PlotID
.
createLinkedHDF5
(
relative
DataPath
,
storPath
,
ID
);
end
%if
end
%if
end
%for
clear
DataFolderName
case
'individual'
% Create a copy of the research data
PlotID
.
createFileCopy
(
DataPaths
.
rdata
,
folderName
,
storPath
,
ID
,
'data'
);
Loading