Skip to content

feat: add task to publish nb signalements on datagouv#48

Merged
MaGOs92 merged 5 commits into
masterfrom
gfay_feat_publish-nb-signalements-by-commune-on-datagouv
Apr 28, 2026
Merged

feat: add task to publish nb signalements on datagouv#48
MaGOs92 merged 5 commits into
masterfrom
gfay_feat_publish-nb-signalements-by-commune-on-datagouv

Conversation

@MaGOs92

@MaGOs92 MaGOs92 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Context :

Ajoute une tâche hebdomadaire pour publier le nombre de signalements par commune dans un fichier CSV sur datagouv

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a scheduled export that aggregates signalement counts per commune and publishes the result as a CSV resource on data.gouv.fr.

Changes:

  • Add a weekly cron in TaskService to generate and upload a CSV of signalement counts by commune.
  • Add a DataGouvService/DataGouvModule to upload CSV content to a data.gouv.fr dataset resource.
  • Add a new SignalementService.getSignalementCountsByCommune() aggregation query to produce per-commune/per-status counts.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/modules/task/task.service.ts Adds the weekly cron task, CSV formatting, and calls into DataGouvService.
src/modules/task/task.module.ts Wires DataGouvModule into TaskModule for DI.
src/modules/signalement/signalement.service.ts Adds a DB aggregation method returning counts by commune and status.
src/modules/datagouv/datagouv.service.ts Implements the data.gouv.fr resource upload via multipart PUT.
src/modules/datagouv/datagouv.module.ts Declares and exports the DataGouv service for consumers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/modules/task/task.service.ts
Comment thread src/modules/task/task.service.ts
Comment thread src/modules/task/task.service.ts Outdated
Comment thread src/modules/signalement/signalement.service.ts
Comment thread src/modules/datagouv/datagouv.service.ts
Comment thread src/modules/datagouv/datagouv.service.ts Outdated
@MaGOs92 MaGOs92 force-pushed the gfay_feat_publish-nb-signalements-by-commune-on-datagouv branch from ccabacb to 5171eca Compare April 24, 2026 14:56
@MaGOs92 MaGOs92 requested a review from fufeck April 24, 2026 15:23
@MaGOs92 MaGOs92 merged commit 70a7260 into master Apr 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants