auto documentation system for R shiny
up vote
3
down vote
favorite
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?
...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. :
r shiny roxygen2 code-documentation
add a comment |
up vote
3
down vote
favorite
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?
...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. :
r shiny roxygen2 code-documentation
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
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
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?
...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. :
r shiny roxygen2 code-documentation
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?
...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. :
r shiny roxygen2 code-documentation
r shiny roxygen2 code-documentation
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
add a comment |
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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