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

Add section on testing R packages #1999

Merged
merged 3 commits into from
Feb 21, 2024
Merged

Add section on testing R packages #1999

merged 3 commits into from
Feb 21, 2024

Conversation

mfansler
Copy link
Member

This fills out some guidance on testing R packages, with some specific directions on running testthat tests (a common testing framework).

Note that one could have a simpler looking recipe by installing the tests (add --install-tests to build command) and test with testthat::test_package('PackageName'). However, I've omitted that since I believe it preferable to avoid delivering the test files to end users unnecessarily. Instead, I provide only the boilerplate that gives the same functionality sans copying. This is personally what I've shifted toward, but I still have some older recipes that install the tests.

Happy to take suggestions!

PR Checklist:

  • note any issues closed by this PR with closing keywords
  • put any other relevant information above

@mfansler mfansler requested a review from a team as a code owner August 26, 2023 23:43
@mfansler
Copy link
Member Author

@conda-forge/r feel free to adjust or make suggestions!

@mfansler
Copy link
Member Author

mfansler commented Sep 7, 2023

@conda-forge/core ready for review

Copy link
Member

@jdblischak jdblischak left a comment

Choose a reason for hiding this comment

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

I think this is great advice. Especially when the test suite runs quickly, I think it makes sense to explicitly test the installed R package when building the recipe. Thanks @mfansler for writing up this documentation!

@mfansler
Copy link
Member Author

mfansler commented Dec 5, 2023

@conda-forge/core nudge

@mfansler
Copy link
Member Author

@conda-forge/core bump

@xhochy
Copy link
Member

xhochy commented Feb 19, 2024

Can you rebase this? Then we should be able to merge.

@jaimergp
Copy link
Member

For clarity, adding_pkgs is now under sphinx/src/maintainer/adding_pkgs/, but other than that it shouldn't have received too many updates. Just make sure the lists render properly in the Netlify preview (the Markdown renderer is a bit strict with indentation and preceding whitespace).

Copy link

netlify bot commented Feb 20, 2024

Deploy Preview for conda-forge-previews ready!

Name Link
🔨 Latest commit 1918f76
🔍 Latest deploy log https://app.netlify.com/sites/conda-forge-previews/deploys/65d4dd73e808bd000809578e
😎 Deploy Preview https://deploy-preview-1999--conda-forge-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mfansler
Copy link
Member Author

Rebased; rendered preview LGTM.

@xhochy xhochy merged commit 6bd084f into conda-forge:main Feb 21, 2024
5 checks passed
@mfansler mfansler deleted the r-tests branch February 21, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants