Good morning:
I submitted a package update to CRAN and got a bounce because I had
not run R CMD check with "--as-cran". I'd not heard of that before,
but I'm glad to know about it now.
I see it warns when my functions do use partial argument matching, and
I like that advice very much.
Also I see this warning
* checking package subdirectories ... WARNING
Found the following directory(s) with names of version control directories:
./.svn
./R/.svn
./data/.svn
./inst/.svn
./inst/doc/.svn
./inst/examples/.svn
./vignettes/.svn
These should not be in a package tarball.
Is there a way to cause R to ignore the .svn folders while running R
CMD check --as-cran or R CMD build?
It seems a little tedious to have to copy the whole directory tree to
some other place and remove the .svn folders before building. I can do
it, but it just seems, well, tedious. I have the feeling that you
"frequent flyers" would have worked around this already.
Paul E. Johnson
Professor, Political Science ? ?Assoc. Director
1541 Lilac Lane, Room 504 ? ? Center for Research Methods
University of Kansas ? ? ? ? ? ? ? University of Kansas
http://pj.freefaculty.org ? ? ? ? ? ?http://quant.ku.edu
Good morning:
I submitted a package update to CRAN and got a bounce because I had
not run R CMD check with "--as-cran". I'd not heard of that before,
but I'm glad to know about it now.
I see it warns when my functions do use partial argument matching, and
I like that advice very much.
Also I see this warning
* checking package subdirectories ... WARNING
Found the following directory(s) with names of version control directories:
./.svn
./R/.svn
./data/.svn
./inst/.svn
./inst/doc/.svn
./inst/examples/.svn
./vignettes/.svn
These should not be in a package tarball.
Is there a way to cause R to ignore the .svn folders while running R
CMD check --as-cran or R CMD build?
It seems a little tedious to have to copy the whole directory tree to
some other place and remove the .svn folders before building. I can do
it, but it just seems, well, tedious. I have the feeling that you
"frequent flyers" would have worked around this already.
Paul,
I think the best solution is to 'svn export' svn directory to a temporary directory/folder:
svn export my-svn-directory tmp-pkg-directory
R CMD build tmp-pkg-directory
R CMD check --as-cran ...
The two advantages of 'svn export' that it (1) strips the .svn specific files, and (2) it really exports only those files that really are under version control. More often than once I have had some non-svn files in my svn directory so that *my* version of the package works, but the one actually in subversion fails.
Cheers, Jari Oksanen
Jari Oksanen, Dept Biology, Univ Oulu, 90014 Finland
jari.oksanen at oulu.fi, Ph. +358 400 408593, http://cc.oulu.fi/~jarioksa
Jari Oksanen <jari.oksanen at oulu.fi>
on Mon, 12 Mar 2012 16:59:45 +0000 writes:
> On 12/03/2012, at 18:03 PM, Paul Johnson wrote:
>> Good morning:
>>
>> I submitted a package update to CRAN and got a bounce because I had
>> not run R CMD check with "--as-cran". I'd not heard of that before,
>> but I'm glad to know about it now.
>>
>> I see it warns when my functions do use partial argument matching, and
>> I like that advice very much.
>>
>> Also I see this warning
>>
>> * checking package subdirectories ... WARNING Found the following
>> directory(s) with names of version control directories: ./.svn
>> ./R/.svn ./data/.svn ./inst/.svn ./inst/doc/.svn ./inst/examples/.svn
>> ./vignettes/.svn These should not be in a package tarball.
>>
>> Is there a way to cause R to ignore the .svn folders while running R
>> CMD check --as-cran or R CMD build?
>>
>> It seems a little tedious to have to copy the whole directory tree to
>> some other place and remove the .svn folders before building. I can do
>> it, but it just seems, well, tedious. I have the feeling that you
>> "frequent flyers" would have worked around this already.
> Paul,
> I think the best solution is to 'svn export' svn directory to a
> temporary directory/folder:
No, I don't think that should not be needed.
When building the tarball, 'R CMD build' *does* ignore the .svn
folders, at least for me.
Paul's problem was using --as-cran on his SVN *directory*
but that's a slight contradiction in itself, as the CRAN maintainers
always run the checks on a tarball...
Martin
> svn export my-svn-directory tmp-pkg-directory
> R CMD build tmp-pkg-directory
> R CMD check --as-cran ...
> The two advantages of 'svn export' that it (1) strips the .svn specific
> files, and (2) it really exports only those files that really are under
> version control. More often than once I have had some non-svn files in
> my svn directory so that *my* version of the package works, but the one
> actually in subversion fails.
> Cheers, Jari Oksanen
> --
> Jari Oksanen, Dept Biology, Univ Oulu, 90014 Finland
> jari.oksanen at oulu.fi, Ph. +358 400 408593, http://cc.oulu.fi/~jarioksa
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
Good morning:
I submitted a package update to CRAN and got a bounce because I had
not run R CMD check with "--as-cran". I'd not heard of that before,
but I'm glad to know about it now.
Well, it has only existed for about a month, but the customizations its
selects are often much older and were documented as being used by CRAN.
I see it warns when my functions do use partial argument matching, and
I like that advice very much.
It switches on a customization that has been documented for years ....
Also I see this warning
* checking package subdirectories ... WARNING
Found the following directory(s) with names of version control directories:
./.svn
./R/.svn
./data/.svn
./inst/.svn
./inst/doc/.svn
./inst/examples/.svn
./vignettes/.svn
These should not be in a package tarball.
Is there a way to cause R to ignore the .svn folders while running R
CMD check --as-cran or R CMD build?
It seems a little tedious to have to copy the whole directory tree to
some other place and remove the .svn folders before building. I can do
it, but it just seems, well, tedious. I have the feeling that you
"frequent flyers" would have worked around this already.
You are strongly recommended to run this *on the tarball to be
submitted*. If you have .svn directories in that tarball, then you do
(or CRAN will) have a problem. R CMD build does omit such directories,
and you can of course use .Rbuildignore to ignore other things.
Or if you update to subversion 1.7.x the problem will evaporate, as that
only stores .svn directories at the top level, in my case ~/R/svn/Rpkgs,
above all the individual packages.
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
? ?> Paul,
? ?> I think the best solution is to 'svn export' svn directory to a
? ?> temporary directory/folder:
No, I don't think that should not be needed.
When building the tarball, ?'R CMD build' *does* ignore the .svn
folders, at least for me.
My tarball was created by R CMD build, I don't know why the .svn
folders were included. There are no .svn folders in the packages I
made with 2.14.1, so I suppose that is the first problem I have to
figure out. This was my first build with R-2.14.2. If I get an
answer, I will write back.
Paul's problem was using ?--as-cran on his SVN *directory*
but that's a slight contradiction in itself, as the CRAN maintainers
always run the checks on a tarball...
I don't have an argument against what you say, and I'm glad to do it
however you recommend. But I don't understand this. How do you get the
tarball without first doing R CMD check and R CMD build on the working
directory where the package lives? I just do what seems to be
recommended in the tutorial by Friedrich Leisch "Creating R Packages:
A Tutorial" and the R extensions document. Until now, I have done this
in the shell to create the package.
R CMD check rockchalk
R CMD build rockchalk
You mean everybody doesn't do it that way?
From now on, I'm adding --as-cran with check, but what else?
After that finishes, I should be running check on the tarball that was
created by build?
While I'm asking basic packaging questions, I have a vignette
packaging question. My vignette is in
vignettes/outreg.Rnw
The R build process runs latex to make sure the vignette can be built.
But, as far as I can tell, it does not copy the pdf file into
inst/doc/outreg.pdf.
So when building the package, I should still manually compile the pdf
and move it over there?
Martin
? ?> svn export my-svn-directory tmp-pkg-directory
? ?> R CMD build tmp-pkg-directory
? ?> R CMD check --as-cran ...
? ?> The two advantages of 'svn export' that it (1) strips the .svn specific
? ?> files, and (2) it really exports only those files that really are under
? ?> version control. More often than once I have had some non-svn files in
? ?> my svn directory so that *my* version of the package works, but the one
? ?> actually in subversion fails.
? ?> Cheers, Jari Oksanen
? ?> --
? ?> Jari Oksanen, Dept Biology, Univ Oulu, 90014 Finland
? ?> jari.oksanen at oulu.fi, Ph. +358 400 408593, http://cc.oulu.fi/~jarioksa
Paul E. Johnson
Professor, Political Science ? ?Assoc. Director
1541 Lilac Lane, Room 504 ? ? Center for Research Methods
University of Kansas ? ? ? ? ? ? ? University of Kansas
http://pj.freefaculty.org ? ? ? ? ? ?http://quant.ku.edu