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

adding checklist from annotationReports in statistics collection #120

Merged
merged 33 commits into from
Nov 8, 2024

Conversation

Bouba-cassation
Copy link
Collaborator

Issue description :

adding checklist from annotationReports collection to statistics collection for saving after in sder for data team

Describe your changes :

How to test :

annotate a document with checlist (mise en doute) and export it, go to statistics collection and see if it saved the (checkList)

Checklist before requesting a review

  • I have performed a self-review of my code.
  • The feature works locally.
  • If it's relevant I added tests.
  • Will this be part of a product update? If yes, please write one phrase about this update.

);
logger.log({
operationName: 'annotationReport',
msg: `checklist ==> ${document._id} -- ${checklists}`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Il ne faut pas logger les checklist car elles peuvent contenir des données sensibles

@@ -192,6 +201,10 @@ function buildExporter(
const anonymizer = buildAnonymizer(settingsForDocument, annotations, seed);

try {
logger.log({
operationName: 'exportDocument',
msg: `checklists ${checklists} `,
Copy link
Collaborator

Choose a reason for hiding this comment

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

log a retirer

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'est fait

@@ -100,5 +102,7 @@ async function saveStatisticsOfDocument(
},
});

statistic = { ...annotationReportsChecklist, ...statistic };
Copy link
Collaborator

Choose a reason for hiding this comment

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

Cette ligne me parait être en doublon vu qu'on ajoute la checklist dans statisticsCreator.ts
Et ducoup l'objet statistic peut rester en const ligne 39 je pense

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'est fait

@@ -58,6 +58,7 @@ describe('buildStatistic', () => {
linkedEntitiesCount,
lastUpdateDate,
treatmentInfo,
annotationReportsChecklist: undefined,
Copy link
Collaborator

Choose a reason for hiding this comment

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

ça pourrait être plus propre de mettre une valeur pour la checklist, ça permettrait de tester que la checklist est bien renvoyée par la fonction
En plus, vu qu'on aura d'autres évolutions sur les checklist on a intérêt a se blinder sur les test pour éviter les effets de bord lors des changements. A l'avenir il y aura peut-être un traitement de la checklist vu qu'on aura les indices dans le texte donc ça sera important d'avoir des tests selon moi

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'est fait

@ajeanneney ajeanneney mentioned this pull request Oct 4, 2024
4 tasks
Antoine Jeanneney and others added 22 commits October 29, 2024 16:06
* calculate axios call duration

* timeout to 5 hours on nlp job

* remove console log

* set timetout to 10 min

* finale fix

* timeout on every errors on nlp job

* increase pause after error

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
* add show modifications options on problem report table

* simplify isDisabled condition

* change order

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
* remove migrations - unused

* improve readme

* delete unused readme

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
* add NAO

* show nac or nao in title

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
* fix scrutator authorizations

* show preAssignation menu to scrutator

* remove adminView when disconnect

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
* FEAT_add-docker-local-hot-reload

* dockerize label with hot reload & network on sder repository

* fix docker:kill

* reset to give a root docker compose

* complete docker.env.example

* remove useless run_mode set

---------

Co-authored-by: Julien Grach <julien.grach@justice.fr>
Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
* first tests and documentation of what I have try/undertand

* multiline selection by clicking on line numbers

* remove logs

* remove buggy multiline feature

* format

* fine tune annotation tooltip

* fix bug : selecting empty lines

* hightlight selected line

* fix identical line selection

* auto create motivation annotation when use line selection

* add popup when delete motivation annotation

* disable changeCategory and link annotation for motivation

* split text in annotation tooltip if too long

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
* FEAT_add-docker-local-hot-reload

* fix dockerfile npm i

---------

Co-authored-by: Julien Grach <julien.grach@justice.fr>
* customize entityId for motivations

* clean

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
* add restartPolicy on cronjobs

* deploy on dev

* change branch name

* change branch name

* fix ci

* disable branch deploy

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
* Fix/try fix import (#114)

* j-7 to j-4

* add dateDecision import

* set schedule to not overlap import jobs

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* choose random in old and recent documents

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
* create new annotationReport type

* handle only new annotationReport

* save checklist only if not empty

* extract checklist rendering

* add viewer mode for checklist

* put chekclist in accordion

* make check clickable

* show lines of concerned selected check

* diplay context lines for checklist

* styling

* add checklist header

* eslint

* simplify annotationReportType

* fix test

* change 'label' to 'category' in nlp response

* update storage-example

* review changes

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
@ajeanneney
Copy link
Collaborator

Je me suis permis de changer annotationReportChecklist en checklist pour plus de clarté car annotationReport est un terme spécifique a label alors que checklist est plutôt le terme que l'on utilise pour définir les mises en doute
✔️

@Bouba-cassation Bouba-cassation merged commit cba4d71 into dev Nov 8, 2024
1 check passed
@Bouba-cassation Bouba-cassation deleted the feat/annotationReportExport branch November 8, 2024 10:55
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.

4 participants