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

Restructuring of examples: some \donttest where previously \dontrun #134

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

mvkorpel
Copy link
Contributor

Now more examples can be run with just example(funcname) without an extra run.dontrun=TRUE, which was problematic anyway, as there was (and is) some unrunnable code inside \dontrun. The \donttest examples are not run by R CMD check, so there's no major increase to check times. My intention also was to keep all possibly problematic (terms of service etc.) examples in \dontrun.

Some more examples (some of which are new) are now outside \dontrun and donttest. All of these work without network access. This increases the code coverage of the tests run by R CMD check. It is also easy to run the donttest examples (no unrunnable code now) with R CMD check --run-donttest.

When adding a simple urlonly=TRUE example for mapdist, I discovered that the option was broken. A fix for that is included. This pull request also includes the changes made in #133.

Fixes cases where there are multiple destinations with the same origin
address.
Moved some examples from \dontrun to regular examples which are
run with R CMD check and example(<function>). Also added some
simple examples if no suitable examples existed. A common feature
to these is that they don't require network access.

List of functions affected:

* LonLat2XY (new example)
* XY2LonLat
* file_drawer
* geocode
* get_googlemap
* get_stamenmap
* mapdist (also fixed the function for urlonly=TRUE)
* mutate_geocode (more code moved to \dontrun)
* revgeocode (new example)
* route (new example)
* theme_inset (more code moved to \dontrun)
* trek (new example)
\donttest examples are skipped by R CMD check but run by
example(<function>) without any extra options. What remains in
\dontrun is non-functional code (like register_google() with dummy
key) and code using constrained resources (osm tiles) or code
otherwise restricted by license agreements.
Commit history is now a bit messy. The intent is to enable applying
the changes in this branch on top of previous changes in my other
branches.
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.

1 participant