Commit 9e2a1ff0 authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Stop checking expected_nb_files

parent 5116d250
Pipeline #191827 passed with stage
in 36 seconds
......@@ -65,11 +65,6 @@ def build_top_category_json(source_dir, target_dir, top_category):
)
html_filepath = source_dir / "{}.html".format(cat_slug)
xls_dicts = list(iter_xls_dicts(html_filepath))
xls_dicts_len = len(xls_dicts)
expected_nb_files = top_category["expected_nb_files"]
assert xls_dicts_len == expected_nb_files, "Found {} xls links, expected {}".format(
xls_dicts_len, expected_nb_files
)
return {
"code": cat_code,
......
......@@ -16,114 +16,95 @@ TOP_CATEGORIES = [
"code": "1",
"name": "L’activité partielle",
"slug": "l-activite-partielle",
"expected_nb_files": 1,
},
{
"code": "2",
"name": "Les demandeurs d’emploi inscrits à Pôle emploi : données nationales",
"slug": "les-demandeurs-d-emploi-inscrits-a-pole-emploi-les-series-mensuelles-nationales",
"expected_nb_files": 3,
},
{
"code": "3",
"name": "Les demandeurs d’emploi inscrits à Pôle emploi : données nationales",
"slug": "les-demandeurs-d-emploi-inscrits-a-pole-emploi-les-series-mensuelles-regionales",
"expected_nb_files": 3,
},
{
"code": "4",
"name": "Les demandeurs d’emploi inscrits à Pôle emploi : données régionales, départementales et par zone d’emploi",
"slug": "la-duree-collective-hebdomadaire-de-travail",
"expected_nb_files": 3,
},
{
"code": "5",
"name": "La durée individuelle du travail",
"slug": "la-duree-individuelle-du-travail",
"expected_nb_files": 1,
},
{
"code": "6",
"name": "L’emploi salarié",
"slug": "l-emploi-salarie",
"expected_nb_files": 1,
},
{
"code": "7",
"name": "Les emplois vacants",
"slug": "les-emplois-vacants",
"expected_nb_files": 1,
},
{
"code": "8",
"name": "L’emploi intérimaire",
"slug": "l-emploi-interimaire",
"expected_nb_files": 4,
},
{
"code": "9",
"name": "Les journées individuelles non travaillées (JINT)",
"slug": "les-journees-individuelles-non-travaillees-jint",
"expected_nb_files": 1,
},
{
"code": "10",
"name": "Les heures supplémentaires",
"slug": "les-heures-supplementaires",
"expected_nb_files": 1,
},
{
"code": "11",
"name": "Les heures supplémentaires rémunérées",
"slug": "les-heures-supplementaires-remunerees",
"expected_nb_files": 1,
},
{
"code": "12",
"name": "Les offres collectées et satisfaites par Pôle emploi",
"slug": "les-offres-collectees-et-satisfaites-par-pole-emploi-les-series-mensuelles",
"expected_nb_files": 1,
},
{
"code": "13",
"name": "La participation, l’intéressement et l’épargne salariale",
"slug": "la-participation-l-interessement-et-l-epargne-salariale",
"expected_nb_files": 1,
},
{
"code": "14",
"name": "Les dispositifs publics d’accompagnement des restructurations",
"slug": "les-dispositifs-publics-d-accompagnement-des-restructurations",
"expected_nb_files": 2,
},
{
"code": "15",
"name": "Les ruptures conventionnelles",
"slug": "les-ruptures-conventionnelles",
"expected_nb_files": 2,
},
{
"code": "16",
"name": "Les indices de salaire de base",
"slug": "les-indices-de-salaire-de-base",
"expected_nb_files": 4,
},
{
"code": "17",
"name": "Les sortants des listes de demandeurs d’emploi inscrits à Pôle emploi",
"slug": "donnees-statistiques-les-sortants-des-listes-de-demandeurs-d-emploi-inscrits-a",
"expected_nb_files": 2,
},
{
"code": "18",
"name": "Le temps partiel",
"slug": "le-temps-partiel",
"expected_nb_files": 1,
},
{
"code": "19",
"name": "Les tensions sur le marché du travail par métier",
"slug": "les-tensions-sur-le-marche-du-travail-par-metier",
"expected_nb_files": 2,
},
]
......@@ -101,15 +101,6 @@ def download_excel_files(target_dir: Path, s: requests.Session):
if not excel_filepath.exists():
download_binary(a_url, excel_filepath, s)
expected_files_nb = category["expected_nb_files"]
if count != expected_files_nb:
log.warning(
r"/!\ %s: %d expected file(s) but %d downloaded",
cat_slug,
expected_files_nb,
count,
)
def main():
parser = argparse.ArgumentParser(
......
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