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
570a6f64
Commit
570a6f64
authored
3 years ago
by
Henry Luetcke
Committed by
Adam Laskowski
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix issue in dataset download and add download to testing function
parent
2249420c
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
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
OpenBis.m
+4
-0
4 additions, 0 deletions
OpenBis.m
obi_test.m
+21
-7
21 additions, 7 deletions
obi_test.m
with
25 additions
and
7 deletions
OpenBis.m
+
4
−
0
View file @
570a6f64
...
@@ -533,6 +533,10 @@ classdef OpenBis
...
@@ -533,6 +533,10 @@ classdef OpenBis
parse
(
p
,
obj
,
dataset
,
files
,
varargin
{:});
parse
(
p
,
obj
,
dataset
,
files
,
varargin
{:});
a
=
p
.
Results
;
a
=
p
.
Results
;
% ensure that files are passed as 1-N cell array (required for
% Matlab to Python conversion)
a
.
files
=
reshape
(
a
.
files
,
1
,
numel
(
a
.
files
));
dataset
.
download
(
pyargs
(
'files'
,
a
.
files
,
'destination'
,
a
.
destination
,
'wait_until_finished'
,
a
.
wait_until_finished
,
'workers'
,
int16
(
a
.
workers
)));
dataset
.
download
(
pyargs
(
'files'
,
a
.
files
,
'destination'
,
a
.
destination
,
'wait_until_finished'
,
a
.
wait_until_finished
,
'workers'
,
int16
(
a
.
workers
)));
path_to_file
=
fullfile
(
a
.
destination
,
dataset
.
char
,
a
.
files
);
path_to_file
=
fullfile
(
a
.
destination
,
dataset
.
char
,
a
.
files
);
...
...
This diff is collapsed.
Click to expand it.
obi_test.m
+
21
−
7
View file @
570a6f64
...
@@ -84,24 +84,38 @@ catch
...
@@ -84,24 +84,38 @@ catch
rethrow
(
lasterror
)
rethrow
(
lasterror
)
end
end
% delete the dummy files
delete
(
file1
);
delete
(
file2
);
%% 6. Download the created dataset
%% 6. Download the created dataset
try
files
=
obi
.
get_dataset_files
(
dataset
);
file_list
=
files
.
pathInDataSet
(
files
.
fileSize
>
0
);
destination
=
sprintf
(
'temp_%d%d%d%d%d'
,
randi
(
9
,
1
,
5
));
path_to_files
=
obi
.
dataset_download
(
dataset
,
file_list
,
'destination'
,
destination
,
...
'wait_until_finished'
,
true
);
fprintf
(
'\n%s - Successfully downloaded Dataset with permId %s to folder %s\n'
,
...
datestr
(
clock
,
31
),
char
(
dataset
.
permId
),
destination
)
catch
disp
(
'Could not download dataset'
)
rethrow
(
lasterror
)
end
%% 7. Tear-down (delete everything, optional)
%% 7. Tear-down (delete everything, optional)
if
teardown
if
teardown
fprintf
(
'\n\n%s - Starting tear-down'
,
datestr
(
clock
,
31
))
fprintf
(
'\n\n%s - Starting tear-down'
,
datestr
(
clock
,
31
))
% delete experiment
% delete the created local files
delete
(
file1
);
delete
(
file2
);
rmdir
(
destination
,
's'
);
fprintf
(
'\n%s - Successfully deleted local files\n'
,
datestr
(
clock
,
31
))
% delete openBIS experiment
obi
.
delete_experiment
(
exp
,
'created by Matlab-openBIS toolbox test function'
);
obi
.
delete_experiment
(
exp
,
'created by Matlab-openBIS toolbox test function'
);
fprintf
(
'\n%s - Successfully deleted Experiment %s\n'
,
datestr
(
clock
,
31
),
exp_name
)
fprintf
(
'\n%s - Successfully deleted Experiment %s\n'
,
datestr
(
clock
,
31
),
exp_name
)
% delete project
% delete openBIS project
obi
.
delete_project
(
project_name
,
'created by Matlab-openBIS toolbox test function'
);
obi
.
delete_project
(
project_name
,
'created by Matlab-openBIS toolbox test function'
);
fprintf
(
'\n%s - Successfully deleted Project %s\n'
,
datestr
(
clock
,
31
),
project_name
)
fprintf
(
'\n%s - Successfully deleted Project %s\n'
,
datestr
(
clock
,
31
),
project_name
)
% delete space
% delete openBIS space
obi
.
delete_space
(
space
,
'created by Matlab-openBIS toolbox test function'
);
obi
.
delete_space
(
space
,
'created by Matlab-openBIS toolbox test function'
);
fprintf
(
'\n%s - Successfully deleted Space %s\n'
,
datestr
(
clock
,
31
),
space_name
)
fprintf
(
'\n%s - Successfully deleted Space %s\n'
,
datestr
(
clock
,
31
),
space_name
)
end
end
...
...
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