Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Signalement - BO] Import Données 67 Bas Rhin #2128

Merged
merged 4 commits into from
Feb 6, 2024

Conversation

numew
Copy link
Collaborator

@numew numew commented Jan 17, 2024

Ticket

#1963

Description

Amélioration de la commande d'import des signalements (pour traitement des import du 67)

Changements apportés

  • Ajout de contrôle (warning) sur l'existence des documents indiqués
  • Ajout de contrôle (warning) sur l'existence des motifs de clotures indiqués
  • Ajout de contrôle (warning) sur l'existence des partenaires indiqués
  • Détermine le type de fichier photo/document en fonction du type mime du fichier
  • Possibilité de séparation de partenaires par le séparateur"|" (en plus des ",")
  • Possibilité de fournir la référence au directement au format histologe
  • Conversion de certain motif de cloture
  • Limite du nom occupant et nom déclarant a 50 caractères
  • Fix import de la colonne "isNotOccupant" inversé (nommé "Déclarant est l occupant?" dans le CSV)
  • Fix du lien File/Signalement à l'import qui provoquait dans certains cas un bug de persistence en db
  • Ajout de l'étape 4 de génération des miniatures sur la doc : https://github.com/MTES-MCT/histologe/wiki/Reprise-de-donn%C3%A9es-(import-de-signalements)#4-si-il-y-a-des-images-g%C3%A9n%C3%A9rations-des-miniatures-et-resize

Tests

  • Vérifier le fonctionnement de la commande (make console app="import-signalement 67)

foreach ($partnersName as $partnerName) {
$partnerNameCleaned = preg_replace('/[\x00-\x1F\x7F\xA0]/u', '', $partnerName); // remove non printable chars
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sympa la regex 😂

use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;

class SignalementImportLoader
{
private const FLUSH_COUNT = 200;
private const FLUSH_COUNT = 20;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Un peu plus de 20 c'était pas possible, j'imagine ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

c’était possible mais j'ai préféré réduire vu que le temps de traitement avec les images augmente pas mal et que j'ai supprimé le flush dans la partie loadFiles

Copy link
Collaborator

@sfinx13 sfinx13 left a comment

Choose a reason for hiding this comment

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

J'approuve la PR (test + code OK)
Warinig remonté sur le channel https://mattermost.incubateur.net/betagouv/pl/6nc8fnmiitypxkxxqcdfgpoxph

image

Copy link
Collaborator

@emilschn emilschn left a comment

Choose a reason for hiding this comment

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

2 commentaires de relecture, je n'ai pas encore testé :)

@numew numew marked this pull request as draft January 18, 2024 16:31
@numew
Copy link
Collaborator Author

numew commented Jan 18, 2024

Je met en draft en attendant le fichier modifié qu'il prépare suite au premiers retours (warning sur les partenaire)

@numew numew marked this pull request as ready for review February 6, 2024 09:54
Copy link

sonarcloud bot commented Feb 6, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Collaborator

@emilschn emilschn left a comment

Choose a reason for hiding this comment

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

OK lecture et test

@emilschn emilschn merged commit e433331 into develop Feb 6, 2024
3 checks passed
@sfinx13 sfinx13 deleted the feature/1963-import-signalement-67 branch February 13, 2024 21:09
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.

None yet

3 participants