Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/41 renv rsconnect updates #45

Merged
merged 18 commits into from
Mar 12, 2024

Conversation

GuidoMaggio
Copy link
Member

Update of renv chapter. See also #41

  • added a phrase about snapshot.type = "explicit" / "implicit"
  • updated what is generated in the "renv" folder
  • Mentioned in an additional sentence the PPM repo
  • options(repos = "https://packagemanager.rstudio.com/cran/2023-01-02") works to fix the date of the repo, like MRAN was working previously. tested.
  • added a second sentence about renv::snapshot(dev = TRUE)
  • rephrased/improved "Caching the packages' versions", adding new insight from the help file of renv::status
  • Added few lines and examples about renv::checkout()

I have tested the usage of renv::checkout(date = , repos = ) and options(repo = ). Also checkout is then setting the new repo to the date specified (or to the repos url).
I.e. renv::checkout(date = "2023-01-01" ) would then set also options(repos = "https://packagemanager.rstudio.com/cran/2023-01-01").

Checkout has more options, packages can be installed, or only a snapshot of the renv.lock can be done.

Update of CI-CD chapter.

  • updated workflows yml to mirror ShinyCICD repo
  • added forceUpdate = TRUE to rsconnect::deployApp

@GuidoMaggio GuidoMaggio added the enhancement New feature or request label Feb 21, 2024
@GuidoMaggio GuidoMaggio self-assigned this Feb 21, 2024
@GuidoMaggio GuidoMaggio linked an issue Feb 21, 2024 that may be closed by this pull request
Copy link
Member

@riccardoporreca riccardoporreca left a comment

Choose a reason for hiding this comment

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

@GuidoMaggio, the workflows are no fully up-to-date with ShinyCICD

When porting updates done and tested in ShinyCICD to the techguides, I would always try to get in ShinyCICD the workflows from the techguides to verify we have full consistency, via

usethis::use_github_file("miraisolutions/techguides", ref="feature/41-renv-rsconnect-updates",path="shiny-ci-cd/actions/ci-cd.yml", save_as = "shiny-ci-cd/actions/ci-cd.yml")
usethis::use_github_file("miraisolutions/techguides", ref="feature/41-renv-rsconnect-updates",path="shiny-ci-cd/actions/ci-cd-renv.yml", save_as = "shiny-ci-cd/actions/ci-cd-renv.yml")

Also deploy-shinyapps.io lacks some of the refinements we did in ShinyCICD
(NOTE: we cannot use usethis::use_github_action(), as we have in the techguides for a branch that contains "/").

deploy update
@GuidoMaggio
Copy link
Member Author

@riccardoporreca I have added 'renv' instead of 'release' in the -renv.yml. Here I did not spot other differences with ShinyCICD.
As for the deploy script, I added the appFiles argument.

usethis::use_github_file("miraisolutions/techguides", ref="feature/41-renv-rsconnect-updates",path="shiny-ci-cd/actions/ci-cd.yml", save_as = "shiny-ci-cd/actions/ci-cd.yml")
usethis::use_github_file("miraisolutions/techguides", ref="feature/41-renv-rsconnect-updates",path="shiny-ci-cd/actions/ci-cd-renv.yml", save_as = "shiny-ci-cd/actions/ci-cd-renv.yml")

The code above works well to me

@riccardoporreca
Copy link
Member

riccardoporreca commented Feb 28, 2024

Here I did not spot other differences with ShinyCICD.
As for the deploy script, I added the appFiles argument.

There is more in both cases that we want to have. Maybe it is easier for me to take over, since some of the changes should probably be explained in the techguides as part of this content refresh. @GuidoMaggio let's coordinate on this.

Btw, in the past I actually pulled in the full files from ShinyCICD to avoid manual pasting and have more traceability, see 24798ad

=> UPDATE: I have started to commit the complete workflow files, see c8fde8b

riccardoporreca and others added 11 commits February 28, 2024 11:38
* `schedule`/`concurrency` removed (specific to ShinyCICCD maintenance)
* changes ported to the CI-only

Based on

```r
usethis::use_github_file(
  "miraisolutions/ShinyCICD", ref = "842b40b6e5790fae3a2ed36ce2ec147b77f90fd8",
  ".github/workflow/ci-cd.yml", "shiny-ci-cd/actions/ci-cd.yml"
)
usethis::use_github_file(
  "miraisolutions/ShinyCICD", ref = "842b40b6e5790fae3a2ed36ce2ec147b77f90fd8",
  ".github/workflows/ci-cd-renv.yml", "shiny-ci-cd/actions/ci-cd-renv.yml"
)
```
```r
usethis::use_github_file(
    "miraisolutions/ShinyCICD", ref = "842b40b6e5790fae3a2ed36ce2ec147b77f90fd8",
    "deploy/deploy-shinyapps.R", "shiny-ci-cd/deploy/deploy-shinyapps.R"
)
```
* Since `master` is the legacy pre-v2 branch
@riccardoporreca
Copy link
Member

@GuidoMaggio, I have pushed my updates and general review of the Shiny CI/CD chapter.

I plan to do the same for the renv chapter

@riccardoporreca
Copy link
Member

@GuidoMaggio, @RolandASc, I ended up doing a major review and partial re-write/restructuring of the renv chapter, which I just pushed.

@riccardoporreca riccardoporreca self-requested a review March 6, 2024 08:42
@riccardoporreca
Copy link
Member

@GuidoMaggio, this is complete from my side, please cross-review the changes I did

@riccardoporreca riccardoporreca dismissed their stale review March 6, 2024 08:44

Followed-up directly by committing to the branch

Copy link
Member Author

@GuidoMaggio GuidoMaggio left a comment

Choose a reason for hiding this comment

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

2 changes requested

renv.Rmd Outdated Show resolved Hide resolved
renv.Rmd Outdated Show resolved Hide resolved
Unintentionaly committed as "implicit"

Co-authored-by: Guido Maggio <[email protected]>
ok

Co-authored-by: Riccardo Porreca <[email protected]>
@GuidoMaggio GuidoMaggio merged commit cc3c597 into master Mar 12, 2024
4 checks passed
@riccardoporreca riccardoporreca deleted the feature/41-renv-rsconnect-updates branch March 12, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Renv and rsconnect updates
2 participants