Skip to content

feature/converter : return converted messages as a list#372

Merged
issam71100 merged 9 commits intoconverter/rc-ri-single-messagefrom
feature/converter/return-converted-messages-as-list
Mar 5, 2026
Merged

feature/converter : return converted messages as a list#372
issam71100 merged 9 commits intoconverter/rc-ri-single-messagefrom
feature/converter/return-converted-messages-as-list

Conversation

@issam71100
Copy link
Contributor

@issam71100 issam71100 commented Mar 2, 2026

🔎 Détails

Cette pull request modifie le format de réponse du point d’entrée /convert du service converter. Dorénavant, l’endpoint retourne la ou les messages convertis sous forme de liste dans la clé "converted_messages", au lieu d’un seul message sous la clé "edxl". Cela Prépare l’API à gérer des réponses multiples par requête dans le futur.

L’API renvoie désormais :

{
  "converted_messages": [ ... ]
}

au lieu de :

{
  "edxl": { ... }
}

Mise à jour de tous les tests unitaires concernés pour :

  • Vérifier la présence de la clé "converted_messages"
  • S’assurer qu’il s’agit bien d’une liste
  • Adapter les assertions aux nouveaux accès aux données

📄 Documentation

Ajoutez un (des) lien(s) vers la documentation si nécessaire

📸 Captures d'écran

Avant Après

🔗 Ticket associé

6. Mise à jour du converter pour retourner une liste de messages en réponse à l’endpoint POST /convert

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.57% 🍏

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.57% 🍏

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Coverage

Converter - python code coverage
FileStmtsMissCoverMissing
constants.py40100% 
conversion_mixin.py23195%24
converter.py57394%23, 91–92
logging_config.py35197%29
utils.py164398%57, 108, 120
cisu
   base_cisu_converter.py33390%7, 25, 31
   constants.py40100% 
   identical_cisu_converter.py90100% 
   utils.py150100% 
cisu/create_case
   create_case_cisu_constants.py310100% 
   create_case_cisu_converter.py145199%112
cisu/reference
   reference_converter.py9277%9, 13
cisu/resources_info
   resources_info_cisu_constants.py90100% 
   resources_info_cisu_converter.py680100% 
cisu/resources_status
   resources_status_converter.py8275%7, 11
conversion_strategy
   cisu_conversion_strategy.py47295%63, 88
   conversion_strategy.py70100% 
   health_conversion_strategy.py460100% 
versions
   base_message_converter.py831285%13, 72–74, 86, 98, 102, 106, 110, 114, 118, 124
   error_converter.py5180%7
   identical_message_converter.py150100% 
   utils.py26580%34–37, 43
versions/create_case_health
   constants.py40100% 
   create_case_health_converter.py1780100% 
   create_case_health_update_converter.py50100% 
versions/create_case_health/v1_v2
   constants.py170100% 
   utils.py460100% 
versions/create_case_health/v2_v3
   constants.py290100% 
versions/geo_positions_update
   geo_positions_update_constants.py40100% 
   geo_positions_update_converter.py49393%31, 42, 79
versions/geo_resources_details
   geo_resources_details_constants.py40100% 
   geo_resources_details_converter.py270100% 
versions/reference
   reference_constants.py20100% 
   reference_converter.py130100% 
versions/resources_engagement
   resources_engagement_constants.py30100% 
   resources_engagement_converter.py220100% 
versions/resources_info
   resources_info_constants.py200100% 
   resources_info_converter.py870100% 
versions/resources_request
   resources_request_constants.py20100% 
   resources_request_converter.py210100% 
versions/resources_response
   resources_response_constants.py40100% 
   resources_response_converter.py160100% 
versions/resources_status
   resources_status_constants.py100100% 
   resources_status_converter.py390100% 
TOTAL14453997% 

@issam71100 issam71100 marked this pull request as ready for review March 2, 2026 10:33
@issam71100 issam71100 changed the base branch from main to converter/rc-ri-single-message March 2, 2026 16:30
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.57% 🍏

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.57% 🍏

…into feature/converter/return-converted-messages-as-list
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.4% 🍏

@@ -8,8 +8,9 @@

def conversion_strategy(
edxl_json, source_version: str, target_version: str, is_cisu_conversion: bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Est ce qu'on peut rajouter un test sur conversion strategy qui mock l'appel à cisu_conversion_strategy ou health_conversion_strategy pour retourner soit une liste soit un seul object pour tester le comportement dans les deux cas ?

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.4% 🍏

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.4% 🍏

1 similar comment
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.4% 🍏

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.4% 🍏

@issam71100 issam71100 merged commit 770a407 into converter/rc-ri-single-message Mar 5, 2026
2 checks passed
@issam71100 issam71100 deleted the feature/converter/return-converted-messages-as-list branch March 5, 2026 13:57
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