From 07abe81fcd79e3389f0870c317dd0b89cd555be2 Mon Sep 17 00:00:00 2001 From: Jon Harmon Date: Thu, 14 Nov 2024 08:12:36 -0600 Subject: [PATCH] Use shared workflows. (#57) --- .github/workflows/deploy_bookdown.yml | 43 +---------- .github/workflows/pr_check.yml | 15 +--- .github/workflows/pr_check_readme.yml | 8 +- _bookdown.yml | 1 + index.Rmd | 104 +++++++++++++++++++++++--- 5 files changed, 101 insertions(+), 70 deletions(-) diff --git a/.github/workflows/deploy_bookdown.yml b/.github/workflows/deploy_bookdown.yml index ee689f9a..eaa103f8 100644 --- a/.github/workflows/deploy_bookdown.yml +++ b/.github/workflows/deploy_bookdown.yml @@ -5,47 +5,6 @@ on: - 'README.md' workflow_dispatch: -name: renderbook - jobs: bookdown: - name: Render-Book - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - uses: r-lib/actions/setup-r@v2 - - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - cache-version: 2 - - - name: Render Book - run: Rscript -e 'bookdown::render_book("index.Rmd")' - - uses: actions/upload-artifact@main - with: - name: _book - path: _book/ - -# Need to first create an empty gh-pages branch -# see https://pkgdown.r-lib.org/reference/deploy_site_github.html -# and also add secrets for a GH_PAT and EMAIL to the repository -# gh-action from Cecilapp/GitHub-Pages-deploy - checkout-and-deploy: - runs-on: ubuntu-latest - needs: bookdown - steps: - - name: Checkout - uses: actions/checkout@main - - name: Download artifact - uses: actions/download-artifact@v1.0.0 - with: - # Artifact name - name: _book # optional - # Destination path - path: _book # optional - - name: Deploy to GitHub Pages - uses: Cecilapp/GitHub-Pages-deploy@v2 - env: - EMAIL: ${{ secrets.EMAIL }} # must be a verified email - GH_TOKEN: ${{ secrets.GH_PAT }} # https://github.com/settings/tokens - BUILD_DIR: _book/ # "_site/" by default + uses: r4ds/r4dsactions/.github/workflows/render_pages.yml@main diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml index 4b57a53a..b7b9756d 100644 --- a/.github/workflows/pr_check.yml +++ b/.github/workflows/pr_check.yml @@ -1,4 +1,3 @@ -name: pr_check on: pull_request: branches: main @@ -7,15 +6,5 @@ on: workflow_dispatch: jobs: - bookdown: - name: pr_check_book - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@v2 - - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - cache-version: 2 - - name: Render Book - run: Rscript -e 'bookdown::render_book("index.Rmd")' + pr_check: + uses: r4ds/r4dsactions/.github/workflows/render_check.yml@main diff --git a/.github/workflows/pr_check_readme.yml b/.github/workflows/pr_check_readme.yml index 61bb18e5..82068e95 100644 --- a/.github/workflows/pr_check_readme.yml +++ b/.github/workflows/pr_check_readme.yml @@ -1,4 +1,3 @@ -name: pr_check on: pull_request: branches: main @@ -7,8 +6,5 @@ on: workflow_dispatch: jobs: - bookdown: - name: pr_check_book - runs-on: ubuntu-latest - steps: - - run: 'echo "No build required" ' + pr_check: + uses: r4ds/r4dsactions/.github/workflows/render_check_readme.yml@main diff --git a/_bookdown.yml b/_bookdown.yml index 00406a3e..d4c54a1d 100644 --- a/_bookdown.yml +++ b/_bookdown.yml @@ -1,5 +1,6 @@ book_filename: "bookclub-ggplot2_01" repo: "https://github.com/r4ds/bookclub-ggplot2" +edit: "https://github.com/r4ds/bookclub-ggplot2/edit/main/%s" output_dir: "_book" delete_merged_file: true language: diff --git a/index.Rmd b/index.Rmd index c4779d17..f995c120 100644 --- a/index.Rmd +++ b/index.Rmd @@ -8,7 +8,7 @@ bibliography: book.bib biblio-style: apalike link-citations: yes github-repo: r4ds/bookclub-ggplot2 -description: "This is the product of the Data Science Learning Community's Book Club." +description: "This is the product of the Data Science Learning Community's ggplot2 Book Club." --- # Welcome {-} @@ -16,14 +16,100 @@ description: "This is the product of the Data Science Learning Community's Book This is a companion for the book [ggplot2: Elegant Graphics for Data Analysis](https://ggplot2-book.org/index.html) by Hadley Wickham, Danielle Navarro, and Thomas Lin Pedersen. This companion is available at [https://r4ds.github.io/bookclub-ggplot2](https://r4ds.github.io/bookclub-ggplot2). -This website is being developed by the [Data Science Learning Community](https://dslc.io). Follow along, and [join the community](https://dslc.io/join) to participate. - -This companion follows the [Data Science Learning Community Code of Conduct](https://dslc.io/conduct). +- These are **shared slides!** + - Developed by the [Data Science Learning Community](https://dslc.io). + - [Join the community](https://dslc.io/join) to participate. + - Available at [dslc.io/ggplot2](https://dslc.io/ggplot2). +- We follow the [Data Science Learning Community Code of Conduct](https://dslc.io/conduct). ## Book club meetings {-} -- Each week, a volunteer will present a chapter from the book. - - **This is the best way to learn the material.** -- Presentations will usually consist of a review of the material, a discussion, and/or a demonstration of the principles presented in that chapter. -- More information about how to present is available in the [github repo](https://github.com/r4ds/bookclub-ggplot2). -- Presentations will be recorded, and will be available on the [Data Science Learning Community YouTube Channel](https://dslc.io/youtube). +- Volunteer leads discussion of a chapter (spreadsheet link in channel) + - **This is the best way to learn the material.** +- Presentations: + - Review of material + - Questions you have + - Maybe live demo +- More info about editing: [this github repo](https://github.com/r4ds/bookclub-ggplot2). +- Recorded, available on the [DSLC.video Community YouTube Channel](https://dslc.video). +- **Camera** is **optional,** but **encouraged.** + +## Pace {-} + +- Meet ***every*** week except holidays, etc + - We'll discuss even if presenter unavailable +- Meetings = **1 hour.** +- **Goal:** 1 chapter/week +- Ok to split overwhelming chapters +- Ok to combine short chapters +- If we need to **slow down** and discuss, **let me know.** + - Most likely someone has the same question + - We are all here to learn + +## Introductions {-} + +If you feel comfortable sharing, unmute or raise your hand! + +- **Who** are you? +- **Where** are you joining from? +- **Previous clubs?** (DSLC or other) +- **How long** have you been using R? +- **What** are you most looking forward to learning? + +## git and GitHub {-} + +- **Git/GitHub** (version control) = **valuable skill.** + - Discussed more in **Chapter 21.** +- If you present, best to **integrate your materials** into this bookdown version. +- You'll need a **GitHub account** to submit modifications. +- **Full instructions** in [GitHub repository](https://github.com/r4ds/bookclub-ggplot2) ("repo"). + +## Group Question 1 {-} + +(Submit answers in chat) + +On a scale from 1 - 5, how familiar are you with using git for version control? + +1 = Not at all familiar (a true beginner) + +to + +5 = Very familiar (use git everyday/can handle a merge conflict like a pro) + +## Group Question 2 {-} + +(Submit answers in chat) + +On a scale from 1 - 5, how familiar are you with using GitHub? + +1 = Not at all familiar (a true beginner) + +to + +5 = Very familiar (I have GitHub account with repositories) + +## Group Question 3 {-} + +(Submit answers in chat) + +On a scale from 1 - 5, how valuable would it be to devote a week to introducing git and GitHub? + +1 = Not at all valuable + +to + +5 = Very valuable + +## git and GitHub Resources {-} + +- [Happy Git and GitHub for the useR](https://happygitwithr.com/) +- [`usethis`'s pull request helpers](https://usethis.r-lib.org/articles/pr-functions.html) +- [`git`'s documentation](https://git-scm.com/doc) +- [MShiny Cohort 2 Introduction](https://www.youtube.com/watch?v=beOYuHG9Xng&list=PL3x6DOfs2NGjhwrYvdmrKRNcvXX7X6ldt) + +## Learning objectives {-} + +- Students who study with LOs in mind ***retain more.*** +- **Tips:** + - "After today's session, you will be able to..." + - *Very* roughly **1 per section.** \ No newline at end of file