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 #223 Test code clean up #248

Merged
merged 14 commits into from
Mar 14, 2024
Merged

Closes #223 Test code clean up #248

merged 14 commits into from
Mar 14, 2024

Conversation

sadchla-codes
Copy link
Collaborator

@sadchla-codes sadchla-codes commented Feb 22, 2024

Thank you for your Pull Request!

We have developed a Pull Request template to aid you and our reviewers. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the xportr codebase remains robust and consistent.

The scope of {xportr}

{xportr}'s scope is to enable R users to write out submission compliant xpt files that can be delivered to a Health Authority or to downstream validation software programs. We see labels, lengths, types, ordering and formats from a dataset specification object (SDTM and ADaM) as being our primary focus. We also see messaging and warnings to users around applying information from the specification file as a primary focus. Please make sure your Pull Request meets this scope of {xportr}. If your Pull Request moves beyond this scope, please get in touch with the {xportr} team on slack or create an issue to discuss.

Please check off each task box as an acknowledgment that you completed the task. 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.

Changes Description

(descriptions of changes)

Task List

  • The spirit of xportr is met in your Pull Request
  • Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
  • Summary of changes filled out in the above Changes Description. Can be removed or left blank if changes are minor/self-explanatory.
  • Code is formatted according to the tidyverse style guide. Use styler package and functions to style files accordingly.
  • New functions or arguments follow established convention found in the Wiki.
  • Updated relevant unit tests or have written new unit tests. See our Wiki for conventions used in this package.
  • Creation/updated relevant roxygen headers and examples. See our Wiki for conventions used in this package.
  • Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
  • Run pkgdown::build_site() and check that all affected examples are displayed correctly and that all new/updated functions occur on the "Reference" page.
  • 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)
  • The NEWS.md entry should go under the # xportr development version section. Don't worry about updating the version because it will be auto-updated using the vbump.yaml CI.
  • Address any updates needed for vignettes and/or templates.
  • Link the issue Development Panel so that it closes after successful merging.
  • The developer is responsible for fixing merge conflicts not the Reviewer.
  • Pat yourself on the back for a job well done! Much love to your accomplishment!

@sadchla-codes sadchla-codes marked this pull request as draft February 22, 2024 05:40
@sadchla-codes sadchla-codes linked an issue Feb 22, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Feb 28, 2024

Code Coverage

Package Line Rate Health
xportr 100%
Summary 100% (785 / 785)

@@ -759,10 +759,12 @@ test_that("xportr_*: Domain is kept in between calls", {
# end

test_that("`xportr_metadata()` results match traditional results", {

if (requireNamespace("magrittr", quietly = TRUE)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

{magrittr} is on Imports in the DESCRIPTION file.

We can safely assume it is installed and remove all of these requreNamespace("magrittr", ...)

@sadchla-codes sadchla-codes marked this pull request as ready for review March 6, 2024 07:47
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.

Did you use the admiraldev add-in for this? If not, maybe we should look into making that a standalone tool

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we still need the haven and readxl packages in these tests?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can they be removed so the lintr becomes happy again?

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.

Can we just suspend the lintr check for indentation and just have the styler one?

Also can these lines be returned onto the next line where appropriate?

image

@sadchla-codes
Copy link
Collaborator Author

Did you use the admiraldev add-in for this? If not, maybe we should look into making that a standalone tool

I did use admiraldev add-in

@sadchla-codes sadchla-codes requested a review from bms63 March 8, 2024 16:48
DESCRIPTION Outdated
@@ -36,13 +36,13 @@ Imports:
readr,
rlang (>= 0.4.10),
stringr (>= 1.4.0),
tidyselect
tidyselect,
readxl
Copy link
Collaborator

Choose a reason for hiding this comment

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

where are we using this? how come it got moved from Suggest to Imports?

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.

im weary to move readxl to Imports? why are we doing this?

@sadchla-codes
Copy link
Collaborator Author

im weary to move readxl to Imports? why are we doing this?

Hi @bms63 it was given me a dependency error in the R CMD check, but i made some slight updates. It seems to be working great now and readxl is back to suggest

@bms63
Copy link
Collaborator

bms63 commented Mar 14, 2024

Thanks for organizing and cleaning up our test code. Much nicer!!!

@bms63 bms63 merged commit 473dbe9 into main Mar 14, 2024
15 checks passed
@bms63 bms63 deleted the 223_clean_test_code branch March 14, 2024 14:42
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.

Cleanup of test code
3 participants