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
!11
Add Toolbox Information to config implements
#33
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add Toolbox Information to config implements
#33
dev/DocForPreRelease
into
development
Overview
0
Commits
2
Pipelines
1
Changes
4
Merged
Lemmer, Jan
requested to merge
dev/DocForPreRelease
into
development
3 years ago
Overview
0
Commits
2
Pipelines
1
Changes
4
Expand
Add additional Meta Data to config.json Add behaviour when config.json is missing
0
0
Merge request reports
Compare
development
development (base)
and
latest version
latest version
4a7b9ebe
2 commits,
3 years ago
4 files
+
49
−
37
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
+
28
−
17
Options
@@ -69,27 +69,12 @@ else
end
disp
([
'publishing of '
,
ID
,
' started'
]);
%% Create a Copy of the script
, config
and user functions(optional)
%% Create a Copy of the script and user functions(optional)
% script
PlotID
.
createFileCopy
({[
DataPaths
.
script
,
'.m'
]},
folderName
,
storPath
,
ID
,
'script'
);
% config
[
fList
,
pList
]
=
matlab
.
codetools
.
requiredFilesAndProducts
(
DataPaths
.
script
);
if
~
configError
%config File must exist
% copy config file
configPath
=
PlotID
.
createFileCopy
(
'config.json'
,
folderName
,
...
storPath
,
ID
,
'data'
);
% add Metadata
config
.
MatlabVersion
=
version
;
% TODO Add Toolboxes
%write config
fid
=
fopen
(
char
(
configPath
),
'w'
);
txt
=
jsonencode
(
config
,
'PrettyPrint'
,
true
);
fprintf
(
fid
,
txt
);
fclose
(
fid
);
end
% user functions
[
fList
,
pList
]
=
matlab
.
codetools
.
requiredFilesAndProducts
(
DataPaths
.
script
);
if
options
.
CopyUserFCN
fList
=
fList
(
~
ismember
(
fList
,[
DataPaths
.
script
,
'.m'
]));
% rmv script from list
fList
=
fList
(
~
contains
(
fList
,
'config.json'
));
% rmv config.json from list
@@ -146,6 +131,32 @@ switch options.Method
% Create a copy of the research data
PlotID
.
createFileCopy
(
DataPaths
.
rdata
,
folderName
,
storPath
,
ID
,
'data'
);
end
%% Write Config File
if
~
configError
%config File must exist
% copy config file
configPath
=
PlotID
.
createFileCopy
(
'config.json'
,
folderName
,
...
storPath
,
ID
,
'data'
);
else
configPath
=
fullpath
(
storPath
,
folderName
,
'config.json'
);
config
=
struct
();
if
ispc
config
.
author
=
getenv
(
'USERNAME'
);
end
end
% add further Metadata
config
.
ProjectID
=
ID
;
config
.
CreationDate
=
datestr
(
now
);
config
.
MatlabVersion
=
version
;
config
.
ToolboxVersions
=
pList
;
%write config
fid
=
fopen
(
char
(
configPath
),
'w'
);
txt
=
jsonencode
(
config
,
'PrettyPrint'
,
true
);
fprintf
(
fid
,
txt
);
fclose
(
fid
);
%% Export the Plot
try
PlotName
=
[
ID
,
'_plot'
];
% plotname
Loading