Skip to content

Closes #98 - minor word changes in README.md#99

Closed
jimrothstein wants to merge 7 commits intomainfrom
98_add_comments
Closed

Closes #98 - minor word changes in README.md#99
jimrothstein wants to merge 7 commits intomainfrom
98_add_comments

Conversation

@jimrothstein
Copy link
Copy Markdown
Collaborator

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 pharmaverseadam site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new datasets 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!

@jimrothstein jimrothstein marked this pull request as draft February 25, 2025 20:36
@jimrothstein
Copy link
Copy Markdown
Collaborator Author

jimrothstein commented Feb 25, 2025

@manciniedoardo

DRAFT
Added only a few comments, just to start.
README.md is very good; you are correct.

@jimrothstein
Copy link
Copy Markdown
Collaborator Author

Not right approach. I have another idea ....

@jimrothstein
Copy link
Copy Markdown
Collaborator Author

jimrothstein commented Feb 26, 2025

I think this is closer to useful but not in form of code comments

  • line 164, find path to ADaM templates for the installed pkg (~/R/86_64...library/4.4/admiral/templates)
  • line 166, collect names of all these templates (ad_xxxx.R)
  • line 168, find path to Rdata files for installed pkg (~/R/86_64...library/4.4/admiral/data)
  • line 178, apply run_template() function to templates (ad_xxxx.R)
    main
    Better approach?

@jimrothstein
Copy link
Copy Markdown
Collaborator Author

jimrothstein commented Feb 26, 2025

  • 87 cmd is of the form "Rscript" and the R template file to run
  • 88 actually runs the template file using Rscript
  • 93 finds path to local cache directory
  • 95 rda_file is of the form ad_xxxx.rda
  • 97 data is actual ADaM as a tibble. The function load_rda() loads the tibble in its execution environment and returns the tibble.
  • 113 saves this ADaM tibble in the source for this package, pharmaverseadam/data
    run_template

@jimrothstein
Copy link
Copy Markdown
Collaborator Author

@manciniedoardo

Not ready for true review.

  • Goal: document script that creates ADaM files.
    Idea was to add comments. But for my own understanding, I find annotating lines -- see above -- to be clearest. Also, several directories are involved.

  • So what I'd like to do is explain the big picture first in 2-3 sentences and list the directories to be used.
    Then code comments might be easier to follow.

If OK, I'll go ahead and do this.

@jimrothstein jimrothstein self-assigned this Mar 12, 2025
@jimrothstein
Copy link
Copy Markdown
Collaborator Author

@manciniedoardo
Appreciate if you take a look, but I DO NEED to go through comments again.
So asking what you think so far.
(Some comments are not mine, some comments need to cleaned, need to redo the introduction).

@jimrothstein jimrothstein marked this pull request as ready for review March 12, 2025 18:38
Copy link
Copy Markdown
Collaborator

@manciniedoardo manciniedoardo left a comment

Choose a reason for hiding this comment

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

Thanks @jimrothstein! Left some comments

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread data-raw/create_adams_data.R Outdated
data <- write_labels(data, dataset_name, suffix)

# save it to pharmaverseadam data package
# save file to pharmaverseadam data dir (pharmaverseadam/data/adae.rda)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# save file to pharmaverseadam data dir (pharmaverseadam/data/adae.rda)
# save file to pharmaverseadam data dir (pharmaverseadam/data/<adamname>.rda)

Copy link
Copy Markdown
Collaborator Author

@jimrothstein jimrothstein Mar 14, 2025

Choose a reason for hiding this comment

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

I will adopt your notation ( pharmaverseadam/data/<adamname>.rda)

Comment thread data-raw/create_adams_data.R Outdated
# copy paste pkg/data folder content to pharmaverseadam/data (some templates have dependency with their internal data,
# for example admiral templates have all dependencies with admiral_adsl dataset)


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i think we can keep this because it's useful for logging purposes

@jimrothstein
Copy link
Copy Markdown
Collaborator Author

@manciniedoardo
Made your changes ... thanks!

A few more changes/comments will make the code clearer, I think.

  • improve notation for files/directories.
  • a few more clarifying comments.
  • some prior comments are not helpful to me.

But first, do you feel it is worth the effort?

@manciniedoardo
Copy link
Copy Markdown
Collaborator

@manciniedoardo Made your changes ... thanks!

A few more changes/comments will make the code clearer, I think.

  • improve notation for files/directories.
  • a few more clarifying comments.
  • some prior comments are not helpful to me.

But first, do you feel it is worth the effort?

thanks @jimrothstein! absolutely, feel free to take it as far as you deem necessary.

@manciniedoardo manciniedoardo linked an issue Mar 14, 2025 that may be closed by this pull request
@jimrothstein
Copy link
Copy Markdown
Collaborator Author

@manciniedoardo UPDATE

An issue in admiral is to verify templates are working. (pharmaverse/admiral#2662)
This PR pharamaverseadam uses same templates to generate ADaMs.

Working with @StefanThoma on admiral issue.

Where the two scripts overlap, I hope to make variables, functions consistent .

Not there yet. When admiral script is more stable, will ask for your advice and suggestions.

@manciniedoardo
Copy link
Copy Markdown
Collaborator

@jimrothstein we just merged a small update to the documentation process that will have created a conflict, please merge main into this branch and accept the changes from main

@manciniedoardo
Copy link
Copy Markdown
Collaborator

@jimrothstein @StefanThoma maybe it would be good for us to meet at some point soon and discuss how this is going/next steps?

@jimrothstein
Copy link
Copy Markdown
Collaborator Author

Yes, discussion would be good.
(Also, having github problem; trying to resolve.)

@jimrothstein @StefanThoma maybe it would be good for us to meet at some point soon and discuss how this is going/next steps?

@shajoezhu
Copy link
Copy Markdown
Collaborator

can we please update this branch from main, and run a reverse dependency check before approving this
thanks

@manciniedoardo
Copy link
Copy Markdown
Collaborator

can we please update this branch from main, and run a reverse dependency check before approving this thanks

sure, but at the same time I'm not sure of the status of this PR anyway as create_adams_data.R file has been edited other times and for parallel efforts anyway.

@Fanny-Gautier
Copy link
Copy Markdown
Collaborator

Fanny-Gautier commented Aug 19, 2025

Closed without merging. Many of these updates were implemented in other PRs. Thanks a lot Jim for your comments and updates, they were very helpful to understand the workflow.

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.

General Issue: Add comments to raw-data/create_adams_data.R?

4 participants