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
Commits
774ecef2
Commit
774ecef2
authored
3 years ago
by
Lemmer, Jan
Browse files
Options
Downloads
Patches
Plain Diff
Use Export Path from config file
parent
83fcb8ff
No related branches found
No related tags found
2 merge requests
!43
Implements #73, cleans up example file,
,
!36
Resolve "Initialise: Angabe des Ordners ohne Effekt"
Pipeline
#592863
passed
3 years ago
Stage: Run
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
+PlotID/@config/config.m
+5
-1
5 additions, 1 deletion
+PlotID/@config/config.m
+PlotID/@config/wizard.m
+1
-1
1 addition, 1 deletion
+PlotID/@config/wizard.m
+PlotID/Publish.m
+17
-5
17 additions, 5 deletions
+PlotID/Publish.m
with
23 additions
and
7 deletions
+PlotID/@config/config.m
+
5
−
1
View file @
774ecef2
...
...
@@ -12,6 +12,7 @@ classdef config < handle
properties
(
SetAccess
=
protected
)
configData
configFileName
exportPath
=
''
end
methods
...
...
@@ -23,7 +24,10 @@ classdef config < handle
txt
=
fileread
(
obj
.
configFileName
);
obj
.
configData
=
jsondecode
(
txt
);
assert
(
checkConfig
(
obj
));
if
isfield
(
obj
.
configData
,
'ExportPath'
)
obj
.
exportPath
=
obj
.
configData
.
ExportPath
;
obj
.
configData
.
options
.
Location
=
'exportPath'
;
end
catch
msg
=
[
'no valid config File with the filename '
,
...
obj
.
configFileName
,
' found.'
newline
,
...
...
...
This diff is collapsed.
Click to expand it.
+PlotID/@config/wizard.m
+
1
−
1
View file @
774ecef2
...
...
@@ -15,7 +15,7 @@ switch mode
m
=
input
(
'Do you want to add an export path? Y/N [Y]:'
,
's'
);
if
ismember
(
m
,{
'Y'
,
'y'
})
config
.
Server
Path
=
uigetdir
();
config
.
Export
Path
=
uigetdir
();
end
otherwise
error
(
'wizard mode undefined in CLASS config'
);
...
...
This diff is collapsed.
Click to expand it.
+PlotID/Publish.m
+
17
−
5
View file @
774ecef2
...
...
@@ -74,9 +74,13 @@ end
%% read config file
% there is only one config Object (handleClass)
configObj
=
PlotID
.
config
(
options
.
ConfigFileName
);
% add user options
if
isfield
(
configObj
.
configData
,
'options'
)
% is working but prune to user errors
options
=
configObj
.
configData
.
options
;
fldnames
=
fieldnames
(
configObj
.
configData
.
options
);
for
ii
=
1
:
numel
(
fldnames
)
field
=
fldnames
{
ii
};
options
.
(
field
)
=
configObj
.
configData
.
options
.
(
field
);
end
end
% Error and MSG handeling
...
...
@@ -92,14 +96,22 @@ switch options.Location
% use the script path as export path
scriptLocation
=
fileparts
(
scriptPath
);
storPath
=
fullfile
(
scriptLocation
,
options
.
ParentFolder
);
end
case
'exportPath'
%legacy
if
isfolder
(
configObj
.
exportPath
)
storPath
=
configObj
.
exportPath
;
else
msg
=
[
'Your Export folder '
,
storPath
,
newline
,
...
'does not exist - publishing not possible'
];
dlgObj
.
error
(
msg
);
end
case
'server'
%
from config File
case
'server'
%
legacy
if
dlgObj
.
configError
msg
=
[
'Error while reading the config file'
newline
,
...
' publishing on server not possible'
];
dlgObj
.
error
(
msg
);
end
storPath
=
config
.
ServerPath
;
storPath
=
config
Obj
.
configData
.
ServerPath
;
case
'manual'
%UI
storPath
=
uigetdir
();
case
'CI-Test'
...
...
@@ -258,7 +270,7 @@ if dlgObj.success || options.ForcePublish
end
if
status
disp
([
'publishing of '
,
ID
,
' done'
]);
%always displayed onsucess
disp
([
'publishing of '
,
ID
,
'
to '
,
newPath
,
'
done'
]);
%always displayed onsucess
else
% publish was not sucessfull!
%replace with error from userDLG Class
dlgObj
.
error
([
'publishing of '
,
ID
,
' failed'
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment