Skip to content

Commit 9f19fce

Browse files
arrumando report
1 parent 9ee007e commit 9f19fce

1 file changed

Lines changed: 24 additions & 19 deletions

File tree

apps/cli.py

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,25 +87,30 @@ def realiza_report(outpath, arquivo_json, txt, nomearquivo, tipo, automatico, cr
8787
novos_casos =[]
8888
with open(arq_json_exemplo, "r") as file:
8989
dados = json.load(file)
90-
for item in os.listdir(current_directory):
91-
if(item != "resultados" and item != "report"):
92-
item_path = os.path.join(current_directory, item)
93-
if os.path.isdir(item_path):
94-
if(os.path.exists(item_path+"/sintese")):
95-
caminho = item_path
96-
nome = item
97-
cor = cores[contador]
98-
modelo = pd.read_parquet(item_path+"/sintese/PROGRAMA.parquet", engine='pyarrow')["programa"].iloc[0]
99-
contador += 1
100-
novo_caso = {"nome":nome,
101-
"caminho":caminho,
102-
"cor":cor,
103-
"modelo":modelo}
104-
novos_casos.append(novo_caso)
105-
novo_conjunto = {"nome_conj":"",
106-
"cor_conj":"",
107-
"casos":novos_casos}
108-
dados["conjuntos"] = [novo_conjunto]
90+
91+
if(os.path.exists("dger.dat")):
92+
print("ENTROU AQUI")
93+
else:
94+
95+
for item in os.listdir(current_directory):
96+
if(item != "resultados" and item != "report"):
97+
item_path = os.path.join(current_directory, item)
98+
if os.path.isdir(item_path):
99+
if(os.path.exists(item_path+"/sintese")):
100+
caminho = item_path
101+
nome = item
102+
cor = cores[contador]
103+
modelo = pd.read_parquet(item_path+"/sintese/PROGRAMA.parquet", engine='pyarrow')["programa"].iloc[0]
104+
contador += 1
105+
novo_caso = {"nome":nome,
106+
"caminho":caminho,
107+
"cor":cor,
108+
"modelo":modelo}
109+
novos_casos.append(novo_caso)
110+
novo_conjunto = {"nome_conj":"",
111+
"cor_conj":"",
112+
"casos":novos_casos}
113+
dados["conjuntos"] = [novo_conjunto]
109114
with open("exemplo_conj.json", 'w') as file:
110115
json.dump(dados, file, indent=4) # Write the updated dictionary back to the JSON file with indentation for readability
111116
arquivo_json = "exemplo_conj.json"

0 commit comments

Comments
 (0)