From 34b0d173c998bdfce47f2912c2f97af728f836ef Mon Sep 17 00:00:00 2001 From: Jeremy PASTOURET Date: Fri, 27 Dec 2024 15:24:26 +0100 Subject: [PATCH 1/7] maj : codes postaux de la mutuelle communale --- CHANGELOG.md | 8 ++++++++ .../communes/montpellier/eligibilite.py | 10 ---------- .../eligibilite_metropole_mutuelle.py | 16 ++++++++++++++++ setup.py | 2 +- 4 files changed, 25 insertions(+), 11 deletions(-) delete mode 100644 openfisca_france_local/communes/montpellier/eligibilite.py create mode 100644 openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py diff --git a/CHANGELOG.md b/CHANGELOG.md index fb89ed91..dc8be553 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [6.17.2] - 2024-12-27 + +_Pour les changements détaillés et les discussions associées, référencez la pull request [#221](https://github.com/openfisca/openfisca-france-local/pull/221)_ + +### Changed + +- Ajout d'autres codes postaux pour le dispositif de mutuelle communale de la métropole de Montpellier : `eligibilite_metropole_mutuelle` + ## [6.17.1] - 2024-11-14 _Pour les changements détaillés et les discussions associées, référencez la pull request [#220](https://github.com/openfisca/openfisca-france-local/pull/220)_ diff --git a/openfisca_france_local/communes/montpellier/eligibilite.py b/openfisca_france_local/communes/montpellier/eligibilite.py deleted file mode 100644 index a28e4568..00000000 --- a/openfisca_france_local/communes/montpellier/eligibilite.py +++ /dev/null @@ -1,10 +0,0 @@ -from openfisca_france.model.base import Menage, MONTH, Variable - -class montpellier_eligibilite_residence(Variable): - value_type = bool - entity = Menage - definition_period = MONTH - label = "Éligibilité résidentielle d'un ménage aux dipositifs de Montpellier" - - def formula(menage, period): - return menage('depcom', period) == b'34172' diff --git a/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py b/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py new file mode 100644 index 00000000..ce946817 --- /dev/null +++ b/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py @@ -0,0 +1,16 @@ +from openfisca_france.model.base import Menage, MONTH, Variable + +class montpellier_eligibilite_residence(Variable): + value_type = bool + entity = Menage + definition_period = MONTH + label = "Éligibilité résidentielle d'un ménage aux dipositifs de la métropole de Montpellier" + + def formula(menage, period): + return menage('depcom', period) in [b'34172', #Montpellier + b'34077', #Clapier + b'34090', #Le Crès + b'34179', #Murviel-lès-Montpellier + b'34256', #Saint-Geniès-des-Mourgues + b'34307' #Sussargues + ] diff --git a/setup.py b/setup.py index 483e553f..45618825 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='OpenFisca-France-Local', - version='6.17.1', + version='6.17.2', author='OpenFisca Team', author_email='contact@openfisca.fr', classifiers=[ From 7fc6528cca8d1487fe1cf4642138f0bd56d580e8 Mon Sep 17 00:00:00 2001 From: Jeremy PASTOURET Date: Fri, 27 Dec 2024 15:25:02 +0100 Subject: [PATCH 2/7] maj : codes postaux de la mutuelle communale --- .../communes/montpellier/eligibilite_metropole_mutuelle.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py b/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py index ce946817..c69471b4 100644 --- a/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py +++ b/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py @@ -5,6 +5,7 @@ class montpellier_eligibilite_residence(Variable): entity = Menage definition_period = MONTH label = "Éligibilité résidentielle d'un ménage aux dipositifs de la métropole de Montpellier" + reference = "https://encommun.montpellier.fr/articles/2024-12-19-lagence-de-la-mutuelle-communale-de-montpellier-est-ouverte" def formula(menage, period): return menage('depcom', period) in [b'34172', #Montpellier From 599069c623b7b39998dd63ced96be9ad143ec9d3 Mon Sep 17 00:00:00 2001 From: Jeremy PASTOURET Date: Fri, 27 Dec 2024 15:53:23 +0100 Subject: [PATCH 3/7] fix: verificaiton de plusieurs code postal --- .../montpellier/eligibilite_metropole_mutuelle.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py b/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py index c69471b4..d0fda999 100644 --- a/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py +++ b/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py @@ -8,10 +8,11 @@ class montpellier_eligibilite_residence(Variable): reference = "https://encommun.montpellier.fr/articles/2024-12-19-lagence-de-la-mutuelle-communale-de-montpellier-est-ouverte" def formula(menage, period): - return menage('depcom', period) in [b'34172', #Montpellier - b'34077', #Clapier - b'34090', #Le Crès - b'34179', #Murviel-lès-Montpellier - b'34256', #Saint-Geniès-des-Mourgues - b'34307' #Sussargues - ] + return any(menage('depcom', period) == code for code in [ + b'34172', # Montpellier + b'34077', # Clapier + b'34090', # Le Crès + b'34179', # Murviel-lès-Montpellier + b'34256', # Saint-Geniès-des-Mourgues + b'34307' # Sussargues + ]) From 616d47eb9b978dbfb08fa4980c0894e04778a4d3 Mon Sep 17 00:00:00 2001 From: Jeremy PASTOURET Date: Mon, 30 Dec 2024 17:21:13 +0100 Subject: [PATCH 4/7] fix: montpellier prise en compte de communes --- .../communes/montpellier/eligibilite_metropole_mutuelle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py b/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py index d0fda999..a09b29f6 100644 --- a/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py +++ b/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py @@ -8,7 +8,7 @@ class montpellier_eligibilite_residence(Variable): reference = "https://encommun.montpellier.fr/articles/2024-12-19-lagence-de-la-mutuelle-communale-de-montpellier-est-ouverte" def formula(menage, period): - return any(menage('depcom', period) == code for code in [ + return sum(menage('depcom', period) == code for code in [ b'34172', # Montpellier b'34077', # Clapier b'34090', # Le Crès From 48a6ce412c8620c560c18b1fc9b095723c00cc89 Mon Sep 17 00:00:00 2001 From: Jeremy PASTOURET Date: Thu, 2 Jan 2025 11:16:47 +0100 Subject: [PATCH 5/7] =?UTF-8?q?fix:=20ajout=20de=20precisions=20sur=20l'?= =?UTF-8?q?=C3=A9ligibilit=C3=A9=20de=20la=20mutuelle=20communale=20de=20m?= =?UTF-8?q?ontpellier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../montpellier/eligibilite_metropole_mutuelle.py | 8 ++++---- .../montpellier/montpellier_mutuelle_communale.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py b/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py index a09b29f6..9e243589 100644 --- a/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py +++ b/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py @@ -1,16 +1,16 @@ from openfisca_france.model.base import Menage, MONTH, Variable -class montpellier_eligibilite_residence(Variable): +class montpellier_mutuelle_eligibilite_residence(Variable): value_type = bool entity = Menage definition_period = MONTH - label = "Éligibilité résidentielle d'un ménage aux dipositifs de la métropole de Montpellier" + label = "Éligibilité résidentielle d'un ménage à la mutuelle communale de la métropole de Montpellier" reference = "https://encommun.montpellier.fr/articles/2024-12-19-lagence-de-la-mutuelle-communale-de-montpellier-est-ouverte" def formula(menage, period): - return sum(menage('depcom', period) == code for code in [ + return any(menage('depcom', period) == code for code in [ b'34172', # Montpellier - b'34077', # Clapier + b'34077', # Clapiers b'34090', # Le Crès b'34179', # Murviel-lès-Montpellier b'34256', # Saint-Geniès-des-Mourgues diff --git a/openfisca_france_local/communes/montpellier/montpellier_mutuelle_communale.py b/openfisca_france_local/communes/montpellier/montpellier_mutuelle_communale.py index 09037bf9..f62e8ded 100644 --- a/openfisca_france_local/communes/montpellier/montpellier_mutuelle_communale.py +++ b/openfisca_france_local/communes/montpellier/montpellier_mutuelle_communale.py @@ -10,7 +10,7 @@ class montpellier_mutuelle_communale(Variable): ] def formula(famille, period): - eligibilite_residentielle = famille.demandeur.menage('montpellier_eligibilite_residence', period) + eligibilite_residentielle = famille.demandeur.menage('montpellier_mutuelle_eligibilite_residence', period) css_participation_forfaitaire = famille('css_participation_forfaitaire', period) cmu_c = famille('cmu_c', period) eligibilite_css_cmu_c = (css_participation_forfaitaire > 0) | cmu_c From 0991a308f12aa088164be9545f241fbd307dca52 Mon Sep 17 00:00:00 2001 From: Jeremy PASTOURET Date: Thu, 2 Jan 2025 11:18:24 +0100 Subject: [PATCH 6/7] =?UTF-8?q?fix:=20incrementation=20du=20num=C3=A9ro=20?= =?UTF-8?q?de=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc8be553..dd71c942 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [6.17.2] - 2024-12-27 +## [6.17.3] - 2024-12-27 _Pour les changements détaillés et les discussions associées, référencez la pull request [#221](https://github.com/openfisca/openfisca-france-local/pull/221)_ diff --git a/setup.py b/setup.py index 45618825..6e314726 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='OpenFisca-France-Local', - version='6.17.2', + version='6.17.3', author='OpenFisca Team', author_email='contact@openfisca.fr', classifiers=[ From 4abec457d75430ce44b0e38896260b803ad81f02 Mon Sep 17 00:00:00 2001 From: Jeremy PASTOURET Date: Thu, 2 Jan 2025 14:24:58 +0100 Subject: [PATCH 7/7] fix: gestion d'eligibilite --- .../communes/montpellier/eligibilite_metropole_mutuelle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py b/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py index 9e243589..77a52505 100644 --- a/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py +++ b/openfisca_france_local/communes/montpellier/eligibilite_metropole_mutuelle.py @@ -8,11 +8,11 @@ class montpellier_mutuelle_eligibilite_residence(Variable): reference = "https://encommun.montpellier.fr/articles/2024-12-19-lagence-de-la-mutuelle-communale-de-montpellier-est-ouverte" def formula(menage, period): - return any(menage('depcom', period) == code for code in [ + return sum(menage('depcom', period) == code for code in [ b'34172', # Montpellier b'34077', # Clapiers b'34090', # Le Crès b'34179', # Murviel-lès-Montpellier b'34256', # Saint-Geniès-des-Mourgues b'34307' # Sussargues - ]) + ]) > 0