-
Notifications
You must be signed in to change notification settings - Fork 16
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
More additional tests on data in regional data #312
base: master
Are you sure you want to change the base?
More additional tests on data in regional data #312
Conversation
Checks that the number of regions at level 2 >= the number of regions at level 1 Checks that there is at most 1 level 1 region coded to NA Checks that there is at most 1 level 2 region coded to NA Checks that the number of level 1 regions is identical in download of level 1 and level 2 dat
It's now hard to see from the comparison against the older version of the branch what this changes, but the changes are fairly minor. I think it probably useful to have roughly three separate strands of tests (which may not all be framed as tests):
I think this PR and #307 are both trying to provide something like 3, and that it's useful to have. It's sort of a canary. It's not necessary and we've done without it for a long time. I can tinker with my PR and am happy to try to work with @joseph-palmer on #307, but also content if the feeling right now is that this can be put aside in favour of other efforts. |
This PR has been flagged as stale due to lack of activity |
Implementation of more tests from #302, intended to be merged into #307
Checks that the number of regions at level 2 >= the number of regions at level 1
Checks that there is at most 1 level 1 region coded to NA
Checks that there is at most 1 level 2 region coded to NA
Checks that the number of level 1 regions is identical in download of level 1 and level 2 dat
This is a rough implementation.
It currently has a stand-alone wrapper to apply purrr because it only is run once for each country class, but then needs to be told what is the maximum level available from that country class. Notionally, this could allow us to go beyond level 2, but the code doesn't have that recursive flexibility yet. It may be possible to merge the wrapper with the existing file. I've removed the
download
option because these tests only make sense withdownload = TRUE
.The files and possibly the functions probably should be renamed.
It calls
get_regional_data
and I think it doing this since this is the "front end" for most users and there could still be glitches between the data class and the output ofget_regional_data
.It's not quick.