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

fix bug for check population and observation grouping NA #137

Merged
merged 4 commits into from
Mar 27, 2023

Conversation

wangben718
Copy link
Collaborator

@wangben718 wangben718 commented Mar 24, 2023

When checking 'grouping' variable missing or not, we were using the input population/observation dataset. We should check the dataset after subset by population/observation term.

Copy link
Collaborator

@nanxstats nanxstats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the snapshots should be changed here - you should use the latest version of r2rtf on CRAN: Merck/r2rtf#137.

Also, I would recommend always filling out the description field of a pull request to provide sufficient context besides the title.

@BrianLang
Copy link
Collaborator

I don't think the snapshots should be changed here - you should use the latest version of r2rtf on CRAN: Merck/r2rtf#137.

Also, I would recommend always filling out the description field of a pull request to provide sufficient context besides the title.

Are you suggesting that maybe @wangben718 is not using the most current version of r2rtf and this is why the snapshots are different on his local machine compared to what GitHub actions is using?

@wangben718
Copy link
Collaborator Author

I tried to re-install r2rtf both from CRAN and github. I have got the same RTF output as I pushed.

One another thing, I saw an error for passing build check but I could not find the details under the 'Checks' tab. Is there anything changed in our package?

@BrianLang
Copy link
Collaborator

I think the checks got lost due to the automated pushing of the styler updates (which don't trigger checks)
https://github.com/Merck/metalite.ae/actions/runs/4508311581. has the test failures, and the artifacts which can be used to check what is different between new / old snapshots.

@wangben718
Copy link
Collaborator Author

I think the checks got lost due to the automated pushing of the styler updates (which don't trigger checks) https://github.com/Merck/metalite.ae/actions/runs/4508311581. has the test failures, and the artifacts which can be used to check what is different between new / old snapshots.

Got it! Thanks for your clarification.

@BrianLang
Copy link
Collaborator

I think the checks got lost due to the automated pushing of the styler updates (which don't trigger checks) https://github.com/Merck/metalite.ae/actions/runs/4508311581. has the test failures, and the artifacts which can be used to check what is different between new / old snapshots.

Got it! Thanks for your clarification.

It's not actually clear to me that the artifacts uploaded give the new snapshots...

Assuming Nan is right and there is no reason for the snaps to have been updated, a short term fix is to revert back the snaps in your branch to those on the master branch.
From your branch you can always grab the version of the snaps which are on the master branch by calling this while on your dev branch:
git checkout main -- tests/testthat/_snaps/<file name>

@wangben718
Copy link
Collaborator Author

a short term fix is to revert back the snaps in your branch to those on the master branch.
From your branch you can always grab the version of the snaps which are on the master branch by calling this while on your dev branch:

Yes, we can revert back. Actually it is not the first time I got an unexpected updated snapshot from function related to r2rtf. Is it probably beacuse the original snapshot are using a old version r2rtf?

@BrianLang
Copy link
Collaborator

a short term fix is to revert back the snaps in your branch to those on the master branch.
From your branch you can always grab the version of the snaps which are on the master branch by calling this while on your dev branch:

Yes, we can revert back. Actually it is not the first time I got an unexpected updated snapshot from function related to r2rtf. Is it probably beacuse the original snapshot are using a old version r2rtf?

yeah it's also not clear to me what's going on, but I'm currently experiencing this with our mkhecon dev work and disparities between Jenkins and local snapshots of rtfs...

@nanxstats
Copy link
Collaborator

OK, I re-generated (reverted) the RTF snapshots using the CRAN version of r2rtf.

Are you suggesting that maybe @wangben718 is not using the most current version of r2rtf and this is why the snapshots are different on his local machine compared to what GitHub actions is using?

@BrianLang Yes, that is exactly what I was saying. More accurately, it's about not using the "most current version from CRAN".

I tried to re-install r2rtf both from CRAN and github. I have got the same RTF output as I pushed.

@wangben718 Maybe you think you are using it, but you are not actually using it. Double check where you are loading your packages from.

@@ -93,6 +67,31 @@ prepare_ae_specific <- function(meta,
pop_group <- collect_adam_mapping(meta, population)$group
obs_group <- collect_adam_mapping(meta, observation)$group

# Check if the grouping variable is missing
# pop_grp <- vapply(meta$population, "[[", FUN.VALUE = character(1), "group")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't have commented out code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't have commented out code.

I haved removed the code. Thanks for review!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @nanxstats , since @wangben718 already removed the comments, I directly merged this PR to the master, considering there are two teammates who need the package for slide preparation early this week...

@LittleBeannie LittleBeannie dismissed nanxstats’s stale review March 27, 2023 13:38

Hi @nanxstats , since @wangben718 already removed the comments, I directly merged this PR to the master, considering there are two teammates who need the package for slide preparation early this week...

@LittleBeannie LittleBeannie merged commit 1fce189 into main Mar 27, 2023
@LittleBeannie LittleBeannie deleted the bug_fix_checkna branch March 27, 2023 13:38
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.

4 participants