moodymudskipper / flow

View and Browse Code Using Flow Diagrams
https://moodymudskipper.github.io/flow/
Other
395 stars 26 forks source link

Full package doc? #29

Closed moodymudskipper closed 3 years ago

moodymudskipper commented 4 years ago

This is ambitious but I think there's a path.

flow_doc_rmd(pkg, pick= NULL, skip = NULL, sections = c("title", "description", "arguments")).

Unexported /undocumented functions are documented in an appendix in the end in alpha order, if sections is NULL, we don't follow original doc structure, just stack functions in alpha order along with hyperlinks.

This might be a very long doc, I hope it can stay practical.

moodymudskipper commented 3 years ago

It seems to me now the utility would be limited, it'd be nice indeed to dig in functions used by functions but probably not worth the effort, putting on hold

sbalci commented 3 years ago

Hi,

Using the parameters in Rmarkdown and inspired from: https://gist.github.com/rmoff/a043676a2f084b81a434

I have done following:

wf_master.Rmd

---
title: "Child test"
output: html_document
---
{r global_options, include=FALSE}
knitr::opts_chunk$set(echo=FALSE, warning=FALSE,message=FALSE, cache=FALSE)
{r}
packagefunctions <- getNamespaceExports(ns = "ClinicoPath")
{r include=FALSE}
out = NULL
for (i in 1:length(functionsClinicoPath)) {
  value.to.match <- functionsClinicoPath[i]
  out = c(out,
          knitr::knit_expand(here::here('vignettes', 'wf_child.Rmd'))
  )
  }
`r paste(knitr::knit(text = out), collapse = '\n')`

wf_child.Rmd

Workflow for {{i}}
`r '{{value.to.match}}'`.
{r echo=TRUE}
value.to.match <- '{{value.to.match}}'
myfun <- paste0('ClinicoPath::', value.to.match)
flow::flow_view(x = eval(parse(text = myfun))
                )
moodymudskipper commented 3 years ago

@sbalci can you reinstall and take a look at flow_doc()?

flow_doc("pkg") will create a "pkg. html" file in your working dir. You might want to try the argument engine = "plantuml" too.

If you have remarks or feature suggestions I'll be happy to read them!

moodymudskipper commented 3 years ago

Closing since the feature is there, additional features and improvement go to separate issues, unlikely to be tackled before CRAN.

github-actions[bot] commented 2 years ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.