Open
Conversation
I added functions list_examples_remake, example_remake, and clean_example_remake to generate and clean up remake examples. example_remake(.., clean = TRUE) calls clean_example_remake instead of generating the files. I also added testthat tests (test-examples.R), all of which pass. A call to covr::package_coverage says that 100% of the code in examples.R is covered in tests. To add a new example, simply add a folder in inst/examples with the name of your example. Check the quickstart example for a primer. To take full advantage of the cleanup capabilities of clean_example_remake, each example should have a file named remake.yml file as its root YAML file. I also changed the DESCRIPTION TO better satisfy R CMD check --as-cran. I capitalized more words in the title to satisfy formatting, and substituted the entry in authors@R with a call to the person function. Lastly, I added .DS_Store to .gitignore and .Rbuildignore since I'm coding on a macbook.
Current coverage is 89.23% (diff: 100%)@@ master #138 diff @@
==========================================
Files 26 27 +1
Lines 2324 2331 +7
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 2073 2080 +7
Misses 251 251
Partials 0 0
|
Explains how to use and create examples.
The previous commit of the PR was broken because I added README.md. Fixed now.
Examples can now have nested folders (example_remake()).
Point out that hidden files in examples will not be copied over by `example_remake()`.
Make it show the name of the example if verbose = T.
Just copy the whole example folder rather than trying to write the files and then clean them up programatically
Verbosity is unnecessary since cleaning is dropped.
Other examples will need their own tests.
Author
|
I forgot to mention: I think this PR is ready for review. |
Owner
|
Thanks - I'll get through this soon. I'm still thinking about the interface here though |
Author
|
Sure, I understand. Just thought I'd say something since I made so many post hoc commits. |
Owner
|
Xref: #54 |
Author
|
Any new thoughts on the interface? If you have something else in mind, maybe I could help. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added functions
example_remake()andlist_examples_remake()to generate and list examples for remake (
R/examples.R). I also addedtestthattests (tests/testthat/test-examples.R), all of which pass. A call tocovr::package_coverage()says that 100% of the code inexamples.Riscovered in tests.
The file
inst/example/README.mdhas instructions for using and creating examples.To add a new example, simply add a folder in
inst/exampleswith the name ofyour example. Check the
quickstartexample for a primer.I also changed the
DESCRIPTIONto better accommodateR CMD check --as-cran.I capitalized more words in the title to satisfy the formatting guidelines, and I substituted the
entry in
authors@Rwith a call to theperson()function.Lastly, I added
.DS_Storeand.Rapp.historyto.gitignoreand.Rbuildignore.I realize that it may seem a bit forward and presumptuous of me to submit a PR to
master. If you would like to decline and then maybe create new separate branch for the next attempt, I can resubmit it there.