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 #157 Clean tests output #158

Merged
merged 15 commits into from
Jun 15, 2023
Merged

Closes #157 Clean tests output #158

merged 15 commits into from
Jun 15, 2023

Conversation

averissimo
Copy link
Collaborator

@averissimo averissimo commented Jun 14, 2023

(my OCD kicked in a bit, this is low low priority and can be merged on the next version)

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 devel branch until you have checked off each task.

Changes Description

  • Replaces repetitive chunk that would change formatting of cli with a function that does that and preserves the cleanup after test runs
    • Adds a temporary envvar called NO_COLOR to chunk of code that cleans cli messages
      • Why? colored output has the following string: \033[34myada\033[39m that cannot be easily regexp
      • testthat should clean this themselves, but for some bug they don't
  • Uses suppressMesssages, withr::local_message_sink(tempfile()) to catch output that is not important for tests

image

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.
  • Check that your Pull Request is targeting the devel branch, Pull Requests to main should use the Release Pull Request Template
  • Code is formatted according to the tidyverse style guide. Use styler package and functions to style files accordingly.
  • 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)
  • Address any updates needed for vignettes and/or templates
  • Link the issue Development Panel so that it closes after successful merging.
  • Fix merge conflicts
  • Pat yourself on the back for a job well done! Much love to your accomplishment!

@averissimo averissimo requested a review from EeethB June 14, 2023 11:07
@averissimo
Copy link
Collaborator Author

averissimo commented Jun 14, 2023

Do we need to keep the dput function? As it stands, it doesn't do anything other than write to the console (per the documentation)

@EeethB @elimillera @bms63

This ready for review, I would just like to clear this (in case I need to revert that)

@averissimo averissimo linked an issue Jun 14, 2023 that may be closed by this pull request
@averissimo averissimo requested review from elimillera and removed request for elimillera and EeethB June 14, 2023 11:15
_pkgdown.yml Outdated
@@ -44,13 +44,3 @@ reference:
navbar: ~
contents:
- xportr

- title: internal
Copy link
Collaborator Author

@averissimo averissimo Jun 14, 2023

Choose a reason for hiding this comment

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

Replaced by Roxygen2 tag @keyword internal that does the same

@bms63 bms63 marked this pull request as ready for review June 15, 2023 15:41
@bms63
Copy link
Collaborator

bms63 commented Jun 15, 2023

Hey @elimillera just checking on the dput function issue identified above.

@bms63 bms63 self-requested a review June 15, 2023 17:17
Copy link
Member

@elimillera elimillera left a comment

Choose a reason for hiding this comment

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

yep dput can be removed here

@bms63 bms63 merged commit 94abf9e into devel Jun 15, 2023
@bms63 bms63 deleted the 157-clean-tests-output branch June 15, 2023 17:44
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.

Clean output of tests (removing unnecessary messages)
3 participants