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

Setup testthat #158

Closed
wants to merge 4 commits into from
Closed

Setup testthat #158

wants to merge 4 commits into from

Conversation

dan-knight
Copy link
Contributor

@dan-knight dan-knight commented Oct 9, 2023

Description

Previously, package tests were contained in a single file under tests/test_plotting_functions.R. These tests were run simply by sourcing the file, which violates testing best practices with numerous obvious drawbacks. To conform to both R and Boutros Lab standards, the package should use testthat instead.

Checklist

  • This PR does NOT contain PHI or germline genetic data. A repo may need to be deleted if such data is uploaded. Disclosing PHI is a major problem.

  • This PR does NOT contain molecular files, compressed files, output files such as images (e.g. .png, .jpeg), .pdf, .RData, .xlsx, .doc, .ppt, or other non-plain-text files. To automatically exclude such files using a .gitignore file, see here for example.

  • I have read the code review guidelines and the code review best practice on GitHub check-list.

  • I have set up or verified the main branch protection rule following the github standards before opening this pull request.

  • The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].

  • I have added the major changes included in this pull request to the NEWS under the next release version or unreleased, and updated the date. I have also updated the version number in DESCRIPTION according to semantic versioning rules.

  • Both R CMD build and R CMD check run successfully.

Testing Results

> devtools::test()
ℹ Testing BoutrosLab.plotting.general
✔ | F W S  OK | Context
✔ |         2 | plotting.functions                                                      

══ Results ═════════════════════════════════════════════════════════════════════════════
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 2 ]

@dan-knight dan-knight added the testing Testing for existing functionality label Oct 9, 2023
@dan-knight dan-knight requested a review from a team as a code owner October 9, 2023 17:46
This was referenced Oct 9, 2023
aholmes
aholmes previously approved these changes Oct 9, 2023
@dan-knight
Copy link
Contributor Author

Closing, as these changes were also included in #165

@dan-knight dan-knight closed this Apr 29, 2024
@dan-knight dan-knight deleted the danknight-setup-testthat branch April 29, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Testing for existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants