-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spécifier toujours une période dans les appels de variables #699
Conversation
899d610
to
e5a6f60
Compare
Related to openfisca/openfisca-core#469 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci pour la rapidité !
Le code est ok pour moi, juste quelques remarques sur le changelog.
requirements.txt
Outdated
@@ -1,5 +1,5 @@ | |||
# Add Biryani extra requirement here because it is needed by OpenFisca-Core and installation from Git URL below | |||
# does not take extras_require of Core setup.py into account. | |||
Biryani[datetimeconv] >= 0.10.4 | |||
--editable git+https://github.com/openfisca/openfisca-core.git#egg=OpenFisca-Core | |||
--editable git+https://github.com/openfisca/openfisca-core.git@mandatory-period#egg=OpenFisca-Core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbenz il me semblait qu'on avait un script qui gérait ça automatiquement, il a été supprimé ? Ou il ne fonctionne juste plus ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il est toujours là, mais on avait décidé (à l'oral) de supprimer cela sachant que ça introduisait un comportement automatique et qu'on pouvait changer la branche dans requirements.txt
.
Coïncidence : je viens de poster une PR sur Web-API qui supprime le script en question sur le dépôt Web-API.
@@ -891,7 +891,7 @@ def function(self, simulation, period): | |||
''' | |||
salaire_net = simulation.calculate_add('salaire_net', period) | |||
depense_cantine_titre_restaurant_employe = simulation.calculate( | |||
'depense_cantine_titre_restaurant_employe') | |||
'depense_cantine_titre_restaurant_employe', period) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'était probablement une erreur je pense. @laem tu confirmes ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fpagnoux je n'utilise pas cette variable, c'est hors-champ dans le simulateur pour l'instant (c'est le monde des conventions collectives et accords entreprise), mais j'imagine que oui c'était un oubli.
CHANGELOG.md
Outdated
## 14.2.0 - [#685](https://github.com/openfisca/openfisca-france/pull/699) | ||
|
||
* Amélioration technique | ||
* Périodes concernées : toutes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cette ligne et la suivante ne sont nécessaires que dans le cas d'une évolution de la legislation. On peut les enlever ici.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CHANGELOG.md
Outdated
* Détails : | ||
- Spécifie toujours une période dans les appels de variables, dans les formules et dans les tests. | ||
|
||
Ces changements : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ce second bloc devrait être intégrés dans le bloc standardisé.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CHANGELOG.md
Outdated
Ces changements : | ||
- Adaptent `france` à la version `7.0.0` de `core`. | ||
- Corrigent des calculs déjà existants. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En fait cette PR fait deux choses :
- Elle adapte le package
france
au nouveaucore
, ce qui est uneAmélioration technique
- Elle corrige une erreur dans le calcul de
salaire_net_a_payer
, ce qui est uneÉvolution du système socio-fiscal
.
Je pense que ce serait plus lisible d'avoir deux blocs séparés.
e5a6f60
to
ed82b7e
Compare
@fpagnoux j'ai essayé de prendre en compte tes remarques sur le Changelog. Si tu estimes que c'est encore améliorable, n'hésite pas à éditer toi-même la branche (ou me dire quoi changer) |
Done. Pour les |
setup.py
Outdated
@@ -45,7 +45,7 @@ | |||
'Babel >= 0.9.4', | |||
'Biryani[datetimeconv] >= 0.10.4', | |||
'numpy >= 1.11', | |||
'OpenFisca-Core >= 6.0.0, < 7.0', | |||
'OpenFisca-Core >= 6.0.0, < 8.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michelbl On avait oublié ça
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
The `period` argument is no longer optional.
A call was made without a period. The period of the simulation was silently used instead. This introduced a computation error in cases where the period of the simulation was different.
Some variables requested computations without providing a period. The period of the simulation was used instead, potentially introducing computation errors.
05fa4aa
to
4a05478
Compare
Connected to openfisca/openfisca-core#468
Ces changements :
france
à la version7.0.0
decore
.