From 56576af4c30e3d8658cb122af42537a7eb137eb1 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Thu, 13 Feb 2020 18:01:34 -0500 Subject: [PATCH] v0.10.1 (#332) * test run revdep. all pass * bump version to 0.10.1 * move deploy workflow into check workflow and need all checks to pass first * Fix broken link * Run revdepcheck() * do not make testthat a required test package * update cran comments * document ./docs * make sure it is a push event. (Only master or ghactions from above definition) --- .github/workflows/R-CMD-check.yaml | 60 +++++++++++++++ .github/workflows/deploy.yaml | 73 ------------------- DESCRIPTION | 2 +- NEWS.md | 4 +- cran-comments.md | 34 +++++++-- docs/examples.html | 2 +- docs/exercises.html | 2 +- docs/formats.html | 2 +- docs/index.html | 9 ++- docs/publishing.html | 3 +- docs/questions.html | 2 +- .../header-attrs.js | 0 revdep/README.md | 11 ++- tests/testthat.R | 9 ++- 14 files changed, 112 insertions(+), 101 deletions(-) delete mode 100644 .github/workflows/deploy.yaml rename docs/site_libs/{header-attrs-2.1.1 => header-attrs-2.1}/header-attrs.js (100%) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index a3e3c9b59..5ab3469e3 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -87,3 +87,63 @@ jobs: run: > Rscript -e 'covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")' + + + + + deploy: + if: github.repository == 'rstudio/learnr' && github.event_name == 'push' + runs-on: ${{ matrix.config.os }} + + name: "Deploy to shinyapps.io" + needs: [R-CMD-check] + + strategy: + fail-fast: false + matrix: + config: + - {os: ubuntu-16.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} + + env: + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + CRAN: ${{ matrix.config.cran }} + + steps: + - uses: actions/checkout@v1 + + - uses: r-lib/actions/setup-r@master + with: + r-version: ${{ matrix.config.r }} + + - uses: r-lib/actions/setup-pandoc@master + + - name: Query dependencies + run: > + Rscript + -e "install.packages('remotes')" + -e "saveRDS(remotes::dev_package_deps(dependencies = TRUE), 'depends.Rds', version = 2)" + + - name: Cache R packages + if: runner.os != 'Windows' + uses: actions/cache@v1 + with: + path: ${{ env.R_LIBS_USER }} + key: ${{ runner.os }}-r-${{ matrix.config.r }}-deploy-${{ hashFiles('depends.Rds') }} + restore-keys: | + ${{ runner.os }}-r-${{ matrix.config.r }}-deploy- + ${{ runner.os }}-r-${{ matrix.config.r }}- + + - name: Install dependencies + run: > + Rscript + -e "library(remotes)" + -e "update(readRDS('depends.Rds'))" + -e "remotes::install_cran('sortable')" + + - name: Deploy + env: + SHINYAPPS_NAME: ${{ secrets.SHINYAPPS_NAME }} + SHINYAPPS_TOKEN: ${{ secrets.SHINYAPPS_TOKEN }} + SHINYAPPS_SECRET: ${{ secrets.SHINYAPPS_SECRET }} + run: > + Rscript 'tools/deploy_tutorials_on_ci.R' diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml deleted file mode 100644 index 3cfe4aaf5..000000000 --- a/.github/workflows/deploy.yaml +++ /dev/null @@ -1,73 +0,0 @@ -on: - push: - branches: - - master - - ghactions - -name: Deploy - -jobs: - - # added so that the workflow doesn't fail. - always_runner: - runs-on: ubuntu-latest - steps: - - name: Always run - run: echo "This job is used to prevent the workflow status from showing as failed when all other jobs are skipped" - - - deploy: - if: github.repository == 'rstudio/learnr' - runs-on: ${{ matrix.config.os }} - - name: "shinyapps.io" - - strategy: - fail-fast: false - matrix: - config: - - {os: ubuntu-16.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} - - env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - CRAN: ${{ matrix.config.cran }} - - steps: - - uses: actions/checkout@v1 - - - uses: r-lib/actions/setup-r@master - with: - r-version: ${{ matrix.config.r }} - - - uses: r-lib/actions/setup-pandoc@master - - - name: Query dependencies - run: > - Rscript - -e "install.packages('remotes')" - -e "saveRDS(remotes::dev_package_deps(dependencies = TRUE), 'depends.Rds', version = 2)" - - - name: Cache R packages - if: runner.os != 'Windows' - uses: actions/cache@v1 - with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-r-${{ matrix.config.r }}-deploy-${{ hashFiles('depends.Rds') }} - restore-keys: | - ${{ runner.os }}-r-${{ matrix.config.r }}-deploy- - ${{ runner.os }}-r-${{ matrix.config.r }}- - - - name: Install dependencies - run: > - Rscript - -e "library(remotes)" - -e "update(readRDS('depends.Rds'))" - -e "remotes::install_cran('sortable')" - - - name: Deploy - env: - SHINYAPPS_NAME: ${{ secrets.SHINYAPPS_NAME }} - SHINYAPPS_TOKEN: ${{ secrets.SHINYAPPS_TOKEN }} - SHINYAPPS_SECRET: ${{ secrets.SHINYAPPS_SECRET }} - run: > - Rscript 'tools/deploy_tutorials_on_ci.R' diff --git a/DESCRIPTION b/DESCRIPTION index a557fc382..a2f0b92bb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: learnr Type: Package Title: Interactive Tutorials for R -Version: 0.10.0.9000 +Version: 0.10.1 Authors@R: c( person("Barret", "Schloerke", role = c("aut", "cre"), email = "barret@rstudio.com", comment = c(ORCID = "0000-0001-9986-114X")), diff --git a/NEWS.md b/NEWS.md index 6a3445ab5..9af6b53e2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -learnr 0.10.0.9000 (unreleased) +learnr 0.10.1 =========== ## New features @@ -19,7 +19,7 @@ learnr 0.10.0.9000 (unreleased) * Fixed extra parameter documentation bug for CRAN. ([#323](https://github.com/rstudio/learnr/pull/323)) -* Fixed video initialization error caused by a jQuery version increase in Shiny. ([#326](https://github.com/rstudio/learnr/pull/#326)) +* Fixed video initialization error caused by a jQuery version increase in Shiny. ([#326](https://github.com/rstudio/learnr/pull/326)) * Fixed progressive reveal bug where the next section would not be displayed unless refreshed. ([#330](https://github.com/rstudio/learnr/pull/330)) diff --git a/cran-comments.md b/cran-comments.md index 4b7625b18..a00f13fe2 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,21 +1,41 @@ ## Comments -### 2019-11-08 +### 2020-02-12 + +I have addressed the extra parameter documentation and made other improvements to learnr. Please let me know if there is anything I can do. Thank you, Barret +### 2020-02-03 + +Specifically, see the warnings about 'Documented arguments not in +\usage' in the r-devel checks. These are from a recent bug fix +(PR#16223, see +): can you +please fix your man pages as necessary? (In most cases, remove the +documentation for argument '...'.) + +Please correct before 2020-02-17 to safely retain your package on CRAN. + +Best, +-k + ## Test environments * local OS X install, R 3.6.1 -* ubuntu 14.04 (on travis-ci), release, oldrel, devel -* win-builder (oldrelease, release, devel) -* R-hub windows-x86_64-release (r-release) -* R-hub windows-x86_64-devel (r-devel) -* R-hub ubuntu-gcc-release (r-release) -* R-hub fedora-clang-devel (r-devel) +* GitHub Actions + * ubuntu 16.04 - R 3.2, 3.3, 3.4, 3.5, 3.6.2 + * mac - 3.6.2 + * windows - 3.6.2, devel +* win-builder (oldrelease, release) +* R-hub - Windows Server 2008 R2 SP1, R-devel, 32/64 bit (devel) + +I did not get an email response from win-builder devel. + + ## R CMD check results diff --git a/docs/examples.html b/docs/examples.html index c29d13858..b91157835 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -13,7 +13,7 @@ Examples - + diff --git a/docs/exercises.html b/docs/exercises.html index eef6d29fb..687f6a226 100644 --- a/docs/exercises.html +++ b/docs/exercises.html @@ -13,7 +13,7 @@ Exercises - + diff --git a/docs/formats.html b/docs/formats.html index 097644fa7..1b361d8a4 100644 --- a/docs/formats.html +++ b/docs/formats.html @@ -13,7 +13,7 @@ Formats - + diff --git a/docs/index.html b/docs/index.html index 872def5d4..bbda381b6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -13,7 +13,7 @@ Interactive Tutorials for R - + @@ -497,9 +497,10 @@

Installation

Creating a Tutorial

A tutorial is just a directory that contains a standard R Markdown document with three additional attributes:

    -
  1. Loads the learnr package.
  2. -
  3. Includes one or more interactive components (exercises, quiz questions, etc.).
  4. -
  5. Uses the runtime: shiny_prerendered directive in the YAML header.
  6. +
  7. Loads the learnr package,
  8. +
  9. Includes one or more interactive components (exercises, quiz questions, etc.),
  10. +
  11. Uses the runtime: shiny_prerendered directive in the YAML header,
  12. +
  13. Provides a short description in the top-level description: field of the YAML header.

The runtime: shiny_prerendered element included in the YAML hints at the underlying implementation of tutorials: they are simply Shiny applications which use an R Markdown document as their user-interface rather than the traditional ui.R file.

diff --git a/docs/publishing.html b/docs/publishing.html index 15311455b..4f6a90584 100644 --- a/docs/publishing.html +++ b/docs/publishing.html @@ -13,6 +13,7 @@ Publishing + @@ -424,7 +425,7 @@

R Package

install.packages("learnr")
 learnr::run_tutorial("introduction", package = "mypackage")
-

Exercise Checkers

+

Exercise Checkers

Note that if your tutorial performs exercise checking via an external package then you should be sure to add the package you use for checking as an Imports dependency of your package so it’s installed automatically along with your package.

Note that it’s likely that the learnr package will eventually include or depend on another package that provides checking functions. For the time being though explicit installation of external checking packages is a requirement.

diff --git a/docs/questions.html b/docs/questions.html index 4646a9b84..4b7a8ed3b 100644 --- a/docs/questions.html +++ b/docs/questions.html @@ -13,7 +13,7 @@ Questions - + diff --git a/docs/site_libs/header-attrs-2.1.1/header-attrs.js b/docs/site_libs/header-attrs-2.1/header-attrs.js similarity index 100% rename from docs/site_libs/header-attrs-2.1.1/header-attrs.js rename to docs/site_libs/header-attrs-2.1/header-attrs.js diff --git a/revdep/README.md b/revdep/README.md index b9c283760..2d7b635d9 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -3,21 +3,20 @@ |field |value | |:--------|:----------------------------| |version |R version 3.6.1 (2019-07-05) | -|os |macOS Mojave 10.14.6 | +|os |macOS Catalina 10.15.2 | |system |x86_64, darwin15.6.0 | |ui |X11 | |language |(EN) | |collate |en_US.UTF-8 | |ctype |en_US.UTF-8 | |tz |America/New_York | -|date |2019-11-08 | +|date |2020-02-12 | # Dependencies -|package |old |new |Δ | -|:-------|:-------|:------|:--| -|learnr |0.9.2.1 |0.10.0 |* | -|Rcpp |NA |1.0.2 |* | +|package |old |new |Δ | +|:-------|:------|:------|:--| +|learnr |0.10.0 |0.10.1 |* | # Revdeps diff --git a/tests/testthat.R b/tests/testthat.R index a9c04603a..566a3a16e 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -1,4 +1,7 @@ -library(testthat) -library(learnr) -test_check("learnr") +if (requireNamespace("testthat")) { + library(testthat) + library(learnr) + + test_check("learnr") +}