Skip to content

Commit

Permalink
Financabilite : versionning / strategy pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
BenJneB committed Nov 4, 2024
1 parent bcf730b commit 9fdb077
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
from admission.ddd.admission.domain.service.i_maximum_propositions import IMaximumPropositionsAutorisees
from admission.ddd.admission.domain.service.i_profil_candidat import IProfilCandidatTranslator
from admission.ddd.admission.domain.service.i_titres_acces import ITitresAcces
from admission.ddd.admission.enums.question_specifique import Onglets
from admission.ddd.admission.domain.service.profil_soumis_candidat import (
ProfilSoumisCandidatTranslator,
)
from admission.ddd.admission.enums.question_specifique import Onglets
from base.models.enums.academic_calendar_type import AcademicCalendarTypes
from ddd.logic.financabilite.domain.model.enums.etat import EtatFinancabilite
from ddd.logic.financabilite.domain.service.financabilite import Financabilite
from ddd.logic.financabilite.domain.service.i_financabilite import IFinancabiliteFetcher
from ddd.logic.financabilite.domain.service.algorithmes.v2024.algorithme import Algorithme2024
from ddd.logic.financabilite.domain.service.i_fetcher import IFetcher
from ddd.logic.shared_kernel.academic_year.domain.service.get_current_academic_year import GetCurrentAcademicYear
from ddd.logic.shared_kernel.academic_year.repository.i_academic_year import IAcademicYearRepository

Expand All @@ -77,7 +77,7 @@ def soumettre_proposition(
calendrier_inscription: 'ICalendrierInscription',
element_confirmation: 'IElementsConfirmation',
maximum_propositions_service: 'IMaximumPropositionsAutorisees',
financabilite_fetcher: 'IFinancabiliteFetcher',
financabilite_fetcher: 'IFetcher',
) -> 'PropositionIdentity':
# GIVEN
proposition_id = PropositionIdentityBuilder.build_from_uuid(cmd.uuid_proposition)
Expand Down Expand Up @@ -160,7 +160,7 @@ def soumettre_proposition(
)

# THEN
financabilite = Financabilite(
financabilite = Algorithme2024(
parcours=parcours,
formation=formation_dto,
est_en_reorientation=False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
from admission.ddd.admission.formation_generale.repository.i_proposition import IPropositionRepository
from base.models.enums.academic_calendar_type import AcademicCalendarTypes
from ddd.logic.financabilite.domain.model.enums.etat import EtatFinancabilite
from ddd.logic.financabilite.domain.model.enums.situation import SituationFinancabilite
from ddd.logic.financabilite.domain.service.financabilite import Financabilite
from ddd.logic.financabilite.domain.service.algorithmes.v2024.algorithme import Algorithme2024
from ddd.logic.financabilite.domain.service.i_fetcher import IFetcher
from ddd.logic.shared_kernel.academic_year.domain.service.get_current_academic_year import GetCurrentAcademicYear
from ddd.logic.shared_kernel.academic_year.repository.i_academic_year import IAcademicYearRepository

Expand All @@ -76,7 +76,7 @@ def soumettre_proposition(
inscription_tardive_service: 'IInscriptionTardive',
paiement_frais_dossier_service: 'IPaiementFraisDossier',
historique: 'IHistorique',
financabilite_fetcher: 'IFinancabiliteFetcher',
financabilite_fetcher: 'IFetcher',
) -> 'PropositionIdentity':
# GIVEN
proposition_id = PropositionIdentityBuilder.build_from_uuid(cmd.uuid_proposition)
Expand Down Expand Up @@ -159,7 +159,7 @@ def soumettre_proposition(
est_inscription_tardive = inscription_tardive_service.est_inscription_tardive(pool)

# THEN
financabilite = Financabilite(
financabilite = Algorithme2024(
parcours=parcours,
formation=formation_dto,
est_en_reorientation=proposition.est_reorientation_inscription_externe,
Expand Down
4 changes: 2 additions & 2 deletions infrastructure/admission/doctorat/preparation/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
AnneeInscriptionFormationTranslator,
)
from admission.infrastructure.admission.domain.service.profil_candidat import ProfilCandidatTranslator
from infrastructure.financabilite.domain.service.financabilite import FinancabiliteFetcher
from infrastructure.financabilite.domain.service.financabilite_fetcher import Fetcher
from infrastructure.shared_kernel.academic_year.repository.academic_year import AcademicYearRepository
from infrastructure.shared_kernel.campus.repository.uclouvain_campus import UclouvainCampusRepository
from infrastructure.shared_kernel.personne_connue_ucl.personne_connue_ucl import PersonneConnueUclTranslator
Expand Down Expand Up @@ -198,7 +198,7 @@
calendrier_inscription=CalendrierInscription(),
element_confirmation=ElementsConfirmation(),
maximum_propositions_service=MaximumPropositionsAutorisees(),
financabilite_fetcher=FinancabiliteFetcher(),
financabilite_fetcher=Fetcher(),
),
DefinirCotutelleCommand: lambda msg_bus, cmd: definir_cotutelle(
cmd,
Expand Down
4 changes: 2 additions & 2 deletions infrastructure/admission/formation_generale/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
from admission.infrastructure.admission.shared_kernel.email_destinataire.repository.email_destinataire import (
EmailDestinataireRepository,
)
from infrastructure.financabilite.domain.service.financabilite import FinancabiliteFetcher
from infrastructure.financabilite.domain.service.financabilite_fetcher import Fetcher
from infrastructure.shared_kernel.academic_year.repository.academic_year import AcademicYearRepository
from infrastructure.shared_kernel.campus.repository.uclouvain_campus import UclouvainCampusRepository
from infrastructure.shared_kernel.personne_connue_ucl.personne_connue_ucl import PersonneConnueUclTranslator
Expand Down Expand Up @@ -245,7 +245,7 @@ def _call_if_digit_switch_active(callable_fn):
inscription_tardive_service=InscriptionTardive(),
paiement_frais_dossier_service=PaiementFraisDossier(),
historique=HistoriqueGlobal(),
financabilite_fetcher=FinancabiliteFetcher(),
financabilite_fetcher=Fetcher(),
),
CompleterCurriculumCommand: lambda msg_bus, cmd: completer_curriculum(
cmd,
Expand Down

0 comments on commit 9fdb077

Please sign in to comment.