Skip to content

Add Shiny app, tests, vignette, and CI#3

Merged
davidcleve merged 2 commits into
mainfrom
week-3
May 27, 2026
Merged

Add Shiny app, tests, vignette, and CI#3
davidcleve merged 2 commits into
mainfrom
week-3

Conversation

@davidcleve

Copy link
Copy Markdown
Collaborator

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!

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.
@vandenman vandenman requested review from Lex1Li and sebkrbs May 25, 2026 12:04

@sebkrbs sebkrbs left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nicely written and clear description!

## How to launch the app

```{r, eval = FALSE}
run_app()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good setup of continuous integration and from what I can see everything loaded correctly and worked fine!! Well done :)))

Comment thread NAMESPACE
export(get_current_number)
export(is_winner)
export(run_app)
export(validate_manual_sequence)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like everything is updated well

Comment thread .Rbuildignore
@@ -0,0 +1,3 @@
^.*\.Rproj$

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

appropriate rbuildignore

Comment thread DESCRIPTION
@@ -19,7 +19,12 @@ Encoding: UTF-8
LazyData: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description seems really good too!!!

@@ -0,0 +1,24 @@
# 1. Returns the input when valid

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Errors seem very appropriate and well done!

Comment thread tests/testthat/test-app.R
@@ -0,0 +1,68 @@
library(shinytest2)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good tests for shiny tests! nice of you to include this!

Comment thread R/app.R
@@ -1,175 +1,194 @@
#' Launch the Googol Game Shiny app
#' Run the Googol Game app

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Lex1Li

Lex1Li commented May 27, 2026

Copy link
Copy Markdown

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:

  1. Your app is launched with run_app() while the default run shiny function is runApp. Maybe something more unique to the package like runGG() or run_game() could be nice so while the user tab to autofill the default runApp() doesn't show up
  2. I think the game is pretty intuitive on it's own and the vignette is well written too, but maybe some user interface screenshots can break up the texts a bit?

Other than these two points, the package and app looks great already! Looking forward to your presentation :)

@Lex1Li Lex1Li left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above

@davidcleve davidcleve merged commit dc0c298 into main May 27, 2026
2 checks passed
@davidcleve davidcleve deleted the week-3 branch May 27, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants