Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lucduron committed Sep 9, 2024
2 parents a0c6445 + 0ed638e commit 665c398
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crue10/etude.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,15 @@ def get_scenario_courant(self):
return self.get_scenario(self.nom_scenario_courant)
raise ExceptionCrue10("Aucun scénario courant n'est défini dans l'étude")

def get_nom_scenario_depuis_run_id(self, nom_run):
"""Nom du scénario porteur d'un run de ce nom
:param nom_run: nom du run pour lequel récupérer le scénario
"""
for nom_scenario, scenario in self.scenarios.items():
if nom_run in scenario.runs.keys():
return nom_scenario
raise ExceptionCrue10("Le run %s n'est dans aucun scénario !" % nom_run)

def get_modele(self, nom_modele):
"""Retourne le modèle demandé
Expand Down

0 comments on commit 665c398

Please sign in to comment.