OpenFisca-France 168.0.2__py3-none-any.whl → 168.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of OpenFisca-France might be problematic. Click here for more details.

@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 168.0.3 [2339](https://github.com/openfisca/openfisca-france/pull/2339)
4
+
5
+ * Changement mineur.
6
+ * Périodes concernées : à partir du 01/01/2020
7
+ * Zones impactées : `openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/travail_non_salarie.py`.
8
+ * Détails :
9
+ - Corrige une division par zero dans la formule de `maladie_maternite_artisan_commercant_taux`
10
+
11
+
3
12
  ## 168.0.2 [2336](https://github.com/openfisca/openfisca-france/pull/2336)
4
13
 
5
14
  * Changement mineur.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: OpenFisca-France
3
- Version: 168.0.2
3
+ Version: 168.0.3
4
4
  Summary: French tax and benefit system for OpenFisca
5
5
  Home-page: https://github.com/openfisca/openfisca-france
6
6
  Author: OpenFisca Team
@@ -1,5 +1,5 @@
1
- OpenFisca_France-168.0.2.data/data/share/openfisca/openfisca-france/CHANGELOG.md,sha256=wf9VG--OjgsXGJf9Jc2i9i1QIKhbLYHNPDfWQizL4vU,447087
2
- OpenFisca_France-168.0.2.data/data/share/openfisca/openfisca-france/README.md,sha256=nIa6V4zevZpj2DX1rcpgs6AATTerCCy4622S1D3-CDI,18642
1
+ OpenFisca_France-168.0.3.data/data/share/openfisca/openfisca-france/CHANGELOG.md,sha256=aXjTe2-9ohzifaEdJM-CJXLdhcHYhbhcB5ZQ14cTLvs,447484
2
+ OpenFisca_France-168.0.3.data/data/share/openfisca/openfisca-france/README.md,sha256=nIa6V4zevZpj2DX1rcpgs6AATTerCCy4622S1D3-CDI,18642
3
3
  openfisca_france/__init__.py,sha256=MHLZ0V8uQHi4lkZ5bPAoLjsWTJe-wJgLfPxFvbCCxHc,126
4
4
  openfisca_france/entities.py,sha256=nGl52ncj9wZzFwASKZk4_OHzhqOUuXGBxNmIiwxZU-c,2576
5
5
  openfisca_france/france_taxbenefitsystem.py,sha256=UHVqvkqqYk-9RanSPWlVy3uieG77GCSrWCOqVpeN30I,1687
@@ -68,7 +68,7 @@ openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisation
68
68
  openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/preprocessing.py,sha256=FyxqYwgpcEGwjEgc3tdhW4r5KZKtaKoB9Ah6kNqDz9Q,25173
69
69
  openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/stage.py,sha256=9AHP_zThKouQcwQw-cZMFCSYV56crYxunGCjUlv1gRA,7272
70
70
  openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/travail_fonction_publique.py,sha256=e7S0PGhfjvCMRuKox1xnnnZBZ4yNHBs-f5fBVb5rRdI,16228
71
- openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/travail_non_salarie.py,sha256=7JpU18ZR4qRYXUIab0MFR0ghGOMTFL2EkHP3bwQN9hc,24680
71
+ openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/travail_non_salarie.py,sha256=Qmvr-UruYGlj3Ay8WDT49uXUbwSanSVpeXCn7PpE4PU,24851
72
72
  openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/travail_prive.py,sha256=Nc-M5kqqFi_1YpxvkvYQHG65-3Iddu_I8wHvD51gkso,44647
73
73
  openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/travail_totaux.py,sha256=vHJWfH0s0BYqbup9pcZisAI3cKGXlmBTdLYzWJOxgNA,9967
74
74
  openfisca_france/model/prelevements_obligatoires/taxe_habitation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -4015,8 +4015,8 @@ tests/test_parameters.py,sha256=9ByrtcJpaV32qCE-u4FY4fzCugFUW8utc5_KUAmYKG8,354
4015
4015
  tests/test_preprocessing.py,sha256=BBMFR4GlFFqu86XfVcrHRbps_SpoWb1QS1lmu3c5bCE,6973
4016
4016
  tests/test_scenarios.py,sha256=A7SmVt_iyDTbNTE45WgGQlQZkJ0uJ1ZGUhTV3ziwLUw,1009
4017
4017
  tests/test_tax_rates.py,sha256=B_CnSIqCijGYkKW7XVZlF8uot0otNJ-Sq-DKINPATfA,1551
4018
- OpenFisca_France-168.0.2.dist-info/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
4019
- OpenFisca_France-168.0.2.dist-info/METADATA,sha256=hHs8WwDVwQWWE9TzYv_NEEL1VpgPWaeCmMwFChduL3I,20517
4020
- OpenFisca_France-168.0.2.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
4021
- OpenFisca_France-168.0.2.dist-info/top_level.txt,sha256=hmd7WhmLN_CyB52sP702pN9WlJqO9YMVuzeBRNp3hfs,23
4022
- OpenFisca_France-168.0.2.dist-info/RECORD,,
4018
+ OpenFisca_France-168.0.3.dist-info/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
4019
+ OpenFisca_France-168.0.3.dist-info/METADATA,sha256=M7zaobswX-T7NVES3S9-Eu9wvhCADEkvWmbNs_8EiWw,20517
4020
+ OpenFisca_France-168.0.3.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
4021
+ OpenFisca_France-168.0.3.dist-info/top_level.txt,sha256=hmd7WhmLN_CyB52sP702pN9WlJqO9YMVuzeBRNp3hfs,23
4022
+ OpenFisca_France-168.0.3.dist-info/RECORD,,
@@ -1,10 +1,9 @@
1
1
  import logging
2
-
2
+ import numpy as np
3
3
 
4
4
  from openfisca_core.taxscales import MarginalRateTaxScale
5
5
  from openfisca_france.model.base import *
6
6
 
7
-
8
7
  # TODO:
9
8
  # Manquent:
10
9
  # - les agriculteurs
@@ -193,11 +192,17 @@ class maladie_maternite_artisan_commercant_taux(Variable):
193
192
  ) * individu('rpns_imposables', period)
194
193
  assiette_pss = assiette / plafond_securite_sociale_annuel
195
194
 
196
- taux = where(assiette_pss != 0, (
197
- 0.0085 + ((0.041 - 0.0085) * min_(max_(assiette_pss, 0), 0.4) / 0.4)
198
- + ((0.072 - 0.041) * min_(max_((assiette_pss) - 0.4, 0), 0.7) / (1.1 - 0.4))
199
- - (0.007 * (assiette_pss > 5) * ((assiette_pss - 5) / assiette_pss))
200
- ), 0)
195
+ taux_nul = np.zeros(len(categorie_non_salarie))
196
+ taux = np.divide(
197
+ (
198
+ 0.0085 + ((0.041 - 0.0085) * min_(max_(assiette_pss, 0), 0.4) / 0.4)
199
+ + ((0.072 - 0.041) * min_(max_((assiette_pss) - 0.4, 0), 0.7) / (1.1 - 0.4))
200
+ - (0.007 * (assiette_pss > 5) * (assiette_pss - 5))
201
+ ),
202
+ assiette_pss,
203
+ out = taux_nul,
204
+ where=assiette_pss != 0
205
+ )
201
206
 
202
207
  return artisan * taux
203
208