Closed kindly closed 3 years ago
I would suggest checking for complete="0" at validation time and not excluding them from the mapping file altogether.
Absolutely – that sounds like a good plan. A PR to that effect would be welcome!
I suspect the current arrangement was a shortcut, since these mappings were only used for validation. The commit message where this was added seems to suggest this: 03912da7.
I’ve made a start at a PR, but it breaks tests currently.
Describe the bug
Some codelists are not getting into the mapping file. This is when complete="0" is in the codelist file.
To Reproduce
All the recipient-country codelists mappings are not in
__iatikitcache__/standard/codelist_mappings/203/activity-mappings.json
Expected behavior
The mappings should be in that file. However when it comes to doing validation the complete="0" codelists should not be used. I would suggest checking for complete="0" at validation time and not excluding them from the mapping file altogether.
They are excluded here:
https://github.com/codeforIATI/iatikit/blob/dev/iatikit/utils/download.py#L117