Skip to content

Commit

Permalink
feat: enlever le nombre de diplomés pour le sup
Browse files Browse the repository at this point in the history
  • Loading branch information
K4ST0R committed Jan 6, 2025
1 parent aad3631 commit 57e6af9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 30 deletions.
3 changes: 0 additions & 3 deletions server/src/http/routes/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1219,9 +1219,6 @@ components:
type: number
nb_annee_term:
type: number
nb_diplome:
type: number
description: Uniquement pour le supérieur
nb_poursuite_etudes:
type: number
nb_en_emploi_24_mois:
Expand Down
28 changes: 14 additions & 14 deletions server/src/services/dataEnseignementSup/InserSup.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,6 @@ function mergeApiStats(statsStream, millesime) {
return acc;
}

// On ne garde que le nombre de diplomés si la stat n'est que sur les diplômés
if (stat.obtention_diplome === "diplômé") {
acc[stat.promo.join("_")] = merge(acc[stat.promo.join("_")], {
nb_diplomes:
stat.nb_sortants !== null && stat.nb_poursuivants !== null
? stat.nb_sortants + stat.nb_poursuivants
: null,
});
return acc;
}

acc[stat.promo.join("_")] = merge(acc[stat.promo.join("_")], {
...stat,
nb_annee_term:
Expand Down Expand Up @@ -105,7 +94,6 @@ function mergeApiStats(statsStream, millesime) {
...pickBy(stats.salaire, (_, key) => key.match(/salaire_12_mois/)),
nb_poursuite_etudes: stats.nb_poursuivants,
nb_sortant: stats.nb_sortants,
nb_diplome: stats.nb_diplomes,
nb_annee_term: stats.nb_annee_term,
};
}),
Expand All @@ -128,7 +116,13 @@ class InserSup {
return mergeApiStats(
compose(
Readable.from(etablissementStats),
filterData((stats) => stats.diplome !== "all" && stats.nationalite === "ensemble" && stats.genre === "ensemble")
filterData(
(stats) =>
stats.diplome !== "all" &&
stats.nationalite === "ensemble" &&
stats.genre === "ensemble" &&
stats.obtention_diplome === "ensemble"
)
),
millesime
);
Expand All @@ -139,7 +133,13 @@ class InserSup {
const results = await mergeApiStats(
compose(
Readable.from(certificationsStats),
filterData((stats) => stats.diplome !== "all" && stats.nationalite === "ensemble" && stats.genre === "ensemble")
filterData(
(stats) =>
stats.diplome !== "all" &&
stats.nationalite === "ensemble" &&
stats.genre === "ensemble" &&
stats.obtention_diplome === "ensemble"
)
),
millesime
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"diplome": "2500200",
"date_inser": 18,
"nationalite": "ensemble",
"genre": "ensemble"
"genre": "ensemble",
"obtention_diplome": "ensemble"
},
{
"date_jeu": "2023_S2",
Expand Down Expand Up @@ -73,7 +74,8 @@
"diplome": "2500200",
"date_inser": 6,
"nationalite": "ensemble",
"genre": "ensemble"
"genre": "ensemble",
"obtention_diplome": "ensemble"
},
{
"date_jeu": "2023_S2",
Expand Down Expand Up @@ -111,7 +113,8 @@
"diplome": "2500200",
"date_inser": 12,
"nationalite": "ensemble",
"genre": "ensemble"
"genre": "ensemble",
"obtention_diplome": "ensemble"
},
{
"date_jeu": "2023_S2",
Expand Down Expand Up @@ -148,7 +151,8 @@
"diplome": "2500200",
"date_inser": 12,
"nationalite": "ensemble",
"genre": "ensemble"
"genre": "ensemble",
"obtention_diplome": "ensemble"
},
{
"date_jeu": "2023_S2",
Expand Down Expand Up @@ -185,7 +189,8 @@
"diplome": "2500200",
"date_inser": 6,
"nationalite": "ensemble",
"genre": "ensemble"
"genre": "ensemble",
"obtention_diplome": "ensemble"
},
{
"date_jeu": "2023_S2",
Expand Down Expand Up @@ -222,7 +227,8 @@
"diplome": "2500200",
"date_inser": 18,
"nationalite": "ensemble",
"genre": "ensemble"
"genre": "ensemble",
"obtention_diplome": "ensemble"
},
{
"date_jeu": "2023_S2",
Expand Down Expand Up @@ -259,7 +265,8 @@
"diplome": "2500200",
"date_inser": 24,
"nationalite": "ensemble",
"genre": "ensemble"
"genre": "ensemble",
"obtention_diplome": "ensemble"
},
{
"date_jeu": "2023_S2",
Expand Down Expand Up @@ -296,7 +303,8 @@
"diplome": "2500200",
"date_inser": 18,
"nationalite": "ensemble",
"genre": "ensemble"
"genre": "ensemble",
"obtention_diplome": "ensemble"
},
{
"date_jeu": "2023_S2",
Expand Down Expand Up @@ -333,7 +341,8 @@
"diplome": "2500200",
"date_inser": 6,
"nationalite": "ensemble",
"genre": "ensemble"
"genre": "ensemble",
"obtention_diplome": "ensemble"
},
{
"date_jeu": "2023_S2",
Expand Down Expand Up @@ -370,6 +379,7 @@
"diplome": "2500200",
"date_inser": 12,
"nationalite": "ensemble",
"genre": "ensemble"
"genre": "ensemble",
"obtention_diplome": "ensemble"
}
]
3 changes: 0 additions & 3 deletions server/tests/jobs/stats/importFormationsSupStats-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ describe("importFormationsSupStats", () => {
filiere: "superieur",
date_fermeture: new Date("2023-01-01T00:00:00.000Z"),
nb_annee_term: 193,
nb_diplome: 134,
nb_en_emploi_12_mois: 112,
nb_en_emploi_18_mois: 115,
nb_en_emploi_24_mois: 115,
Expand Down Expand Up @@ -133,7 +132,6 @@ describe("importFormationsSupStats", () => {
filiere: "superieur",
date_fermeture: new Date("2023-01-01T00:00:00.000Z"),
nb_annee_term: 193,
nb_diplome: 134,
nb_en_emploi_12_mois: 112,
nb_en_emploi_18_mois: 115,
nb_en_emploi_24_mois: 115,
Expand Down Expand Up @@ -187,7 +185,6 @@ describe("importFormationsSupStats", () => {
filiere: "superieur",
date_fermeture: new Date("2023-01-01T00:00:00.000Z"),
nb_annee_term: 193,
nb_diplome: 134,
nb_en_emploi_12_mois: 112,
nb_en_emploi_18_mois: 115,
nb_en_emploi_24_mois: 115,
Expand Down

0 comments on commit 57e6af9

Please sign in to comment.