-
Notifications
You must be signed in to change notification settings - Fork 75
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
Input variables with an ETERNITY period require a month to be specified #669
Comments
Thanks @jmhbnz for having taken the time to document this issue! 😃 I notice that France's Mes Aides also defines I would expect this to be declared just as |
Agreed, but I think the point that was raised during the Web API design was to have homogenous objects. Allowing the suggested shortcut would give up inhomogenous inputs (and possibly outputs) such as: "birth": "1987-04-01",
"salary": {
"2017-01": 2000
} I think the main way of dealing with "birth": {
"ETERNITY": "1987-04-01"
},
"salary": {
"2017-01": 2000
} which is less "absurd", more semantic but... heavy and not really intuitive. In practice, users such as mes-aides just put a random month instead of explicitly using the "ETERNITY" key, because it gives the same result, and is probably less work on their side. |
Haaahahaa yes it was. Actually, that's totally the aim: you can only use a date or So I suggest we just go with improving documentation and error message and see if that re-surfaces later. |
Actually I find this to be quite related to openfisca/openfisca-doc#141 (and loosely to #670 as well considering just how many practices were mentioned there that I did not know about). We need a pass on the periods documentation. |
@MattiSG do you thing adding an example with ETERNITY in the error message would be enough to make it clear? Something like: {
"persons": {
"Alicia": {
"birth": "Invalid type: must be of type object. Input variables must be set for specific periods. For instance: {'salary': {'2017-01': 2000, '2017-02': 2500}}, or {'birth_date': {'ETERNITY': '1980-01-01'}}."
}
}
} |
PR opened: #688. |
With documentation in the API section, that would be enough for me, yes:
|
Ok. Feel free to add any suggestion on how you think the periods doc should evolve on openfisca/openfisca-doc#141. I'm meanwhile closing this issue, as I think the question has been answered, and the improvement suggestions have been documented in other issues or merged. Feel free to re-open it if you think it's not the case 🙂 . |
Hi there!
When setting an ETERNITY input variable I was not expecting to have to define a month.
Here is my input variable:
Here is what is required to set that input via API:
For an ETERNITY value I believe specifying a month shouldn't be necessary?
The text was updated successfully, but these errors were encountered: