Closed cbenz closed 7 years ago
@fpagnoux @MattiSG I'm not sure about the best way to test this PR with Watai. I'm open to propositions.
Displays:
I find it difficult to distinguish the different groups.
Suggestion: make the bottom border thicker and darker like this:
I'm not sure about the best way to test this PR with Watai
What is the difficulty you are encountering ? Testing the table ?
@fpagnoux I'd like to have some suggestions about which new Watai test to write.
🚨 FORCE PUSH DETECTED DURING REWIEW🚨 👮 🚔
New rendering after my new commit:
I don't know if it is the right place to make the following remarks but I put the here anyway:
Some afterthoughts:
Entre 0.0 et 9700.0
seems clearer to me than Au dessus de 0.0
. While À partir du
is clear and simple for date ranges, I'm not sure it's limpid for marginal tax brackets (which are often misunderstood by many people).Date | Tranche | Taux marginal |
---|
About testing, following the spirit of the current tests, I'd have the following scenario :
/impot_revenu.bareme
pageIf there is in france
a case of a marginal scale that doesn't exist anymore (@benjello ?) , I'd also test its first line.
I would not test the values of the row span, rates and threshold, as this would make our tests break at any parameter update. This is a hole in our test net, but the maintenance cost is too high (except if one day we decide to run the tests on a dummy country).
- Rate should represented as percentage values i.e 5,5 %
So far, we are not handling units in the new version of the API and therefore in the legislation explorer. This may come later.
So far, we are not handling units in the new version of the API and therefore in the legislation explorer.
@fpagnoux But if you suggest adding a header with "Taux marginaux", why not adding a %
unit?
@fpagnoux @benjello Is this rendering OK for you (I took it from a random website)?
For the first bracket, if we say Entre 0.0 et 9700.0
, I think 9700
is included.
But for the following brackets, would it be Entre 9701 et 26791
?
Is it worth doing the + 1
operation?
Given this data from the API:
{
"0.0": 0.0,
"9700.0": 0.14,
"26791.0": 0.3,
"71826.0": 0.41,
"152108.0": 0.45
}
0.0
) is a starting value of the first bracket9700.0
, [...], 152108.0
) are stop values of the previous bracketI didn't see it explained explicitly in https://github.com/openfisca/openfisca-web-api/issues/107 so I wanted to make it clear.
My last commit renders like that:
Is is OK?
I would not add the +1
, I find it misleading.
Conceptually you pay 0%
for what is under 9700
and 14%
for what is above 9700
.
9701
only plays a role because the income to tax happens to be rounded before applying the scale. Without rounding, which may be the case for some scales, it doesn't make sense: with 9700.5, I'm already in the 2nd bracket.
Also, when I read Entre 9701 et...
, I understand that my 9701th euro won't be taxed, which is not the case.
So far, we are not handling units in the new version of the API and therefore in the legislation >explorer.
@fpagnoux But if you suggest adding a header with "Taux marginaux", why not adding a
%
unit?
You're right. As we are in the case of a marginal scale, we know the unit is percent, so 👍 for me.
Connected to #73 Fixes #74
The fix of #74 is needed for this PR, it is not a "two-features" PR ;-)