Conversation
|
CI should be fixed by #981. |
|
Output from web-api should be checked before merging. |
63447bd to
f6172d9
Compare
f6172d9 to
4e66961
Compare
|
@benjello can you please confirm this should not damage vectorial computation performance? |
|
Documentation update can be reviewed at openfisca/openfisca-doc#234. |
I do not see how this could damage vectorial computation. LGTM. |
|
API output tested manually on a fork of the country template, got the following result: {
"description": "Array types should be allowed.",
"id": "general.array_type",
"metadata": {},
"source": "https://github.com/openfisca/country-template/blob/3.12.4/openfisca_country_template/parameters/general/array_type.yaml",
"values": {
"2018-06-01": ["ES", "FR", "IT", "NZ"],
"2013-01-01": ["FR"]
}
}Not sure about how the legislation explorer will format these results, though. |
| # It is now recommended to include them in metadata, until a common consensus emerges. | ||
| COMMON_KEYS = {'description', 'metadata', 'unit', 'reference', 'documentation'} | ||
| ALLOWED_PARAM_TYPES = (float, int, bool, type(None)) | ||
| ALLOWED_PARAM_TYPES = (float, int, bool, type(None), typing.List) |
There was a problem hiding this comment.
Any preference between typing.List and just List? Asking just for consistency (current usage is from typing import XXX, but that is not consistent with other libraries usage, for example numpy and so on).
There was a problem hiding this comment.
Could you use from typing import List just for consistency? Otherwise GTM :)
|
|
||
| def test_array_type(): | ||
| path = os.path.join(BASE_DIR, 'array_type.yaml') | ||
| load_parameter_file(path, 'array_type') |
There was a problem hiding this comment.
| load_parameter_file(path, 'array_type') | |
| assert load_parameter_file(path, 'array_type') |
There was a problem hiding this comment.
It will anyway pass as it is a truthy value -otherwise it would fail. Just a proposition for reader's clarity.
bonjourmauko
left a comment
There was a problem hiding this comment.
Thanks for this contribution! Looks good to me ✨
Co-authored-by: Mauko Quiroga <hello@mauko.me>
Co-authored-by: Mauko Quiroga <hello@mauko.me>
f646d36 to
77d5808
Compare
|
@maukoquiroga @benjello you approved this PR —thanks again! 🙂 Would you mind spending 3 minutes reviewing the associated doc update? It's really short and would avoid an outdated documentation to create confusion: openfisca/openfisca-doc#234 |
Technical changes
This was added to move more constants into parameters. For example, in OpenFisca-France: https://github.com/openfisca/openfisca-france/blob/master/openfisca_france/model/caracteristiques_socio_demographiques/demographie.py#L3-L35
TODO :