Introduce error margin by variable in tests#1149
Conversation
nikhilwoodruff
left a comment
There was a problem hiding this comment.
Great, thanks @benjello. This will be useful in both UK and US systems.
|
Hi @benjello ! Thanks for your contribution. Could you please write a couple of lines so I or an other reviewers can understand the motivation for this PR? Just
Quickly from reading the code this is what I got:
Nota bene: I'm intrigued as we have three kinds of logic in OpenFisca that mix up: data-objects (entities, periods, enums...), modelling (parameters, formulas, variables...), and the intricacies of actual calculations (simulations, tax scales, error margins...). IMHO, if the latter is needed by the community they should be first-class citizens, but also be appropriately encapsulated, which isn't the case today. |
tests/fixtures/yaml_tests/failing_test_variable_absolute_error_margin.yaml
Outdated
Show resolved
Hide resolved
tests/fixtures/yaml_tests/failing_test_variable_absolute_error_margin.yaml
Outdated
Show resolved
Hide resolved
tests/fixtures/yaml_tests/failing_test_variable_relative_error_margin.yaml
Outdated
Show resolved
Hide resolved
|
This goes beyond the PR because error margin logic already exist in OF, but to be clear, when we say income tax has a relative margin error of 5%, we're saying just that income tax can have an absolute margin error of |
See above for the definition of relative error margin |
22fa906 to
e79638f
Compare
|
@maukoquiroga : does my answer clarify the PR. May be we can make it clearer in the doc after merging the PR. |
Yes, I understand better. The reason I ask all this questions is to make it easier for any reviewer out there to get the logic and review the code, and eventually accept/reject the proposal. I certainly have no grounds to reject it now that I understand the value it adds, however I wasn't able to review the actual implementation of it without that understanding. I hope to give you a proper review soon if nobody gives you one before. |
|
@nikhilwoodruff @maukoquiroga : I do need a final approval to merge this PR ;-) |
104b8f0 to
b3fa81f
Compare
b3fa81f to
5ccbf04
Compare
5ccbf04 to
ed98b36
Compare
Thanks for contributing to OpenFisca! Remove this line, as well as any other in the following that don't fit your contribution :)
New features