Add Shiny app, tests, vignette, and CI#3
Conversation
I added: Shiny app code, unit tests for Shiny app, vignette with step-by-step instructions of how to play the game, and Continuous Integration
I deleted "library(shiny)" in app.R because I believe it caused the R CMD checks of the push and pull requests to fail.
sebkrbs
left a comment
There was a problem hiding this comment.
Dear David,
This is now a really nicely setup package! As you can tell from my in text comments, I am very impressed with it. Everything seems very clean and is well documented. You have a great vignette, which makes it easy for the user (me ;'D) to implement it for the first time. Downloading your package was very straight forward and worked like a charm. Thanks to the vignette, I was then able to quickly try and play with the App. It worked perfectly! So much so that I tested it for longer than I probably should have.
Your code is also very clear and straightforward. While I find the division of your functions into one app.R and one game_logic.R file very organized, I wonder if separating your game_logic.R file into its respective functions would make it a bit easier for the reader to find relevant files within your package. This would also be more coherent with your tests/testthat structure.
Nonetheless, a very fun package and a clear project. (For the vignette make sure to check week 1 for the requirements again).
Excited to see the final presentation - though this already seems like an end product!
Well-done!
Sebastian
| the sequence — but once you pass a number, you cannot go back. You win only if | ||
| the number you pick turns out to be the highest in the entire sequence, | ||
| including numbers you never saw. | ||
|
|
There was a problem hiding this comment.
very nicely written and clear description!
| ## How to launch the app | ||
|
|
||
| ```{r, eval = FALSE} | ||
| run_app() |
There was a problem hiding this comment.
this worked like a charm. I like that you provide all the essentials first before going into the step by step instructions
| - **Loss**: a higher number existed elsewhere in the sequence, along with what | ||
| that number was. | ||
|
|
||
| Click **Play again** to return to the setup page and start a new game. |
There was a problem hiding this comment.
very nicely done and clearly written descriptions!!! I like this a lot :)))
| - uses: r-lib/actions/check-r-package@v2 | ||
| with: | ||
| upload-snapshots: true | ||
| build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' |
There was a problem hiding this comment.
Good setup of continuous integration and from what I can see everything loaded correctly and worked fine!! Well done :)))
| export(get_current_number) | ||
| export(is_winner) | ||
| export(run_app) | ||
| export(validate_manual_sequence) |
| @@ -0,0 +1,3 @@ | |||
| ^.*\.Rproj$ | |||
| @@ -19,7 +19,12 @@ Encoding: UTF-8 | |||
| LazyData: true | |||
| @@ -0,0 +1,24 @@ | |||
| # 1. Returns the input when valid | |||
There was a problem hiding this comment.
Errors seem very appropriate and well done!
| @@ -0,0 +1,68 @@ | |||
| library(shinytest2) | |||
There was a problem hiding this comment.
good tests for shiny tests! nice of you to include this!
| @@ -1,175 +1,194 @@ | |||
| #' Launch the Googol Game Shiny app | |||
| #' Run the Googol Game app | |||
There was a problem hiding this comment.
took me a while to understand this code tbh, but you have great annotations that help and now, from what I can tell the setup and logic of your googol code seem very clean and clear. I like that you removed the HTML code, which makes a lot more difficult to read and it seems like you still maintain functionality.
|
Hi David, super fun game! I could install the package and the unit tests passed no problem, the vignette looks great too! There are two minor things I noticed:
Other than these two points, the package and app looks great already! Looking forward to your presentation :) |
I added: Shiny app code, unit tests for Shiny app, vignette with step-by-step instructions of how to play the game, and Continuous Integration.
Run run_app() in your console to launch the Googol Game Shiny app.
For instructions of how to play the game, check out the vignette!