Closed rbcavanaugh closed 4 months ago
Hi @rbcavanaugh
Does your README have a YAML preamble? What happens if you remove it?
It's a bit hard to diagnose without just with that. Is there a Github repo I can look at?
No preamble. Does this help? I pushed a branch where I'm getting the error here: https://github.com/roux-ohdsi/allofus/tree/test-altdoc
When I run render_docs(verbose=TRUE)
, I see this error in rendering one of your vignettes. It does not seem altdoc
-related:
processing file: aou_create_temp_table.qmd
1/3
2/3 [unnamed-chunk-1]
Quitting from lines 65-83 [unnamed-chunk-1] (aou_create_temp_table.qmd)
Error:
! Unable to connect to CDR
Backtrace:
1. allofus::aou_connect()
2. base::tryCatch(...)
3. base (local) tryCatchList(expr, classes, parentenv, handlers)
4. base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
5. value[[3L]](cond)
Execution halted
Error in `quarto::quarto_render()` at altdoc/R/settings_quarto_website.R:38:5:
✖ Error running quarto cli.
Caused by error:
! System command 'quarto' failed
@etiennebacher & @kylebutts do you think we should make verbose=TRUE
by default. My guess is that this kind of thing will happen all the time.
@etiennebacher & @kylebutts do you think we should make verbose=TRUE by default. My guess is that this kind of thing will happen all the time.
I think we should show error messages all the time, no matter the value of verbose
. However, if everything works fine I don't see the need to clutter the console with all those quarto rendering messages, so I don't think setting verbose = TRUE
as default is the solution. I can try to take a look this weekend to see how hard it would be to only show the error messages without all the other noise
Right. Those messages are only available when quarto
is super verbose. My assumption was that this is going to be annoying to capture and that, as a team, we don't have time to invest for something trivial like that. But sure, if you feel like it, it would be great to have a smart function that can figure out how to tell what is noise and what is useful error.
as a team, we don't have time to invest for something trivial like that
True, but I can also see in the polars
CI that it's super annoying to go through tons of useless messages just to find the one error message that is actually useful. Extreme example given the number of man pages in polars
of course, but I can imagine it's the same if you have 20+ functions.
But I won't lose days on this for sure, I'm just curious how hard it would be.
If you can't figure it out, rpolars
can always set verbose=FALSE
Thanks @vincentarelbundock - is that file the .qmd file generated for the function reference (e.g., what would be the reference page in a pkg down website for the function?.
Only a few of the package functions will work outside of the specialized compute environment the package is intended for, so the examples are run conditionally if this environment is detected.
# returns TRUE if the environment is detected.
on_workbench <- function() {
detect_specialized_compute_environment()
}
and the roxygen2 comments look like this:
#' @examplesIf on_workbench()
#' # do example stuff
#' con <- aou_connect()
#' df <- data.frame(
#' ...
is it possible that pkg down evaluates this on_workbench()
function, altdoc does not? (or that pkgdown doesn't evaluate examples at all?).
Here's the current pkgdown page for that function: https://roux-ohdsi.github.io/allofus/reference/aou_create_temp_table.html
Anyways...perhaps this is our issue and not yours. thanks for looking into it.
@rbcavanaugh you got it! Exactly right. The problem is that we don't support @examplesIf
properly.
I just put together a proof of concept patch, which adds support. The pull request is here: https://github.com/etiennebacher/altdoc/pull/271
FWIW, the allofus
docs looks pretty great on my computer when I build it with the patched version of altdoc
.
You can try it by first restarting R
completely, then:
library(remotes)
install_github(repo="etiennebacher/altdoc", ref = github_pull(271))
library(altdoc)
render_docs(verbose = TRUE)
wow fantastic - thanks that works perfectly. I get the hesitation with the 'work around' on detecting the @examplesIf tag though.
I've got some work to do to incorporate some customizations we have from pkgdown (we have a few 'web only' vignettes that aren't built with the R package and I need to group the functions so that they line up with a pending manuscript) but this definitely looks like an upgrade.
Great! Let me know if you run into other issues.
Closed by #271
Hi! Trying to convert a package with a pkgdown site to altdoc because it looks great. Converted README.rmd to a .qmd document (which renders just fine on its own). I've tried reinstalling quarto and RStudio and altdoc, restarting RStudio, restarting computer etc. Some kind of quarto path issue perhaps?
returns the following error:
Any suggestions? thanks!