tested and added note to reflect that tar.gz needs to be made into a cmd line option
This commit is contained in:
parent
2b6ffec100
commit
26fe956d47
1 changed files with 2 additions and 1 deletions
|
@ -82,6 +82,7 @@ def get_results(url_file, host_url, output_dir, outfile_suffix):
|
||||||
out_filename = dynamut_results_dir + '/dynamut_output_' + outfile_suffix + '.csv'
|
out_filename = dynamut_results_dir + '/dynamut_output_' + outfile_suffix + '.csv'
|
||||||
dynamut_results_out_df.to_csv(out_filename, index = False)
|
dynamut_results_out_df.to_csv(out_filename, index = False)
|
||||||
|
|
||||||
|
# TODO: add as a cmd option
|
||||||
# Download .tar.gz file
|
# Download .tar.gz file
|
||||||
prediction_number = re.search(r'([0-9]+$)', line).group(0)
|
prediction_number = re.search(r'([0-9]+$)', line).group(0)
|
||||||
tgz_url = f"{host_url}/dynamut/results_file/results_" + prediction_number + '.tar.gz'
|
tgz_url = f"{host_url}/dynamut/results_file/results_" + prediction_number + '.tar.gz'
|
||||||
|
@ -89,7 +90,7 @@ def get_results(url_file, host_url, output_dir, outfile_suffix):
|
||||||
response_tgz = requests.get(tgz_url, stream = True)
|
response_tgz = requests.get(tgz_url, stream = True)
|
||||||
if response_tgz.status_code == 200:
|
if response_tgz.status_code == 200:
|
||||||
print('\nDownloading tar.gz file:', tgz_url
|
print('\nDownloading tar.gz file:', tgz_url
|
||||||
, '\nSaving file as:', tgz_filename)
|
, '\n\nSaving file as:', tgz_filename)
|
||||||
with open(tgz_filename, 'wb') as f:
|
with open(tgz_filename, 'wb') as f:
|
||||||
f.write(response_tgz.raw.read())
|
f.write(response_tgz.raw.read())
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue