diff --git a/check.py b/check.py new file mode 100644 index 0000000000000000000000000000000000000000..21ecc5fb47b346f88bcb182cc8f6f4230086bcbf --- /dev/null +++ b/check.py @@ -0,0 +1,30 @@ +import pandas as pd +import os + +TABLE_FILE = os.path.join(os.getenv("HOME"), r".local/share/adega-crypt/correspondences.csv") + +table = pd.read_csv(TABLE_FILE) + +hist_e = pd.read_csv('historico.encripted.csv') +matr_e = pd.read_csv('historico.encripted.csv') + +hist = pd.read_csv('historico.csv') +matr = pd.read_csv('historico.csv') + +d1 = pd.concat([hist[['MATR_ALUNO']], matr[['MATR_ALUNO']]]) +d2 = pd.concat([hist_e[['MATR_ALUNO']], matr_e[['MATR_ALUNO']]]) + +d1s = d1.drop_duplicates().shape[0] +d2s = d2.drop_duplicates().shape[0] + +t = table.shape[0] + +if d1s == d2s == t: + print "OK" +else: + print """ +Quantidade de alunos: +original: %d +processado: %d +tabela: %d +""" % (d1s, d2s, t)