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

Closes #2265 update basket_select function #2411

Merged
merged 16 commits into from
May 23, 2024
Merged

Closes #2265 update basket_select function #2411

merged 16 commits into from
May 23, 2024

Conversation

millerg23
Copy link
Collaborator

@millerg23 millerg23 commented Apr 17, 2024

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 main 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?
  • Review the Cheat Sheet. Make any required updates to it by editing the file inst/cheatsheet/admiral_cheatsheet.pptx and re-upload a PDF version of it to the same folder.
  • 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 under the header # admiral (development version) 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!

@millerg23 millerg23 linked an issue Apr 17, 2024 that may be closed by this pull request
@millerg23 millerg23 self-assigned this Apr 17, 2024
@millerg23
Copy link
Collaborator Author

@bundfussr @bms63 would appreciate an initial QC of what I have done. I need to create some tickets for the failing unit tests, these are due to ERROR message updates in admiraldev (there may already be tickets for all/some of them).
I think update allows us in Roche to handle Implementation Status for SMQs, and also reading output from get_meddra_basket_pt (Roche) function.
One question I had was around the format.basket_select function, is this still needed with the new ERROR messaging using cli_abort(), if it is, then this probably needs updated to handle the new ... argument (any tips welcome!)

NEWS.md Outdated Show resolved Hide resolved
compare = actual_output,
keys = c("PREFIX", "TERMCHAR")
)
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to have a test for when a user does this incorrectly?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Apologies - @millerg23 I gave a few cents here, but I'm not very familiar with these functions :(

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>
Copy link
Collaborator

@zdz2101 zdz2101 left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me, would be nice to add @bms63 's suggestion of not properly providing appropriate inputs for ... or some sort of break for the get_terms_fun but I don't think its absolutely necessary, since it depends so much more on an appropriately built get_xxx() function, we'll never be able to completely catch all the weird errors/use cases of user-built things like that

Copy link
Collaborator

@bundfussr bundfussr left a comment

Choose a reason for hiding this comment

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

I would not merge this PR before we have updated the get_terms() function in admiralroche. Then we are sure that we didn't miss anything and that the new functionality works as expected.

R/create_query_data.R Outdated Show resolved Hide resolved
R/create_query_data.R Outdated Show resolved Hide resolved
tests/testthat/test-create_query_data.R Outdated Show resolved Hide resolved
tests/testthat/test-create_query_data.R Show resolved Hide resolved
@bundfussr
Copy link
Collaborator

One question I had was around the format.basket_select function, is this still needed with the new ERROR messaging using cli_abort(), if it is, then this probably needs updated to handle the new ... argument (any tips welcome!)

Yes, it is still needed and it should be updated. I would display the extra arguments in the same way as the standard arguments, i.e., "<name> = <value>".

Copy link

This Pull Request is stale because it has not been worked on in 15 days.

@github-actions github-actions bot added the stale label May 15, 2024
Copy link

github-actions bot commented May 15, 2024

Code Coverage

Package Line Rate Health
admiral 97%
Summary 97% (4697 / 4826)

millerg23 and others added 3 commits May 15, 2024 12:52
Co-authored-by: Stefan Bundfuss <80953585+bundfussr@users.noreply.github.com>
@github-actions github-actions bot removed the stale label May 16, 2024
@millerg23
Copy link
Collaborator Author

I updated unit tests and format.basket_select. Can you please review again.

@millerg23
Copy link
Collaborator Author

BTW should I fix links in this MR, or is something going wrong elsewhere? Its not related to these changes.

@millerg23
Copy link
Collaborator Author

@bms63 myself and Stefan had a meeting, and with these updates it satisfies the Roche needs for company specific options. Let me know if I need to do anything else.

@bms63 bms63 merged commit 0655873 into main May 23, 2024
16 checks passed
@bms63 bms63 deleted the 2265_extend_get_terms branch May 23, 2024 11:33
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.

Feature Request: Enable passing additional arguments to get_terms()
4 participants