Skip to content
Snippets Groups Projects
Commit a893a94c authored by raclet's avatar raclet
Browse files

Ajout des coll et export xlsx

parent cbd12fee
No related branches found
No related tags found
No related merge requests found
No preview for this file type
File added
...@@ -15,6 +15,7 @@ sillon_to_groups = {} ...@@ -15,6 +15,7 @@ sillon_to_groups = {}
groupe_to_sillons = {} groupe_to_sillons = {}
groupe_to_ue = {} groupe_to_ue = {}
groupe_to_intitule = {} groupe_to_intitule = {}
groupe_to_coll = {}
all_incompatibilities_apogee = set() all_incompatibilities_apogee = set()
all_incompatibilities_theory = set() all_incompatibilities_theory = set()
...@@ -90,6 +91,8 @@ def verifier_apogee_vs_theory(): ...@@ -90,6 +91,8 @@ def verifier_apogee_vs_theory():
for index, row in df.iterrows(): for index, row in df.iterrows():
group1 = row['COD_EXT_GPE'].upper() group1 = row['COD_EXT_GPE'].upper()
group2 = row['COD_EXT_GPE1'].upper() group2 = row['COD_EXT_GPE1'].upper()
groupe_to_coll[group1] = row['COD_EXT_COL'].upper()
groupe_to_coll[group2] = row['COD_EXT_COL1'].upper()
# on vérifie que les 2 groupes de l'incomp appartiennent à la VET # on vérifie que les 2 groupes de l'incomp appartiennent à la VET
if (group1 in groupe_to_sillons and groupe_to_sillons[group1] if (group1 in groupe_to_sillons and groupe_to_sillons[group1]
...@@ -135,6 +138,30 @@ def verifier_theory_vs_apogee(): ...@@ -135,6 +138,30 @@ def verifier_theory_vs_apogee():
else: else:
print("Aucun oubli détecté.") print("Aucun oubli détecté.")
def export_missing_incomp():
missing_incompatibilities = all_incompatibilities_theory - all_incompatibilities_apogee
if missing_incompatibilities:
data = []
for group1, group2 in missing_incompatibilities:
data.append([
group1, groupe_to_ue[group1], groupe_to_intitule[group1], groupe_to_coll[group1],
group2, groupe_to_ue[group2], groupe_to_intitule[group2], groupe_to_coll[group2]
])
# Creating a DataFrame
df = pd.DataFrame(data, columns=[
'Groupe 1', 'UE 1', 'Intitule 1', 'Coll 1',
'Groupe 2', 'UE 2', 'Intitule 2', 'Coll 2'
])
# Writing to an Excel file
df.to_excel('incompatibilites_manquantes.xlsx', index=False)
print("Oublis détectés dans les incompatibilités et écrits dans 'incompatibilites_manquantes.xlsx'.")
else:
print("Aucun oubli détecté.")
dic_creator() dic_creator()
print_infos() print_infos()
print("--- Apogee vs. theory:") print("--- Apogee vs. theory:")
...@@ -142,3 +169,4 @@ verifier_apogee_vs_theory() ...@@ -142,3 +169,4 @@ verifier_apogee_vs_theory()
print("--- Theory vs. apogee:") print("--- Theory vs. apogee:")
incomp_theory_creator() incomp_theory_creator()
verifier_theory_vs_apogee() verifier_theory_vs_apogee()
#export_missing_incomp()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment