Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
2249420c
Commit
2249420c
authored
3 years ago
by
Henry Luetcke
Committed by
Adam Laskowski
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
testing function: add dataset upload
parent
14826973
No related branches found
No related tags found
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
obi_test.m
+26
-0
26 additions, 0 deletions
obi_test.m
with
26 additions
and
0 deletions
obi_test.m
+
26
−
0
View file @
2249420c
...
...
@@ -61,6 +61,32 @@ catch
end
%% 5. Create dataset with dummy files
% first create the dummy files
file1
=
sprintf
(
'test_%d%d%d%d%d.txt'
,
randi
(
9
,
1
,
5
));
file2
=
sprintf
(
'test_%d%d%d%d%d.txt'
,
randi
(
9
,
1
,
5
));
function
create_file
(
fname
)
fid
=
fopen
(
fname
,
'w+'
);
fprintf
(
fid
,
'Hello world!'
);
fclose
(
fid
);
end
create_file
(
file1
);
create_file
(
file2
);
% then create the dataset in the TESTING_EXPERIMENT
dataset_type
=
'RAW_DATA'
;
dataset_object
=
sprintf
(
'/%s/%s/%s'
,
space_name
,
project_name
,
exp_name
);
file_list
=
{
file1
,
file2
};
try
dataset
=
obi
.
new_dataset
(
dataset_type
,
dataset_object
,
file_list
);
fprintf
(
'\n%s - Successfully created new Dataset with permId %s\n'
,
datestr
(
clock
,
31
),
char
(
dataset
.
permId
))
catch
disp
(
'Could not create new dataset'
)
rethrow
(
lasterror
)
end
% delete the dummy files
delete
(
file1
);
delete
(
file2
);
%% 6. Download the created dataset
...
...
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