Commit 227351ef authored by Odair M.'s avatar Odair M. Committed by Bruno Meyer
Browse files

#140: Resolve "Build cache disciplina"

parent 72bcf6ce
...@@ -246,7 +246,7 @@ class Course(Analysis): ...@@ -246,7 +246,7 @@ class Course(Analysis):
self.analysis["coursed_count"] = course_dict self.analysis["coursed_count"] = course_dict
def build_courses(self): def build_general_course(self):
""" """
Cria o dicionario para o json chamado 'disciplina.json' Cria o dicionario para o json chamado 'disciplina.json'
""" """
......
...@@ -2,7 +2,7 @@ from script.utils.utils import * ...@@ -2,7 +2,7 @@ from script.utils.utils import *
from script.utils.situations import * from script.utils.situations import *
from script.analysis.degree_analysis import * from script.analysis.degree_analysis import *
from script.analysis.student_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.admission_analysis import *
from script.analysis.cepe9615 import * from script.analysis.cepe9615 import *
...@@ -127,9 +127,9 @@ def generate_admission_data(path,df): ...@@ -127,9 +127,9 @@ def generate_admission_data(path,df):
listagem = [] listagem = []
analises = [ analises = [
("ira", media_ira_turma_ingresso(df)), ("ira", media_ira_turma_ingresso(df)),
("std", desvio_padrao_turma_ingresso(df)), ("std", desvio_padrao_turma_ingresso(df)),
("ira_per_semester", admission_class_ira_per_semester(df)), ("ira_per_semester", admission_class_ira_per_semester(df)),
] ]
# cria um dicionario com as analises para cada turma # cria um dicionario com as analises para cada turma
...@@ -159,22 +159,13 @@ def generate_admission_data(path,df): ...@@ -159,22 +159,13 @@ def generate_admission_data(path,df):
def generate_admission_list(path,df): def generate_admission_list(path,df):
pass 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 = {}
others_dict["alunos_reprovacoes_na_mesma_disciplina"] = student_three_fails_subject(df) def generate_course_data(path, df):
save_json(path+"cepe9615.json", others_dict) course = Course(df)
\ No newline at end of file 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