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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
plotID
plotID_matlab
Commits
feaa7112
Commit
feaa7112
authored
3 years ago
by
Lemmer, Jan
Browse files
Options
Downloads
Patches
Plain Diff
Correct a Bug, Closes
#63
parent
a60b1310
No related branches found
No related tags found
3 merge requests
!30
Fix CI
,
!25
Development
,
!24
Correct a Bug, Closes #63
Pipeline
#582140
passed
3 years ago
Stage: Run
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
+PlotID/@userDLG/userDLG.m
+1
-1
1 addition, 1 deletion
+PlotID/@userDLG/userDLG.m
+PlotID/Publish.m
+12
-9
12 additions, 9 deletions
+PlotID/Publish.m
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
with
14 additions
and
10 deletions
+PlotID/@userDLG/userDLG.m
+
1
−
1
View file @
feaa7112
...
@@ -51,7 +51,7 @@ classdef userDLG
...
@@ -51,7 +51,7 @@ classdef userDLG
end
end
end
end
function
[]
=
error
(
message
)
function
[]
=
error
(
obj
,
message
)
%error handles critical errors
%error handles critical errors
% critical errors will always result in a matlab error
% critical errors will always result in a matlab error
...
...
This diff is collapsed.
Click to expand it.
+PlotID/Publish.m
+
12
−
9
View file @
feaa7112
...
@@ -24,6 +24,7 @@ arguments
...
@@ -24,6 +24,7 @@ arguments
options
.
Location
{
mustBeMember
(
options
.
Location
,{
'local'
,
'server'
,
'manual'
,
'CI-Test'
})}
=
'local'
% storage path
options
.
Location
{
mustBeMember
(
options
.
Location
,{
'local'
,
'server'
,
'manual'
,
'CI-Test'
})}
=
'local'
% storage path
options
.
Method
{
mustBeMember
(
options
.
Method
,{
'individual'
,
'centralized'
})}
=
'individual'
options
.
Method
{
mustBeMember
(
options
.
Method
,{
'individual'
,
'centralized'
})}
=
'individual'
options
.
ParentFolder
(
1
,:)
{
mustBeText
}
=
'export'
options
.
ParentFolder
(
1
,:)
{
mustBeText
}
=
'export'
options
.
ConfigFileName
(
1
,:)
{
mustBeText
}
=
'config.json'
%individual config names possible
options
.
CopyUserFCN
(
1
,
1
)
{
mustBeNumericOrLogical
}
=
true
options
.
CopyUserFCN
(
1
,
1
)
{
mustBeNumericOrLogical
}
=
true
options
.
CSV
(
1
,
1
)
{
mustBeNumericOrLogical
}
=
false
options
.
CSV
(
1
,
1
)
{
mustBeNumericOrLogical
}
=
false
options
.
ShowMessages
(
1
,
1
)
{
mustBeNumericOrLogical
}
=
true
options
.
ShowMessages
(
1
,
1
)
{
mustBeNumericOrLogical
}
=
true
...
@@ -42,8 +43,8 @@ if numel(figure) > 1
...
@@ -42,8 +43,8 @@ if numel(figure) > 1
end
end
%get ID from Figure
%get ID from Figure
ID
=
figure
.
Tag
;
ID
=
figure
.
Tag
;
if
isempty
(
ID
)
if
isempty
(
ID
)
% no ID found, User dialog for Folder name
% no ID found, User dialog for Folder name
ID
=
inputdlg
([
'No ID defined- '
newline
,
...
ID
=
inputdlg
([
'No ID defined- '
newline
,
...
...
@@ -54,8 +55,8 @@ if isempty(ID)
...
@@ -54,8 +55,8 @@ if isempty(ID)
warning
(
msg
);
warning
(
msg
);
end
end
dlgObj
=
PlotID
.
userDLG
(
ID
,
options
);
% Error and MSG handeling
% Error and MSG handeling
dlgObj
=
PlotID
.
userDLG
(
ID
,
options
);
%% read config file
%% read config file
try
try
...
@@ -63,9 +64,6 @@ try
...
@@ -63,9 +64,6 @@ try
config
=
jsondecode
(
txt
);
config
=
jsondecode
(
txt
);
catch
catch
dlgObj
.
configError
=
true
;
dlgObj
.
configError
=
true
;
msg
=
[
'Error while reading the config file'
newline
,
...
' publishing on server not possible'
];
dlgObj
.
softError
(
msg
);
end
end
%% storage location
%% storage location
...
@@ -79,6 +77,11 @@ switch options.Location
...
@@ -79,6 +77,11 @@ switch options.Location
storPath
=
fullfile
(
scriptLocation
,
options
.
ParentFolder
);
storPath
=
fullfile
(
scriptLocation
,
options
.
ParentFolder
);
end
end
case
'server'
%from config File
case
'server'
%from config File
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
.
ServerPath
;
case
'manual'
%UI
case
'manual'
%UI
storPath
=
uigetdir
();
storPath
=
uigetdir
();
...
@@ -88,7 +91,7 @@ end
...
@@ -88,7 +91,7 @@ end
folderName
=
[
'.'
,
char
(
ID
)];
%hidden folder
folderName
=
[
'.'
,
char
(
ID
)];
%hidden folder
%% Create
D
ata
-D
irectory
%% Create
d
ata
d
irectory
if
isfolder
(
fullfile
(
storPath
,
folderName
))
if
isfolder
(
fullfile
(
storPath
,
folderName
))
dlgObj
.
error
([
'Folder '
,
folderName
,
' exists - Plot was already published '
]);
dlgObj
.
error
([
'Folder '
,
folderName
,
' exists - Plot was already published '
]);
elseif
mkdir
(
fullfile
(
storPath
,
folderName
))
elseif
mkdir
(
fullfile
(
storPath
,
folderName
))
...
@@ -97,7 +100,7 @@ else
...
@@ -97,7 +100,7 @@ else
end
end
disp
([
'publishing of '
,
ID
,
' started'
]);
disp
([
'publishing of '
,
ID
,
' started'
]);
%% Create a
C
opy of the script and user functions(optional)
%% Create a
c
opy of the script and user functions(optional)
% script
% script
[
~
,
status
,
msg
]
=
PlotID
.
createFileCopy
({
scriptPath
},
folderName
,
storPath
,
ID
,
'script'
);
[
~
,
status
,
msg
]
=
PlotID
.
createFileCopy
({
scriptPath
},
folderName
,
storPath
,
ID
,
'script'
);
dlgObj
.
scriptPublished
=
status
;
dlgObj
.
scriptPublished
=
status
;
...
...
This diff is collapsed.
Click to expand it.
.gitignore
+
1
−
0
View file @
feaa7112
...
@@ -37,6 +37,7 @@ testdata_2.h5
...
@@ -37,6 +37,7 @@ testdata_2.h5
testdata2.h5
testdata2.h5
test_data.mat
test_data.mat
export/*
export/*
unused*/*
# Octave session info
# Octave session info
octave-workspace
octave-workspace
...
...
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