auto documentation system for R shiny











up vote
3
down vote

favorite
2












I ask for any advice how to do documentaion / auto-documentation for larger shiny applications.



R packages have roxygen2, but are there any equivalents of auto-documentation for shiny server and ui code?



I'm working on a developing project of +15k lines of code and we push as much as possible to packages with roxygen2 docs, however all of the observes and reacts in central server script and its subscripts are not auto-documented. I also use git of course.



I have tried to tag every observe, reactive, module etc in source code with a unique ID and draw a diagram manually with corresponding IDs. The diagram describe what type of sub-element and topic. Later I would add all triggers etc. This process is very manual though. Maybe I could use "the reactive log" https://shiny.rstudio.com/articles/debugging.html to autogenerate such documentation?



enter image description here



...update 1: I have tried ShinyTester which reads through source code and try to predict a network of sub-element interactions. It did not handle sourcing of external files, but with a little debug I manage to get the below diagram. Unfortunately, only 5% of elements and interactions were discovered hereby. Maybe ShinyTester could need some contributions. : enter image description here










share|improve this question




















  • 1




    Personally I think an app with 15k lines is too large, you should try to break it into smaller apps, there are too many points of failure.
    – Pork Chop
    Nov 19 at 12:15










  • I guess the alternative would be another frame work. We are very ambitious with the result and it is doing something comprehensive and works really well so far. We cannot make the server code much smaller than 1800 lines and it does contain ~50 sub elements. All other code +12000 is CSS, R, Cpp functions in 3 R packages within project. Also some javascript code here and there. Two of the packages have been pushed to github, forks: github.com/sorhawell/familyR, github.com/sorhawell/ShinyTreeMenu We have also worked with splitting into shiny modules.
    – Soren Havelund Welling
    Nov 19 at 12:30










  • the sub-elements (oberves, updates etc.) behavior is very neatly designed so not much unpredicted behaviour and debugging is fine, however I just need to document it accurately for those maintainers to join the project later
    – Soren Havelund Welling
    Nov 19 at 12:33















up vote
3
down vote

favorite
2












I ask for any advice how to do documentaion / auto-documentation for larger shiny applications.



R packages have roxygen2, but are there any equivalents of auto-documentation for shiny server and ui code?



I'm working on a developing project of +15k lines of code and we push as much as possible to packages with roxygen2 docs, however all of the observes and reacts in central server script and its subscripts are not auto-documented. I also use git of course.



I have tried to tag every observe, reactive, module etc in source code with a unique ID and draw a diagram manually with corresponding IDs. The diagram describe what type of sub-element and topic. Later I would add all triggers etc. This process is very manual though. Maybe I could use "the reactive log" https://shiny.rstudio.com/articles/debugging.html to autogenerate such documentation?



enter image description here



...update 1: I have tried ShinyTester which reads through source code and try to predict a network of sub-element interactions. It did not handle sourcing of external files, but with a little debug I manage to get the below diagram. Unfortunately, only 5% of elements and interactions were discovered hereby. Maybe ShinyTester could need some contributions. : enter image description here










share|improve this question




















  • 1




    Personally I think an app with 15k lines is too large, you should try to break it into smaller apps, there are too many points of failure.
    – Pork Chop
    Nov 19 at 12:15










  • I guess the alternative would be another frame work. We are very ambitious with the result and it is doing something comprehensive and works really well so far. We cannot make the server code much smaller than 1800 lines and it does contain ~50 sub elements. All other code +12000 is CSS, R, Cpp functions in 3 R packages within project. Also some javascript code here and there. Two of the packages have been pushed to github, forks: github.com/sorhawell/familyR, github.com/sorhawell/ShinyTreeMenu We have also worked with splitting into shiny modules.
    – Soren Havelund Welling
    Nov 19 at 12:30










  • the sub-elements (oberves, updates etc.) behavior is very neatly designed so not much unpredicted behaviour and debugging is fine, however I just need to document it accurately for those maintainers to join the project later
    – Soren Havelund Welling
    Nov 19 at 12:33













up vote
3
down vote

favorite
2









up vote
3
down vote

favorite
2






2





I ask for any advice how to do documentaion / auto-documentation for larger shiny applications.



R packages have roxygen2, but are there any equivalents of auto-documentation for shiny server and ui code?



I'm working on a developing project of +15k lines of code and we push as much as possible to packages with roxygen2 docs, however all of the observes and reacts in central server script and its subscripts are not auto-documented. I also use git of course.



I have tried to tag every observe, reactive, module etc in source code with a unique ID and draw a diagram manually with corresponding IDs. The diagram describe what type of sub-element and topic. Later I would add all triggers etc. This process is very manual though. Maybe I could use "the reactive log" https://shiny.rstudio.com/articles/debugging.html to autogenerate such documentation?



enter image description here



...update 1: I have tried ShinyTester which reads through source code and try to predict a network of sub-element interactions. It did not handle sourcing of external files, but with a little debug I manage to get the below diagram. Unfortunately, only 5% of elements and interactions were discovered hereby. Maybe ShinyTester could need some contributions. : enter image description here










share|improve this question















I ask for any advice how to do documentaion / auto-documentation for larger shiny applications.



R packages have roxygen2, but are there any equivalents of auto-documentation for shiny server and ui code?



I'm working on a developing project of +15k lines of code and we push as much as possible to packages with roxygen2 docs, however all of the observes and reacts in central server script and its subscripts are not auto-documented. I also use git of course.



I have tried to tag every observe, reactive, module etc in source code with a unique ID and draw a diagram manually with corresponding IDs. The diagram describe what type of sub-element and topic. Later I would add all triggers etc. This process is very manual though. Maybe I could use "the reactive log" https://shiny.rstudio.com/articles/debugging.html to autogenerate such documentation?



enter image description here



...update 1: I have tried ShinyTester which reads through source code and try to predict a network of sub-element interactions. It did not handle sourcing of external files, but with a little debug I manage to get the below diagram. Unfortunately, only 5% of elements and interactions were discovered hereby. Maybe ShinyTester could need some contributions. : enter image description here







r shiny roxygen2 code-documentation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 19 at 12:16

























asked Nov 19 at 11:05









Soren Havelund Welling

1,145615




1,145615








  • 1




    Personally I think an app with 15k lines is too large, you should try to break it into smaller apps, there are too many points of failure.
    – Pork Chop
    Nov 19 at 12:15










  • I guess the alternative would be another frame work. We are very ambitious with the result and it is doing something comprehensive and works really well so far. We cannot make the server code much smaller than 1800 lines and it does contain ~50 sub elements. All other code +12000 is CSS, R, Cpp functions in 3 R packages within project. Also some javascript code here and there. Two of the packages have been pushed to github, forks: github.com/sorhawell/familyR, github.com/sorhawell/ShinyTreeMenu We have also worked with splitting into shiny modules.
    – Soren Havelund Welling
    Nov 19 at 12:30










  • the sub-elements (oberves, updates etc.) behavior is very neatly designed so not much unpredicted behaviour and debugging is fine, however I just need to document it accurately for those maintainers to join the project later
    – Soren Havelund Welling
    Nov 19 at 12:33














  • 1




    Personally I think an app with 15k lines is too large, you should try to break it into smaller apps, there are too many points of failure.
    – Pork Chop
    Nov 19 at 12:15










  • I guess the alternative would be another frame work. We are very ambitious with the result and it is doing something comprehensive and works really well so far. We cannot make the server code much smaller than 1800 lines and it does contain ~50 sub elements. All other code +12000 is CSS, R, Cpp functions in 3 R packages within project. Also some javascript code here and there. Two of the packages have been pushed to github, forks: github.com/sorhawell/familyR, github.com/sorhawell/ShinyTreeMenu We have also worked with splitting into shiny modules.
    – Soren Havelund Welling
    Nov 19 at 12:30










  • the sub-elements (oberves, updates etc.) behavior is very neatly designed so not much unpredicted behaviour and debugging is fine, however I just need to document it accurately for those maintainers to join the project later
    – Soren Havelund Welling
    Nov 19 at 12:33








1




1




Personally I think an app with 15k lines is too large, you should try to break it into smaller apps, there are too many points of failure.
– Pork Chop
Nov 19 at 12:15




Personally I think an app with 15k lines is too large, you should try to break it into smaller apps, there are too many points of failure.
– Pork Chop
Nov 19 at 12:15












I guess the alternative would be another frame work. We are very ambitious with the result and it is doing something comprehensive and works really well so far. We cannot make the server code much smaller than 1800 lines and it does contain ~50 sub elements. All other code +12000 is CSS, R, Cpp functions in 3 R packages within project. Also some javascript code here and there. Two of the packages have been pushed to github, forks: github.com/sorhawell/familyR, github.com/sorhawell/ShinyTreeMenu We have also worked with splitting into shiny modules.
– Soren Havelund Welling
Nov 19 at 12:30




I guess the alternative would be another frame work. We are very ambitious with the result and it is doing something comprehensive and works really well so far. We cannot make the server code much smaller than 1800 lines and it does contain ~50 sub elements. All other code +12000 is CSS, R, Cpp functions in 3 R packages within project. Also some javascript code here and there. Two of the packages have been pushed to github, forks: github.com/sorhawell/familyR, github.com/sorhawell/ShinyTreeMenu We have also worked with splitting into shiny modules.
– Soren Havelund Welling
Nov 19 at 12:30












the sub-elements (oberves, updates etc.) behavior is very neatly designed so not much unpredicted behaviour and debugging is fine, however I just need to document it accurately for those maintainers to join the project later
– Soren Havelund Welling
Nov 19 at 12:33




the sub-elements (oberves, updates etc.) behavior is very neatly designed so not much unpredicted behaviour and debugging is fine, however I just need to document it accurately for those maintainers to join the project later
– Soren Havelund Welling
Nov 19 at 12:33

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373290%2fauto-documentation-system-for-r-shiny%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373290%2fauto-documentation-system-for-r-shiny%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Create new schema in PostgreSQL using DBeaver

Deepest pit of an array with Javascript: test on Codility

Costa Masnaga