Skip to content
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

use full demo data in test to avoid problem using new demo data #521

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

cjyetman
Copy link
Member

@cjyetman cjyetman commented Nov 3, 2023

Presumably, these lines restricted the number of lines of demo data being used to improve performance (?), but this makes the test very sensitive to legitimate changes in the demo datasets, e.g. if the explicitly specified rows no longer contain matching rows. An incoming update to the demo datasets in RMI-PACTA/r2dii.data#316 will make this test fail, but this PR will allow it to pass by removing the explicit filtering of rows.

lbk <- r2dii.data::loanbook_demo[1:10, ]
abcd <- r2dii.data::abcd_demo[795:800, ]

EDIT: also had to update a snapshot to take into account a newly added (by rlang developers, unrelated to this PR) <rlang_message> tag so that tests here pass

EDIT: tests still fail because apparently existing release version of r2dii.data::abcd_demo year column is type <double> instead of <integer> even though the script to create it explicitly sets it to <integer>. Tempted to just let that slide here because the new version of r2dii.data::abcd_demo will be properly typed and that test will then pass.

Presumably, these lines restricted the number of lines of demo data being used to improve performance (?), but this makes the test very sensitive to legitimate changes in the demo datasets, e.g. if the explicitly specified rows no longer contain matching rows. An incoming update to the demo datasets in RMI-PACTA/r2dii.data#316 will make this test fail, but this PR will allow it to pass by removing the explicit filtering of rows.
https://github.com/RMI-PACTA/r2dii.plot/blob/b4b87e8a3fe0a07367b1de15ef097250507f258e/tests/testthat/test-market_share.R#L43-L44
@cjyetman cjyetman requested review from gbdubs, jdhoffa, MonikaFu, jacobvjk and AlexAxthelm and removed request for gbdubs November 3, 2023 11:40
@cjyetman cjyetman merged commit 1583870 into main Nov 7, 2023
10 of 22 checks passed
@cjyetman cjyetman deleted the fix-test-for-new-demo-data branch November 7, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants