Re: [R-pkg-devel] Installing Tests with R Build

2017-11-23 Thread Joshua Ulrich
On Wed, Nov 22, 2017 at 4:21 PM, Bill Denney  wrote:
> Hi,
>
> I have a package that I'm trying to make a validation vignette for.  The 
> validation vignette is intended to assist users with documentation that the 
> tests work.
>
> When running R BUILD now (via Travis CI), I get an error that the build 
> failed trying to build the vignettes.  For R CMD install, I can add 
> --install-tests.  Is there a way to control R BUILD so that the installation 
> includes test installation?
>
Put the tests you want to install into a directory inside the inst/
directory (e.g. inst/tests/).  That directory will be copied to the
top-level of the installed package directory.

> Thanks,
>
> Bill
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



-- 
Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com
R/Finance 2017 | www.rinfinance.com

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Installing Tests with R Build

2017-11-23 Thread Dirk Eddelbuettel

On 23 November 2017 at 08:07, Joshua Ulrich wrote:
| On Wed, Nov 22, 2017 at 4:21 PM, Bill Denney  wrote:
| > I have a package that I'm trying to make a validation vignette for.  The 
validation vignette is intended to assist users with documentation that the 
tests work.
| >
| > When running R BUILD now (via Travis CI), I get an error that the build 
failed trying to build the vignettes.  For R CMD install, I can add 
--install-tests.  Is there a way to control R BUILD so that the installation 
includes test installation?
| >
| Put the tests you want to install into a directory inside the inst/
| directory (e.g. inst/tests/).  That directory will be copied to the
| top-level of the installed package directory.

Which happens to be the default mode of operations with RUnit.

And it is a feature that I happen to _like_ a great deal because it permits
testing of the _installed_ package which is something you need in real life
when eg some of you system libraries may have change.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Installing Tests with R Build

2017-11-23 Thread Bill Denney
Hi Joshua and Dirk,

> On Nov 23, 2017, at 10:17, Dirk Eddelbuettel  wrote:
> 
> 
> On 23 November 2017 at 08:07, Joshua Ulrich wrote:
> | On Wed, Nov 22, 2017 at 4:21 PM, Bill Denney  wrote:
> | > When running R BUILD now (via Travis CI), I get an error that the build 
> failed trying to build the vignettes.  For R CMD install, I can add 
> --install-tests.  Is there a way to control R BUILD so that the installation 
> includes test installation?
> | >
> | Put the tests you want to install into a directory inside the inst/
> | directory (e.g. inst/tests/).
> 
> Which happens to be the default mode of operations with RUnit.
> 
> And it is a feature that I happen to _like_ a great deal because it permits
> testing of the _installed_ package which is something you need in real life
> when eg some of you system libraries may have change.

Putting the tests there seems like a very reasonable solution to the immediate 
issue.  It contravenes the options to install (or not install) tests ("R CMD 
INSTALL --install-tests" loses meaning).  I'm going to update the structure of 
my vignette so that it detects if the tests are there and builds the vignette 
based on the existence of the tests (making it say "Please install the tests 
following these instructions...").

I'm immediately ok with reworking the directory structure and tests, but I 
think it would be preferable long run to:
Have R CMD BUILD gain an --install-args option so that installation arguments 
can be controlled (for situations like this and I'm sure others).

Thank you (and Happy Thanksgiving to those celebrating it),

Bill
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel