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
a9315d69
Commit
a9315d69
authored
3 years ago
by
Lemmer, Jan
Browse files
Options
Downloads
Patches
Plain Diff
add a test fcn fo default settings
parent
231c563c
Branches
Branches containing commit
No related tags found
3 merge requests
!13
PreRelease_V0.1
,
!12
PreRelease_V0.1
,
!1
Add Link-replacement feature
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CI_files/default_test.m
+66
-0
66 additions, 0 deletions
CI_files/default_test.m
example.m
+1
-0
1 addition, 0 deletions
example.m
fcn_core/Publish.m
+4
-2
4 additions, 2 deletions
fcn_core/Publish.m
test_data.mat
+0
-0
0 additions, 0 deletions
test_data.mat
with
71 additions
and
2 deletions
CI_files/default_test.m
0 → 100644
+
66
−
0
View file @
a9315d69
function
[
result
]
=
default_test
()
%UNTITLED2 This is a simple test if Plot ID works for the default settings
% Detailed explanation goes here
clear
;
clc
;
close
all
;
addpath
(
'./fcn_core'
,
'./fcn_help'
);
ProjectID
=
'Test01'
;
%% Data
% some random data
x
=
linspace
(
0
,
7
);
y
=
rand
(
1
,
100
)
+
2
;
dataset1
=
'test_data.mat'
;
save
(
'CI_files/test_data.mat'
,
'x'
,
'y'
);
% some data as .h5
x1
=
linspace
(
0
,
2
*
pi
);
y1
=
sin
(
x1
)
+
2
;
% define file path & name
fpath
=
"CI_files/testdata_2.h5"
;
dataset2
=
'testdata_2.h5'
;
% create hdf5 file and dataset > write data to hdf5 file / dataset
h5create
(
fpath
,
"/x1"
,
size
(
x1
),
"Datatype"
,
class
(
x1
))
h5create
(
fpath
,
"/y1"
,
size
(
y1
),
"Datatype"
,
class
(
y1
))
h5write
(
fpath
,
"/x1"
,
x1
)
h5write
(
fpath
,
"/y1"
,
y1
)
%% Plotting
fig
(
1
)
=
figure
(
'visible'
,
'off'
);
plot
(
x
,
y
,
'-k'
);
hold
on
plot
(
x1
,
y1
,
'-r'
);
%% Tag the plot
try
[
figs
,
ID
]
=
TagPlot
(
fig
,
ProjectID
);
%% call a dummy function
a
=
1
;
a
=
example_fcn
(
a
);
%% publishing
% The functions needs the file location, the location of the data and the
% figure
path
.
script
=
mfilename
(
'fullpath'
);
% filename of the m.script
% file name of the data
path
.
rdata
=
{
dataset1
,
dataset2
}
;
% don't forget the extension
Publish
(
path
,
ID
,
figs
,
'Location'
,
'CI-Test'
)
% clean up
delete
CI_files
/
export
/
*
CI_files
/
*.
mat
CI_files
/
*.
h5
rmdir
(
'CI_files/export'
,
's'
);
result
=
true
;
clc
;
catch
result
=
false
;
warning
(
'simple_test failed'
);
end
end
This diff is collapsed.
Click to expand it.
example.m
+
1
−
0
View file @
a9315d69
% test skript
% test skript
clear
;
clc
;
close
all
;
clear
;
clc
;
close
all
;
addpath
(
'fcn_core'
,
'fcn_help'
);
addpath
(
'fcn_core'
,
'fcn_help'
);
addpath
(
'CI_files'
);
% Test scripts
try
try
delete
testdata_2
.
h5
;
delete
testdata_2
.
h5
;
...
...
This diff is collapsed.
Click to expand it.
fcn_core/Publish.m
+
4
−
2
View file @
a9315d69
...
@@ -11,7 +11,7 @@ arguments
...
@@ -11,7 +11,7 @@ arguments
DataPaths
DataPaths
ID
(
1
,:)
{
mustBeNonzeroLengthText
}
% ID must be provided
ID
(
1
,:)
{
mustBeNonzeroLengthText
}
% ID must be provided
figures
(
1
,:)
{
mustBeFigure
}
% Checks if Figures are figures
figures
(
1
,:)
{
mustBeFigure
}
% Checks if Figures are figures
options
.
Location
{
mustBeMember
(
options
.
Location
,[
'local'
,
'server'
])}
=
'local'
% storage path
options
.
Location
{
mustBeMember
(
options
.
Location
,[
'local'
,
'server'
,
'CI-Test'
])}
=
'local'
% storage path
options
.
Method
{
mustBeMember
(
options
.
Method
,[
'individual'
,
'centraliced'
])}
=
'individual'
options
.
Method
{
mustBeMember
(
options
.
Method
,[
'individual'
,
'centraliced'
])}
=
'individual'
options
.
CopyUserFCN
(
1
,
1
)
{
mustBeNumericOrLogical
}
=
true
options
.
CopyUserFCN
(
1
,
1
)
{
mustBeNumericOrLogical
}
=
true
end
end
...
@@ -20,7 +20,9 @@ switch options.Location
...
@@ -20,7 +20,9 @@ switch options.Location
case
'local'
case
'local'
storPath
=
fullfile
(
pwd
,
'export'
);
storPath
=
fullfile
(
pwd
,
'export'
);
case
'server'
case
'server'
storPath
=
'\\FST-220\Jans-50GB-SMB\Lemmer'
;
storPath
=
'\\FST-220\Jans-50GB-SMB\Lemmer'
;
case
'CI-Test'
storPath
=
fullfile
(
pwd
,
'CI_files'
,
'export'
);
end
end
folderName
=
char
(
ID
);
folderName
=
char
(
ID
);
...
...
This diff is collapsed.
Click to expand it.
test_data.mat
+
0
−
0
View file @
a9315d69
No preview for this file type
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