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
!58
Change search path for config files
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Change search path for config files
95-location-config-file
into
development
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Lemmer, Jan
requested to merge
95-location-config-file
into
development
3 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
config files in the plotID folder will be prefered
Closes
#95 (closed)
0
0
Merge request reports
Compare
development
development (base)
and
latest version
latest version
f33473fc
1 commit,
3 years ago
1 file
+
11
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
+PlotID/@config/config.m
+
11
−
3
Options
@@ -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'
];
Loading