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

test coverage of at least 75% #23

Open
e-kotov opened this issue Jul 13, 2024 · 2 comments
Open

test coverage of at least 75% #23

e-kotov opened this issue Jul 13, 2024 · 2 comments
Assignees

Comments

@e-kotov
Copy link
Owner

e-kotov commented Jul 13, 2024

https://devguide.ropensci.org/pkg_building.html#testing

To quote key relevant points from the guidelines:

  • All packages should have a test suite that covers major functionality of the package. The tests should also cover the behavior of the package in case of errors.

  • It is good practice to write unit tests for all functions, and all package code in general, ensuring key functionality is covered. Test coverage below 75% will likely require additional tests or explanation before being sent for review.

...

...

  • testthat has a function skip_on_cran() that you can use to not run tests on CRAN. We recommend using this on all functions that are API calls since they are quite likely to fail on CRAN. These tests should still run on continuous integration. Note that from testthat 3.1.2 skip_if_offline() automatically calls skip_on_cran(). More info on CRAN preparedness for API wrappers.

...

  • Even if you use continuous integration, we recommend that you run tests locally prior to submitting your package (you might need to set Sys.setenv(NOT_CRAN="true")).
@e-kotov e-kotov added this to the prepare for rOpenSci review milestone Jul 13, 2024
@e-kotov
Copy link
Owner Author

e-kotov commented Jul 13, 2024

Consider test writing approach of {opentripplanner}, as it has test for functions to fetch online jars of opentripplanner and has passed through the rOpenSci review (submission, pre-submission).

@e-kotov
Copy link
Owner Author

e-kotov commented Jul 13, 2024

Consider {r5r}'s tests for downloading jars.

@e-kotov e-kotov self-assigned this Jul 13, 2024
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

No branches or pull requests

1 participant