Skip to content
Snippets Groups Projects
Commit 8a0004f5 authored by DIANE's avatar DIANE
Browse files

download

parent f25a975c
No related branches found
No related tags found
No related merge requests found
...@@ -589,19 +589,7 @@ if labels: ...@@ -589,19 +589,7 @@ if labels:
sam = sam1 sam = sam1
sel.write(sam) sel.write(sam)
Nb_ech = str(n_samples)
nb_clu = str(sam1.shape[0])
for i in ['Representative subset selection', data_file.name, dim_red_method,
clus_method, Nb_ech, ncluster, selection, selection_number, nb_clu]:
st.write(i)
# st.write(hash_data(change = './Report/report.tex'))
# file_pathtex = Path('./Report/report.tex')
# if file_pathtex.is_file():
# with open('./Report/report.tex') as myfile:
# filehash = hash_data(myfile.read())
# figs_list = os.listdir("./Report/figures")
if not (sam.empty and sam1.empty): if not (sam.empty and sam1.empty):
Nb_ech = str(n_samples) Nb_ech = str(n_samples)
nb_clu = str(sam1.shape[0]) nb_clu = str(sam1.shape[0])
...@@ -620,21 +608,12 @@ if not (sam.empty and sam1.empty): ...@@ -620,21 +608,12 @@ if not (sam.empty and sam1.empty):
file_path = Path("./temp/"+zipname) file_path = Path("./temp/"+zipname)
sam.to_csv("./"+zipname,sep = ';', sam.to_csv("./"+zipname,sep = ';',
encoding='utf-8', mode='a', encoding='utf-8', mode='a',
compression=dict(method='zip',archive_name=f"selected subset for reference analysis_{userfilename}_{date_time}_.csv")) compression=dict(method='zip',archive_name=f"selected subset for reference analysis_{userfilename}{date_time}.csv"))
with zipfile.ZipFile("./"+zipname, 'a') as newzip: with zipfile.ZipFile("./"+zipname, 'a') as newzip:
newzip.write("./Report/report.pdf", arcname="report.pdf") newzip.write("./Report/report.pdf", arcname="report.pdf")
newzip.write("./Report/datasets/"+os.listdir("./Report/datasets")[0], arcname=os.listdir("./Report/datasets")[0]) newzip.write("./Report/datasets/"+os.listdir("./Report/datasets")[0], arcname=os.listdir("./Report/datasets")[0])
# #### add data to zip
# match data_file.name:
# case 'csv':
# with open(data_file.name, 'wb') as cs:
# st.write(data_file.getbuffer())
# case 'dx':
# st.write(4)
### move the .zip file to the temp directory ### move the .zip file to the temp directory
shutil.move('./'+zipname,'./temp/'+ zipname) shutil.move('./'+zipname,'./temp/'+ zipname)
......
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