You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I let roxygen2 build all my docs and so i decided not to sync my /man directory, as this would just be more useless syncing, downloading and uploading. however now when someone tries to use my package with install_github (instead of CRAN) they don't get the documentation.
is it possible to add a switch, that during the building process install_github calls a roxygenize()
(i think this might be prefered behavior, as this enforces up to date documentation (until roxygen2 rejects your tags of course ))
For development, maybe you could call the roxygenize through autotools.
For example, write a configure.ac:
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
Rscript -e "library(roxygen2);roxygenize()"
AC_OUTPUT
Then, call autoconf once to generate configure. After shipping the package with configure, the client will re-generate document with roxygenize before installing the packge.
i am not familiar with autoconf and stuff, but how can this be called in combination with install_github()?
install_github() downloads the source code, compiles it into a binary package, and then deletes the source code, with no chance to intervene as far as i know.
its also relatively hard to make your own install_github(), as https is not supported by R by default.... which is kinda silly
So R CMD BUILD or R CMD INSTALL checks for a file named configure.ac in the projects root directory? and then calls autoconfig to create the configure file ?
gonna try at home if that works on windows as well (i figure that would require Rtools)
ok even if i add a NAMESPACE file it still does not work on windows, and so its not a valid solution :(
> install_github("DemoAutotoolWithRoxygenize", "phonixor")
Installing github repo DemoAutotoolWithRoxygenize/master from phonixor
Downloading master.zip from https://github.com/phonixor/DemoAutotoolWithRoxygenize/archive/master.zip
Installing package from C:\Users\phonixor\AppData\Local\Temp\RStudioPortableTemp\Rtmp8OT0hB/master.zip
Installing Test
"D:/PORTAB~1/R-PORT~1/App/R-PORT~1/bin/x64/R" --vanilla CMD INSTALL \
"C:\Users\phonixor\AppData\Local\Temp\RStudioPortableTemp\Rtmp8OT0hB\devtools20907afc2d1c\DemoAutotoolWithRoxygenize-master" \
--library="C:/Users/phonixor/Documents/R/win-library/3.0" --install-tests
* installing *source* package 'Test' ...
**********************************************
WARNING: this package has a configure script
It probably needs manual configuration
**********************************************
** R
** preparing package for lazy loading
** help
No man pages found in package 'Test'
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (Test)
Activity
wush978 commentedon Jul 14, 2014
For development, maybe you could call the
roxygenizethrough autotools.For example, write a
configure.ac:Then, call
autoconfonce to generateconfigure. After shipping the package withconfigure, the client will re-generate document withroxygenizebefore installing the packge.phonixor commentedon Jul 14, 2014
i am not familiar with
autoconfand stuff, but how can this be called in combination withinstall_github()?install_github()downloads the source code, compiles it into a binary package, and then deletes the source code, with no chance to intervene as far as i know.its also relatively hard to make your own
install_github(), as https is not supported by R by default.... which is kinda sillywush978 commentedon Jul 14, 2014
I put an example here: https://github.com/wush978/DemoAutotoolWithRoxygenize
Try:
There is no
manandNAMESPACEin the source. Theconfigurescript will launchroxygenizeto generate them before installation.phonixor commentedon Jul 14, 2014
Awesome!
So
R CMD BUILDorR CMD INSTALLchecks for a file namedconfigure.acin the projects root directory? and then callsautoconfigto create theconfigurefile ?gonna try at home if that works on windows as well (i figure that would require Rtools)
phonixor commentedon Jul 15, 2014
@wch sorry i should have seen that issue.
@wush978
on windows i get the following:
gonna test if it works if i add a
NAMESPACEfilephonixor commentedon Jul 15, 2014
ok even if i add a
NAMESPACEfile it still does not work on windows, and so its not a valid solution :(hadley commentedon Aug 21, 2014
Dup of #397.