First: Thanks for this excellent work, I'm very excited to be using altdoc for documenting several of my R packages. I am most excited about it because of the mkdocs output target, which I use for all my other tools, and I want to get my R documentation in the same system I use for everything else.
Now, the question:
When I follow the tutorial to set up altdoc with mkdocs for my R package, I get this issue:
library(altdoc)
> setup_docs(tool = "mkdocs")
Error in `setup_docs()`:
✖ `altdoc` needs `mkdocs` to be installed in a Python virtual environment. The best way to create the required `.venv_altdoc` directory depends on your development environment. It usually involves
executing commands like the following from the root directory of your R package.
I don't understand why altdoc requires mkdocs to be installed:
- in any case, because the creation of these docs should be independent of their rendering with mkdocs
- especially just to initialize the project.
Basically, I was hoping altdoc would just create the markdown output, which I could then integrate into a mkdocs site.
I don't need R to handle the actually running/building of mkdocs, I can do that using my existing workflow.
Basically, I'm imagining altdoc is doing this in 2 steps:
- Convert from R documentation (eg .Rmd files, roxygen comments, etc) ->
.md files.
- Render those .md files into HTML using
mkdocs build or mkdocs serve.
From my perspective, it seems like altdoc has tightly coupled these 2 things. I actually already have a workflow for the 2nd one; I only wanted altdoc to do the first. But then, I cannot use it, because it's forcing me to do both at the same time.
Part of the reason I don't want to just "install mkdocs to satisfy altdoc" is that in my workflow, I isolate my software in containers. I'm using an R container, so I don't want to add Python/mkdocs to this container, because I use a different container for that. So, this tight coupling makes altdoc too inflexible for my need.
Am I thinking about this the wrong way?
First: Thanks for this excellent work, I'm very excited to be using altdoc for documenting several of my R packages. I am most excited about it because of the mkdocs output target, which I use for all my other tools, and I want to get my R documentation in the same system I use for everything else.
Now, the question:
When I follow the tutorial to set up altdoc with mkdocs for my R package, I get this issue:
I don't understand why altdoc requires mkdocs to be installed:
Basically, I was hoping altdoc would just create the markdown output, which I could then integrate into a mkdocs site.
I don't need R to handle the actually running/building of mkdocs, I can do that using my existing workflow.
Basically, I'm imagining altdoc is doing this in 2 steps:
.mdfiles.mkdocs buildormkdocs serve.From my perspective, it seems like altdoc has tightly coupled these 2 things. I actually already have a workflow for the 2nd one; I only wanted altdoc to do the first. But then, I cannot use it, because it's forcing me to do both at the same time.
Part of the reason I don't want to just "install mkdocs to satisfy altdoc" is that in my workflow, I isolate my software in containers. I'm using an R container, so I don't want to add Python/mkdocs to this container, because I use a different container for that. So, this tight coupling makes altdoc too inflexible for my need.
Am I thinking about this the wrong way?