Skip to content
Snippets Groups Projects
Commit c5b966d6 authored by Geneviève Boucher's avatar Geneviève Boucher Committed by Albert Feghaly
Browse files

Updating the get_datafiles_list use to avoid having the deprecated message

Adding print statement when dataset id and datafile id is submitted
Mini change to print statement
parent eeb31589
No related branches found
No related tags found
1 merge request!20Resolve "Download datafile directly without asking for dataset ID"
...@@ -103,7 +103,7 @@ class Client: ...@@ -103,7 +103,7 @@ class Client:
except: except:
self.datafiles = None self.datafiles = None
sys.stderr.write( sys.stderr.write(
'get_available_datafiles() method is not ' + 'WARNING: get_available_datafiles() method is not ' +
'implemented in api/v1 of IRIC-Data\n' 'implemented in api/v1 of IRIC-Data\n'
) )
......
...@@ -32,6 +32,10 @@ def main(): ...@@ -32,6 +32,10 @@ def main():
dsid = args['dataset_id'] dsid = args['dataset_id']
dfid = args['datafile_id'] dfid = args['datafile_id']
if dfid and dsid:
print("You've submitted a datafile id and a dataset id")
print("Dataset ID will be ignored")
if dfid: if dfid:
print('Datafile ID: OK') print('Datafile ID: OK')
else: else:
...@@ -45,7 +49,7 @@ def main(): ...@@ -45,7 +49,7 @@ def main():
print('No dataset for user %s' % args['username']) print('No dataset for user %s' % args['username'])
return return
df = client.get_dataset_filelist(dsid) df = client.get_datafiles_list(dataset_id=dsid)
if not df.empty: if not df.empty:
print(df) print(df)
print('Download datafile using ID or complete dataset using "all"') print('Download datafile using ID or complete dataset using "all"')
...@@ -88,7 +92,7 @@ def main(): ...@@ -88,7 +92,7 @@ def main():
print(client.labs) print(client.labs)
print(client.datasets) print(client.datasets)
dsid = input('Enter dataset ID: ') dsid = input('Enter dataset ID: ')
df = client.get_dataset_filelist(dsid) df = client.get_datafiles_list(dataset_id=dsid)
if not df.empty: if not df.empty:
print(df) print(df)
file_id = input('Enter file ID: ') file_id = input('Enter file ID: ')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment