More additional tests on data in regional data - #312
Open
RichardMN wants to merge 7 commits into
Open
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
8 tasks
Closed
Contributor
Author
|
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. |
40 tasks
|
This PR has been flagged as stale due to lack of activity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
downloadoption because these tests only make sense withdownload = TRUE.The files and possibly the functions probably should be renamed.
It calls
get_regional_dataand 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.