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 #2501-general-issue-make-subject-keys-flexible-in-all-functions #2516

Merged

Conversation

ProfessorP-beep
Copy link
Collaborator

@ProfessorP-beep ProfessorP-beep commented Oct 1, 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 and a PNG version of it to the same folder. (The PNG version can be created by taking a screenshot of the PDF version.)
  • 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). A Developer Notes section is available in NEWS.md for tracking developer-facing issues.
  • 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!

…rs argument to use get_admiral_option("subject_keys"). Came across an issue during pkgdown checklist with bds_exposure.R lines 365-366 with !!!adsl_vars
…must've pulled by mistake.

Updated Functions and fixed an error when replacing UBSUBJID, STUDYID with get_admiral_options("Subject_keys)
…posure.Rmd line 365 but still get Argument `enexpr(analysis_var)` must be a <symbol>, but is missing.
…01-general-issue-make-subject-keys-flexible-in-all-functions
@ProfessorP-beep ProfessorP-beep linked an issue Oct 1, 2024 that may be closed by this pull request
Copy link
Collaborator Author

@ProfessorP-beep ProfessorP-beep left a comment

Choose a reason for hiding this comment

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

I had an issue when doing pkgdown::build_site() with the bds_exposure script giving an error for line 365. Tried to update that too but its still throwing back an error. I'm pushing the changes for now while I sort out review errors.

@ProfessorP-beep ProfessorP-beep changed the title 2501-general-issue-make-subject-keys-flexible-in-all-functions Closes #2501-general-issue-make-subject-keys-flexible-in-all-functions Oct 1, 2024
Copy link

github-actions bot commented Oct 2, 2024

Code Coverage

Package Line Rate Health
admiral 97%
Summary 97% (4978 / 5140)

@ProfessorP-beep
Copy link
Collaborator Author

ProfessorP-beep commented Oct 2, 2024

I had an issue when doing pkgdown::build_site() with the bds_exposure script giving an error for line 365. Tried to update that too but its still throwing back an error. I'm pushing the changes for now while I sort out review errors.

My fault, I just had to update Rtools, and finding where errors in the test scripts that used the updated functions was easier.

NEWS.md Outdated Show resolved Hide resolved
NEWS.md Outdated Show resolved Hide resolved
R/derive_vars_transposed.R Outdated Show resolved Hide resolved
R/derive_vars_transposed.R Outdated Show resolved Hide resolved
tests/testthat/test-create_single_dose_dataset.R Outdated Show resolved Hide resolved
tests/testthat/test-create_single_dose_dataset.R Outdated Show resolved Hide resolved
tests/testthat/test-derive_vars_transposed.R Outdated Show resolved Hide resolved
vignettes/bds_exposure.Rmd Show resolved Hide resolved
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 Oct 24, 2024
@ProfessorP-beep
Copy link
Collaborator Author

Sorry, I'll get this fixed by the weekend. Work got hectic and preparing for an interview!

@github-actions github-actions bot removed the stale label Oct 25, 2024
@ProfessorP-beep
Copy link
Collaborator Author

ProfessorP-beep commented Oct 30, 2024

I just noticed that after I run styler it misaligns the tables in the test scripts again. I can correct and we can just accept the failed styler check?

@bundfussr
Copy link
Collaborator

I just noticed that after I run styler it misaligns the tables in the test scripts again. I can correct and we can just accept the failed styler check?

Usually styler preserves alignment in tables if

  • all columns including the header are left or right aligned and
  • the first column is left aligned.

I think when you aligned the tables you centered most of the columns. This is not considered as aligned by styler.

@bms63
Copy link
Collaborator

bms63 commented Nov 12, 2024

I fixed the news here - noticed something else got messed up from another PR with the news.

@bundfussr was there anything else that we needed to fix here?

@bundfussr
Copy link
Collaborator

I fixed the news here - noticed something else got messed up from another PR with the news.

@bundfussr was there anything else that we needed to fix here?

@bms63 , the news are fine now.

Just the alignment of the tribble() calls is pending.

@bms63
Copy link
Collaborator

bms63 commented Nov 12, 2024

@bundfussr I think I am confused by styler request. I have run styler and no changes are implemented for alignment

image

I think styler wants to put in a space after the comma so we can't align the data to the header anyways as the studyid takes up more room now. Let me know what I am missing, but if you have the time can you just fix this how you want it as I guess I am not following.

@bundfussr
Copy link
Collaborator

@bundfussr I think I am confused by styler request. I have run styler and no changes are implemented for alignment

image

I think styler wants to put in a space after the comma so we can't align the data to the header anyways as the studyid takes up more room now. Let me know what I am missing, but if you have the time can you just fix this how you want it as I guess I am not following.

@bms63 , I've aligned the tribble() calls.

Copy link
Collaborator

@bms63 bms63 left a comment

Choose a reason for hiding this comment

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

So you want character values manually left aligned and numeric values right aligned?

Wondering if we automate this as I am never going to remember to do this?

@bms63 bms63 merged commit a1a4ec3 into main Nov 13, 2024
19 checks passed
@bms63 bms63 deleted the 2501-general-issue-make-subject-keys-flexible-in-all-functions branch November 13, 2024 14:31
@bundfussr
Copy link
Collaborator

So you want character values manually left aligned and numeric values right aligned?

That would be ideal for readability.

Wondering if we automate this as I am never going to remember to do this?

This would be really helpful but would require some work. An addin which aligns a selected tribble() call would be nice.

@bms63
Copy link
Collaborator

bms63 commented Nov 13, 2024

So you want character values manually left aligned and numeric values right aligned?

That would be ideal for readability.

Wondering if we automate this as I am never going to remember to do this?

This would be really helpful but would require some work. An addin which aligns a selected tribble() call would be nice.

@sadchla-codes sounds like a great candidate for https://github.com/pharmaverse/pharmaverse4devs

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: Make subject keys flexible in all functions
3 participants