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 #40 use pharmaversesdtm to host dm_peds and vs_peds #84

Merged

Conversation

zdz2101
Copy link
Collaborator

@zdz2101 zdz2101 commented Aug 2, 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?
  • 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 # admiralpeds (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 admiralpeds 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!

Copy link

github-actions bot commented Aug 2, 2024

Code Coverage

Package Line Rate Health
admiralpeds 99%
Summary 99% (267 / 271)

@zdz2101 zdz2101 marked this pull request as ready for review August 2, 2024 18:13
@zdz2101
Copy link
Collaborator Author

zdz2101 commented Aug 2, 2024

Shouldn't actually be necessary to merge and close this but to demo the migration assuming the goes through this is done

@rossfarrugia rossfarrugia linked an issue Aug 5, 2024 that may be closed by this pull request
rmarkdown,
stringr (>= 1.4.0),
testthat (>= 3.0.0),
tibble
Remotes: pharmaverse/pharmaversesdtm@admiralpeds_data_migration
Copy link
Collaborator

Choose a reason for hiding this comment

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

@zdz2101 this bit can be removed and you could get this and pharmaverse/pharmaversesdtm#115 ready for review now, and think should be good timing for me and @Fanny-Gautier to take a look in the coming weeks

Copy link
Collaborator Author

@zdz2101 zdz2101 Aug 23, 2024

Choose a reason for hiding this comment

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

I think the steps go:

  1. merge the pharmaversesdtm PR first
  2. remove this line
  3. see if this PR still works with the removal of pharmaversdtm:: as well, because I think it'll still rely on a remotes until the pharmaversesdtm package is re-released to a new version

Copy link
Collaborator

Choose a reason for hiding this comment

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

Plus Step 4) add an adsl_peds and advs_peds to pharmaverseadam. we can make an issue for this later after all these steps

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As for adsl_peds and advs_peds it seems there was some ongoing discussion about what is appropriate to house in there as the datasets for that package are made from the templates in admiral see discussion from this issue

Copy link
Collaborator

@rossfarrugia rossfarrugia Aug 29, 2024

Choose a reason for hiding this comment

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

I think they mean any admiral package templates incl extensions here, as they do have ADaMs created from ophtha, onco, vaccine templates for example at https://github.com/pharmaverse/pharmaverseadam/tree/main/data

#'
#' advs <- dm_peds %>%
#' advs <- pharmaversesdtm::dm_peds %>%
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be able to remove pharmaversesdtm:: - i don't think we usually include these. i guess this was just for testing purposes

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

to demonstrate it works being in pharmaversesdtm if its actually in there, yes

Copy link
Contributor

@Fanny-Gautier Fanny-Gautier left a comment

Choose a reason for hiding this comment

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

2 minor comments in the vignette and template.
Also, does it require a notification in NEWS.md ?

@@ -180,7 +181,7 @@ who_wt_for_lgth <- who_wt_for_lgth_boys %>%
# as needed and assign to the variables below.
# For illustration purposes read in admiral test data

data("vs_peds")
vs_peds <- vs_peds
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this line of code necessary ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

you're probably right that this could be removed

Copy link
Collaborator

Choose a reason for hiding this comment

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

@zdz2101 don't we still need the data("xxx") lines though to load the data from the pharmaversesdtm package? see https://github.com/pharmaverse/admiral/blob/main/inst/templates/ad_advs.R for example (lines 18 and 19)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also agree we should have a NEWS.md entry for this change - if you merge latest main branch here i've started off the headers for this for next release

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess that data() has been dropped as per following discussion.
I was only wondering whether we need vs_peds <- vs_peds, or make it clear in a comment where it comes from since removing data(vs_peds) could be confusing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah thanks, sorry i had missed that latest admiral core issue/discussion around replacing the data(xxx) usage

@@ -230,7 +232,7 @@ include the pediatrics-specific parameters as needed - for example:
| BMIPCTL | BMI-for-age percentile | 10 | Subject Characteristic | 1 |

```{r echo=FALSE, message=FALSE}
data("vs_peds")
vs_peds <- vs_peds
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this line of code really necessary ?

@zdz2101
Copy link
Collaborator Author

zdz2101 commented Sep 10, 2024

@Fanny-Gautier @rossfarrugia made the appropriate updates that use the :: convention that was in the admiral discussion

@rossfarrugia
Copy link
Collaborator

@zdz2101 we should add something to NEWS file in this PR. I think Fanny is busy with project work so if you want to merge pharmaverse/pharmaversesdtm#115, and then we can get this one merged too and ticked off the list.

@Fanny-Gautier
Copy link
Contributor

@zdz2101 we should add something to NEWS file in this PR. I think Fanny is busy with project work so if you want to merge pharmaverse/pharmaversesdtm#115, and then we can get this one merged too and ticked off the list.

Sorry for not having followed much these last few days. I am currently over busy with Study work and the R-Pharma workshop preparation. Please do not hesitate to ping me in Slack for any request which require my attention... I'll add them on my to do list.
In the mean time, I'l add this PR review on my list for tomorrow ;-) Thanks

Copy link
Contributor

@Fanny-Gautier Fanny-Gautier left a comment

Choose a reason for hiding this comment

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

I think there have been some confusion while calling the data in the templates/ad_advs.R. Please double check and update accordingly.

data(who_lgth_ht_for_age_boys)
data(who_lgth_ht_for_age_girls)
data(cdc_htage)
who_lgth_ht_for_age_boys <- admiralpeds::who_wt_for_age_boys
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't you reverse the calls at lines 74 with lines 115 ?
e.g. should be who_lgth_ht_for_age_boys <- admiralpeds::who_lgth_ht_for_age_boys

data(who_lgth_ht_for_age_girls)
data(cdc_htage)
who_lgth_ht_for_age_boys <- admiralpeds::who_wt_for_age_boys
who_lgth_ht_for_age_girls <- admiralpeds::who_wt_for_age_girls
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't you reverse the calls at lines 75 with lines 116 ?
e.g. should be who_lgth_ht_for_age_girls <-admiralpeds::who_lgth_ht_for_age_girls

data(who_wt_for_age_boys)
data(who_wt_for_age_girls)
data(cdc_wtage)
who_wt_for_age_boys <- admiralpeds::who_lgth_ht_for_age_boys
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't you reverse the calls at lines 74 with lines 115 ?
e.g. should be who_wt_for_age_boys <- admiralpeds::who_wt_for_age_boys

data(who_wt_for_age_girls)
data(cdc_wtage)
who_wt_for_age_boys <- admiralpeds::who_lgth_ht_for_age_boys
who_wt_for_age_girls <- admiralpeds::who_lgth_ht_for_age_girls
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't you reverse the calls at lines 75 with lines 116 ?
e.g. should be who_wt_for_age_girls <- admiralpeds::who_wt_for_age_girls

NEWS.md Outdated Show resolved Hide resolved
zdz2101 and others added 2 commits October 9, 2024 09:41
Co-authored-by: Ross Farrugia <82581364+rossfarrugia@users.noreply.github.com>
Copy link
Contributor

@Fanny-Gautier Fanny-Gautier left a comment

Choose a reason for hiding this comment

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

Looks good now.

@rossfarrugia
Copy link
Collaborator

Great - thanks @Fanny-Gautier ! @zdz2101 when you get chance are you ok to merge and do a quick test run of main now that {pharmaversesdtm} is updated too. Then the final step would be making an issue for adsl_peds and advs_peds in {pharmaverseadam}.

@zdz2101 zdz2101 merged commit 627aaf7 into main Oct 16, 2024
15 of 16 checks passed
@zdz2101 zdz2101 deleted the 40-move-test-data-out-to-pharmaversesdtm@admiralpeds_data_migration branch October 16, 2024 14:04
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.

Move test data out to {pharmaversesdtm} and {pharmaverseadam}
3 participants