Commit 12892495 authored by Odair M.'s avatar Odair M. Committed by Bruno Meyer

adega#140: Resolve "Build cache disciplina"

parent a1f0ab6f
......@@ -246,7 +246,7 @@ class Course(Analysis):
self.analysis["coursed_count"] = course_dict
def build_courses(self):
def build_general_course(self):
"""
Cria o dicionario para o json chamado 'disciplina.json'
"""
......
......@@ -2,7 +2,7 @@ from script.utils.utils import *
from script.utils.situations import *
from script.analysis.degree_analysis import *
from script.analysis.student_analysis import *
from script.analysis.course_analysis import *
from script.analysis.course_analysis import Course
from script.analysis.admission_analysis import *
from script.analysis.cepe9615 import *
......@@ -127,9 +127,9 @@ def generate_admission_data(path,df):
listagem = []
analises = [
("ira", media_ira_turma_ingresso(df)),
("std", desvio_padrao_turma_ingresso(df)),
("ira_per_semester", admission_class_ira_per_semester(df)),
("ira", media_ira_turma_ingresso(df)),
("std", desvio_padrao_turma_ingresso(df)),
("ira_per_semester", admission_class_ira_per_semester(df)),
]
# cria um dicionario com as analises para cada turma
......@@ -159,22 +159,13 @@ def generate_admission_data(path,df):
def generate_admission_list(path,df):
pass
def generate_course_data(path,df):
lista_disciplinas = {}
informacoes_gerais(df,lista_disciplinas)
analises_gerais(df,lista_disciplinas)
analises_semestrais(df,lista_disciplinas)
for disciplina in lista_disciplinas.keys():
save_json(path+disciplina+'.json',lista_disciplinas[disciplina])
disciplinas = listagem_disciplina(df,lista_disciplinas)
save_json(path+'disciplinas.json',disciplinas)
def generate_cepe_data(path, df):
others_dict = {}
pass
others_dict["alunos_reprovacoes_na_mesma_disciplina"] = student_three_fails_subject(df)
save_json(path+"cepe9615.json", others_dict)
\ No newline at end of file
def generate_course_data(path, df):
course = Course(df)
course.build_analysis()
courses = course.build_general_course()
save_json(path+"disciplinas.json", courses)
course_list = course.build_course()
for i in course_list:
save_json(path+i["disciplina_codigo"]+".json", i)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment