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: derive_param_tte() fails for dplyr 1.1.0 #1965

Closed
wants to merge 10 commits into from
Closed

fix: derive_param_tte() fails for dplyr 1.1.0 #1965

wants to merge 10 commits into from

Conversation

SamantaTarun
Copy link

@SamantaTarun SamantaTarun commented Jun 22, 2023

Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.

Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the devel branch until you have checked off each task.

  • Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
  • Code is formatted according to the tidyverse style guide. Run styler::style_file() to style R and Rmd files
  • Updated relevant unit tests or have written new unit tests, which should consider realistic data scenarios and edge cases, e.g. empty datasets, errors, boundary cases etc. - See Unit Test Guide
  • If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
  • Update to all relevant roxygen headers and examples, including keywords and families. Refer to the categorization of functions to tag appropriate keyword/family.
  • Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
  • Address any updates needed for vignettes and/or templates
  • Update NEWS.md if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers)
  • Build admiral site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.
  • Address or fix all lintr warnings and errors - lintr::lint_package()
  • Run R CMD check locally and address all errors and warnings - devtools::check()
  • Link the issue in the Development Section on the right hand side.
  • Address all merge conflicts and resolve appropriately
  • Pat yourself on the back for a job well done! Much love to your accomplishment!

Closes #1962

What happened?

If dlpyr 1.1.0 is used, some tests for derive_param_tte() fail. They pass for dplyr 1.0.5 (minimum version required by admiraldev) and also for dplyr 1.1.1.

In derive_param_tte()

    full_join(
      mutate(by_groups, temp_dummy = 1),
      mutate(source_datasets[[i]], temp_dummy = 1),
      by = "temp_dummy",
      relationship = "many-to-many"
    ) %>%
    select(-temp_dummy)

should be replaced by

    crossing(
      by_groups,
      source_datasets[[i]]
    )

This is simpler and avoids the dplyr issue.

@bms63
Copy link
Collaborator

bms63 commented Jun 23, 2023

Hi Tarun. I have added you to the repo. Please use @devel at the end of your branch as this will get latest updates from the admiral depenednecy packages admiral.test and admiraldev

It will also give you the Pull Request TEmplate in your PR - not sure if that was removed or doesn't work with the fork. But the PR template will walk you through our conventions (testing, style, linting, etc) with links to our documentation.

Thanks again for jumping on this!

@bms63
Copy link
Collaborator

bms63 commented Jun 28, 2023

Hi @tarunsamanta2k20 do you need help with this PR - we were hoping to finish by the end of the week.

@SamantaTarun
Copy link
Author

SamantaTarun commented Jun 29, 2023

Hi @tarunsamanta2k20 do you need help with this PR - we were hoping to finish by the end of the week.

@bms63 style check is failing. i don't know why. please look into this.

@bms63
Copy link
Collaborator

bms63 commented Jun 29, 2023

Run this line of code -
image

@bms63
Copy link
Collaborator

bms63 commented Jun 29, 2023

Hey @tarunsamanta2k20 I put the checklist into your PR - I recommend following through each item as they will help you diagnose common issues you are facing - aslo be sure to check out our dev docs - https://pharmaverse.github.io/admiraldev/devel/articles/development_process.html

@bms63
Copy link
Collaborator

bms63 commented Jun 30, 2023

Hi @tarunsamanta2k20 thanks for trying to make this happen. We have this and several other bug fixes being worked on in #1987 - so will close this PR.

I think this was a tough issue to work on with being new to admiral. Could you try out #1839 and I can assist you on how to fix common issues from CI and R packages - then we can pick another issue for you to work on. HAppy to help and don't want to lose your enthusiasm!!

@bms63 i have pushed the latest changes to the branch. this time it worked. please look into this once.

@bms63 bms63 closed this Jun 30, 2023
@SamantaTarun SamantaTarun reopened this Jun 30, 2023
@SamantaTarun SamantaTarun reopened this Jun 30, 2023
@bms63
Copy link
Collaborator

bms63 commented Jun 30, 2023

image

these are failing - I believe this is due to not having @devel at the end of your branch.
https://pharmaverse.github.io/admiraldev/devel/articles/git_usage.html#create-a-new-feature-branch-from-github-from-devel

@SamantaTarun SamantaTarun deleted the tarun_samanta/#1962 branch June 30, 2023 16:09
@SamantaTarun SamantaTarun restored the tarun_samanta/#1962 branch June 30, 2023 16:10
@SamantaTarun SamantaTarun reopened this Jun 30, 2023
@SamantaTarun SamantaTarun deleted the tarun_samanta/#1962 branch June 30, 2023 16:13
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.

Bug: derive_param_tte() fails for dplyr 1.1.0
2 participants