DataONEorg / scythe

Scythe, the data citation harvester
Other
7 stars 2 forks source link

refactor tests for CRAN #11

Closed mbjones closed 3 years ago

mbjones commented 3 years ago

In preparing for a CRAN release, we should add skip_on_cran() or donttest for any tests, examples, or other code that requires internet access. Tests should never reach out to external services according to CRAN policy. This may not be needed now while we are testing before our first CRAN release, but it might be easier to incorporate now so that we are more ready.

mbjones commented 3 years ago

Turns out that, after R 4.0, \donttest tests are still run on CRAN, and instead need to use \dontrun. Investigate further, and ensure our examples are not being run if they require either a keyring password or network access.

mbjones commented 3 years ago

I refactored examples to include \dontrun so they examples pass CRAN checks. So closing. We may want to revisit this and think if any examples make sense in the CRAN context, given the CRAN prohibition on network access in examples and tests.