Skip to content

Feat/converter : Ne pas envoyer d'erreur si aucune ressource CISU-compatible après filtrage#391

Open
issam71100 wants to merge 3 commits intoconverter/rc-ri-single-messagefrom
feat/converter/empty-list-on-no-cisu-compatible-resource
Open

Feat/converter : Ne pas envoyer d'erreur si aucune ressource CISU-compatible après filtrage#391
issam71100 wants to merge 3 commits intoconverter/rc-ri-single-messagefrom
feat/converter/empty-list-on-no-cisu-compatible-resource

Conversation

@issam71100
Copy link
Copy Markdown
Contributor

@issam71100 issam71100 commented Apr 7, 2026

🔎 Détails

Lors de la conversion d'un RS-RI en RC-RI, si toutes les ressources sont filtrées (ex : vehicleType non supporté comme TSU.AMB), le converter levait une ValueError qui remontait comme une erreur au dispatcher.

Cette PR change le comportement du converter lorsqu'il ne reste aucune ressource après filtrage, aucun message ne doit être transmis et pas de levé d'erreur.

Changements :

  • Retourner un tableau vide au lieu de raise ValueError quand converted_resources est vide après filtrage des vehicleTypes.
  • Tests mis à jour : le cas vehicleType non supporté n'est plus un cas d'erreur attendu. Un test dédié vérifie le retour [].

📄 Documentation

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

📸 Captures d'écran

Avant Après

🔗 Ticket associé

Ne pas envoyer d'erreur si après filtrage des ressources, il n'y a plus aucune ressource à envoyer

@issam71100 issam71100 changed the base branch from main to converter/rc-ri-single-message April 7, 2026 09:28
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.5% 🍏

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.4% 🍏

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Coverage

Converter - python code coverage
FileStmtsMissCoverMissing
constants.py40100% 
conversion_mixin.py23195%24
converter.py67395%26, 94–95
database.py322231%12, 16, 18–21, 23, 25, 27, 29–38, 40–41, 49
logging_config.py35294%29, 36
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.py139199%144
   resources_info_cisu_helper.py150100% 
cisu/resources_status
   resources_status_constants.py30100% 
   resources_status_converter.py31196%31
conversion_strategy
   cisu_conversion_strategy.py49295%68, 93
   conversion_strategy.py70100% 
   health_conversion_strategy.py460100% 
models
   persisted_message.py130100% 
repositories
   message_repository.py701282%90–91, 98, 118–120, 122–123, 125, 171–173
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% 
TOTAL16847495% 

@issam71100 issam71100 marked this pull request as ready for review April 7, 2026 09:51
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