Skip to content

Address #100#138

Open
wlandau wants to merge 11 commits intorichfitz:masterfrom
wlandau:master
Open

Address #100#138
wlandau wants to merge 11 commits intorichfitz:masterfrom
wlandau:master

Conversation

@wlandau
Copy link
Copy Markdown

@wlandau wlandau commented Oct 29, 2016

I added functions example_remake() and list_examples_remake()
to generate and list examples for remake (R/examples.R). I also added
testthat tests (tests/testthat/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.

The file inst/example/README.md has instructions for using and creating examples.
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.

I also changed the DESCRIPTION to better accommodate R CMD check --as-cran.
I capitalized more words in the title to satisfy the formatting guidelines, and I substituted the
entry in authors@R with a call to the person() function.

Lastly, I added .DS_Store and .Rapp.history to .gitignore and .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.

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.
@codecov-io
Copy link
Copy Markdown

codecov-io commented Oct 29, 2016

Current coverage is 89.23% (diff: 100%)

Merging #138 into master will increase coverage by 0.03%

@@             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          

Powered by Codecov. Last update 7a70405...af0a2c7

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.
@wlandau
Copy link
Copy Markdown
Author

wlandau commented Nov 1, 2016

I forgot to mention: I think this PR is ready for review.

@richfitz
Copy link
Copy Markdown
Owner

richfitz commented Nov 1, 2016

Thanks - I'll get through this soon. I'm still thinking about the interface here though

@wlandau
Copy link
Copy Markdown
Author

wlandau commented Nov 1, 2016

Sure, I understand. Just thought I'd say something since I made so many post hoc commits.

@richfitz
Copy link
Copy Markdown
Owner

richfitz commented Nov 4, 2016

Xref: #54

@wlandau
Copy link
Copy Markdown
Author

wlandau commented Nov 20, 2016

Any new thoughts on the interface? If you have something else in mind, maybe I could help.

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.

3 participants