-
Notifications
You must be signed in to change notification settings - Fork 76
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
Expose AmountTaxScale by Web API #756
Conversation
@sandcha : I am all fot ir but I am not sure I am the more able to review it ... |
Thx @benjello! If you reproduce the error for The API really works when the following command response is a welcome to the Web API: Besides, the structure of the response should be similar to a response for a scale parameter with It could also be checked it with another country model to confirm that it doesn't come with new bugs. ^^ |
@sandcha : I agree that the unit brings the right information. |
After reviewing this IRL, some remarks:
|
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.
Tests?
A more REST approach would be to properly separate internal and external representations... Wouldn't a |
"We can start |
Unfortunately no, due to substantial (and, to @sandcha and I, unsuspected) technical debt in that area (I think I'm using the term advisedly here, as opposed to "cruft", since @sandcha informs me this was a conscious decision to rapidly ship substantial changes in the API's external representation). There are two layers of objects to be concerned with:
Why?
|
It seems like we're tampering our own rules. If the way we're testing the API now is a constraint, what can we do to exploit, subordinate or elevate it? Isn't fixturing/mocking for this specific case better than no testing at all? Isn't this too urgent that we cannot wait for the PR and review cycle?
Tests must be automated, predictable and idempotent. If by adding |
Let's see what we can do. @sandcha I'll be adding commits / rebasing. |
5c8f4dc
to
1333531
Compare
@maukoquiroga New test in |
Fair enough. If they don't share the same protocol, those objects become hard to dispatch.
I bit beyond the scope of my initial comment, but I agree in Python type checking has it's good use for static analysis, not for control flow. |
I modified this pull request myself, so I'm dismissing my review.
5ac914e
to
245b7e1
Compare
New features
amount
keys in Web APIExample: See this parameter in openfisca-tunisia.
Note:
Scales with
amount
key already exist in Core but for the moment, the Web API exposes only one type of scale: scales withrate
key.This missing type generates an error on
openfisca-tunisia
Web API and this PR comes to fix it.Details:
Calling the following command:
With:
Leads to the following error: