From f82f358b61ad2e68175d110311438d4c6bf33faa Mon Sep 17 00:00:00 2001 From: Bastien Le Querrec <blq@laquadrature.net> Date: Tue, 19 Mar 2024 23:24:12 +0100 Subject: [PATCH] =?UTF-8?q?ppparis:=20corrige=20l'ordre=20alphab=C3=A9tiqu?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 53 +++++++++++++++++++++++++------------------------- Makefile | 6 +++--- README.md | 2 +- cli.py | 4 ++-- 4 files changed, 32 insertions(+), 33 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67d00be..352574e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,6 +28,32 @@ docker: changes: - Dockerfile-base +test_ppparis: + stage: test + image: registry.git.laquadrature.net/bastien/raaspotter/base:latest + tags: + - unprivileged + needs: [install] + script: + - curl --silent --location --output artifacts.zip "${CI_SERVER_PROTOCOL}://${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/${CI_PROJECT_ID}/jobs/artifacts/${CI_COMMIT_BRANCH}/download?job=${CI_JOB_NAME}&job_token=${CI_JOB_TOKEN}" || true + - unzip -q artifacts.zip data/ppparis/* || true + - rm artifacts.zip || true + - source bin/activate + - python ./cli.py --pref ppparis + retry: 2 + only: + - main + cache: + key: $CI_COMMIT_REF_SLUG + paths: + - bin/ + - lib/ + - pyvenv.cfg + artifacts: + paths: + - data/ppparis/*.txt + - output.log + expire_in: 1 hour install: stage: install @@ -212,30 +238,3 @@ test_pref62: - data/pref62/*.txt - output.log expire_in: 1 hour - -test_ppparis: - stage: test - image: registry.git.laquadrature.net/bastien/raaspotter/base:latest - tags: - - unprivileged - needs: [install] - script: - - curl --silent --location --output artifacts.zip "${CI_SERVER_PROTOCOL}://${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/${CI_PROJECT_ID}/jobs/artifacts/${CI_COMMIT_BRANCH}/download?job=${CI_JOB_NAME}&job_token=${CI_JOB_TOKEN}" || true - - unzip -q artifacts.zip data/ppparis/* || true - - rm artifacts.zip || true - - source bin/activate - - python ./cli.py --pref ppparis - retry: 2 - only: - - main - cache: - key: $CI_COMMIT_REF_SLUG - paths: - - bin/ - - lib/ - - pyvenv.cfg - artifacts: - paths: - - data/ppparis/*.txt - - output.log - expire_in: 1 hour diff --git a/Makefile b/Makefile index 1e339f1..5d1cd97 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ -make: pref06 pref13 pref35 pref38 pref59 pref62 ppparis +make: ppparis pref06 pref13 pref35 pref38 pref59 pref62 +ppparis: + python cli.py --pref ppparis pref06: python cli.py --pref pref06 pref13: @@ -11,5 +13,3 @@ pref59: python cli.py --pref pref59 pref62: python cli.py --pref pref62 -ppparis: - python cli.py --pref ppparis diff --git a/README.md b/README.md index 93c8aa3..9b79bfa 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,12 @@ Il est possible de ne lancer l'analyse que pour une seule administration, avec l ## Administrations supportées +- Préfecture de police de Paris (identifiant : `ppparis`) - Préfecture des Alpes-Maritimes (identifiant : `pref06`) - Préfecture des Bouches-du-Rhône (identifiant : `pref13`) - Préfecture d'Ille-et-Vilaine (identifiant : `pref35`) - Préfecture du Nord (identifiant : `pref59`) - Préfecture du Pas-de-Calais (identifiant : `pref62`) -- Préfecture de police de Paris (identifiant : `ppparis`) ## Licence diff --git a/cli.py b/cli.py index 4efb861..33f05d9 100755 --- a/cli.py +++ b/cli.py @@ -35,13 +35,13 @@ __MASTODON_INSTANCE = os.getenv('MASTODON_INSTANCE') # Liste des préfectures supportées available_prefs = [ + 'ppparis', 'pref06', 'pref13', 'pref35', 'pref38', 'pref59', - 'pref62', - 'ppparis' + 'pref62' ] # Début du script -- GitLab