0

I am writing an R package that I install on our server using remotes::install_git(). The package manual pages (man/*.Rd) are not tracked in git, but are generated using roxygen2. When I run remotes::install_git() on the server, the package builds and installs, but it produces this message during the build process (package name is a placeholder):

No man pages found in package  'BOB'

And as indicated, none of the help pages are available. I looked into the build_manual argument, but this only controls whether the manual pages are compiled into a PDF. Is there some secret argument I'm missing to force the installation to build the manual pages first? Or do I just need to manually run it every time?

8
  • 2
    Is there a reason the man/*.Rd files are not tracked by git? Roxygen2 includes the .Rd files in its GitHub repo, so my understanding is that the help pages are not generated by roxygen2 upon installation, but are pulled with git. Commented Apr 8 at 14:41
  • 2
    While it can present the opportunity for inconsistency (between R/*.R and man/*.Rd), I've always maintained my .Rd files in the git repo and regularly document(.)ed my package before commits. My assumption has been that remotes:: downloads a file and installs it using something like R INSTALL. Since base R doesn't use roxygen2, then it cannot extract/render #'-style comments into .Rd files. Note that remotes does not import roxygen2, so even though we know base R isn't going to do it, it seems remotes isn't geared to do it either. Commented Apr 8 at 14:58
  • While I don't think it's trivial per se, you may consider adding a commit hook that runs document() on the package repo, finds changes to man/* and NAMESPACE, and either appends them to a commit or adds a new commit. Alternatively, this could be done in the repo master as a GH action or similar for GL or other git host. Commented Apr 8 at 15:01
  • I say "opportunity for inconsistency" because there are countless commits in my logs along the lines of upd docs for something pushed n-commits ago where I forgot to rerun document(.). :-/ Commented Apr 8 at 15:03
  • @Steven314 I followed the standard procedure of not checking auto-generated files into git, so I added /man/ to .gitignore. However, searching around a bit, it seems that this is not advised: stackoverflow.com/q/45834808/125921. That said, it would still be nice if the install process of the remotes package had some sort of hook functionality that I could use to have it auto-run devtools::document(). Commented Apr 8 at 17:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.