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
!62
Introduce changes for V1.0 RC 1
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Introduce changes for V1.0 RC 1
development
into
master
Overview
0
Commits
33
Pipelines
1
Changes
23
Merged
Lemmer, Jan
requested to merge
development
into
master
3 years ago
Overview
0
Commits
33
Pipelines
1
Changes
23
Expand
For details see changelog and commit messages
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
fb919d71
33 commits,
3 years ago
23 files
+
495
−
192
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
23
Search (e.g. *.vue) (Ctrl+P)
+PlotID/@config/config.m
+
14
−
6
Options
classdef
config
<
handle
%CONFIG class handles methods and attributes related to the config
%
CONFIG class handles methods and attributes related to the config
%file
%handle class used for dynamicy property updates
%
handle class used for dynamicy property updates
properties
(
SetAccess
=
private
)
mandatoryFields
=
{
'Author'
,
'ProjectID'
}
@@ -21,15 +21,23 @@ classdef config < handle
% reads config data from config file, if an error occurs the
% wizard is started by the catch block
obj
.
configFileName
=
configFileName
;
try
txt
=
fileread
(
obj
.
configFileName
);
try
%Validity Check
tmp
=
what
(
"PlotID"
);
tmp
=
strrep
(
tmp
.
path
,
'+PlotID'
,
''
);
defaultConfigPath
=
fullfile
(
tmp
,
obj
.
configFileName
);
if
isfile
(
defaultConfigPath
)
txt
=
fileread
(
defaultConfigPath
);
else
%search on path
txt
=
fileread
(
obj
.
configFileName
);
end
obj
.
configData
=
jsondecode
(
txt
);
assert
(
checkConfig
(
obj
));
if
isfield
(
obj
.
configData
,
'ExportPath'
)
obj
.
exportPath
=
obj
.
configData
.
ExportPath
;
obj
.
configData
.
options
.
Location
=
'exportPath'
;
end
catch
catch
msg
=
[
'no valid config File with the filename '
,
...
obj
.
configFileName
,
' found.'
newline
,
...
'Please enter the required information manually'
];
@@ -45,7 +53,7 @@ classdef config < handle
function
outputArg
=
checkConfig
(
obj
)
%checkConfig validates the config file
% 1.
C
heck if mandatory
F
ields are set
% 1.
c
heck if mandatory
f
ields are set
check
=
isfield
(
obj
.
configData
,
obj
.
mandatoryFields
);
outputArg
=
all
(
check
);
Loading