diff --git a/.github/workflows/assign-pr-to-creator.yml b/.github/workflows/assign-pr-to-creator.yml new file mode 100644 index 0000000..3836697 --- /dev/null +++ b/.github/workflows/assign-pr-to-creator.yml @@ -0,0 +1,24 @@ +name: Assign PR to creator + +on: + pull_request: + types: + - reopened + - opened + +permissions: + pull-requests: write + +jobs: + assign-pr-to-creator: + name: Assign PR to creator + runs-on: ubuntu-latest + steps: + - name: Assign PR to creator + if: ${{ github.event_name == 'pull_request' }} + run: | + gh pr edit $PR --add-assignee $AUTHOR + env: + AUTHOR: ${{ github.event.pull_request.user.login }} + PR: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/_extensions/rostools/r3-theme/_extension.yml b/_extensions/rostools/r3-theme/_extension.yml index 24021df..87e776e 100644 --- a/_extensions/rostools/r3-theme/_extension.yml +++ b/_extensions/rostools/r3-theme/_extension.yml @@ -1,16 +1,18 @@ title: r3-theme author: Luke W. Johnston -version: 1.0.3 -quarto-required: ">=1.2.0" +version: 1.0.5 +quarto-required: ">=1.3.0" contributes: format: html: + highlight-style: a11y + code-line-numbers: true df-print: tibble code-overflow: scroll from: markdown+emoji code-link: true theme: - - litera + - zephyr - custom-site.scss revealjs: @@ -33,14 +35,13 @@ contributes: favicon: "favicon.ico" repo-branch: main repo-actions: [edit, issue, source] - search: - location: navbar - type: overlay + search: true execute: - freeze: auto warning: false + csl: vancouver.csl + callout-appearance: minimal reference-location: margin crossref: @@ -48,7 +49,6 @@ contributes: knitr: opts_chunk: - class-output: sourceCode comment: "#>" fig-dpi: 72 fig-width: 5.5 diff --git a/_extensions/rostools/r3-theme/custom-site.scss b/_extensions/rostools/r3-theme/custom-site.scss index 38e5942..993d408 100644 --- a/_extensions/rostools/r3-theme/custom-site.scss +++ b/_extensions/rostools/r3-theme/custom-site.scss @@ -9,13 +9,12 @@ $font-family-serif: "Nanum Gothic", sans-serif !default; $font-family-sans-serif: "Nanum Gothic", sans-serif !default; $headings-font-family: "Cabin", sans-serif !default; $font-size-root: 18px !default; -$code-block-border-left: "grey60" !default; /*-- scss:rules --*/ svg { display: block; - max-width: 100%; + max-width: 100% !important; margin: 0 auto; height: auto !important; width: auto !important; @@ -26,3 +25,7 @@ svg { width: 100%; height: 425px; } + +kbd { + padding: .15rem .15rem; +} diff --git a/_variables.yml b/_variables.yml index 8e53b2a..ca8a49d 100644 --- a/_variables.yml +++ b/_variables.yml @@ -1,20 +1,19 @@ -# Automatically created by `r3admin::copy_common_file('_variables.yml')` on 2023-11-04. keybind: - palette: '{{< kbd linux=Ctrl-Shift-P mac=Cmd-Shift-P win=Ctrl-Shift-P >}}' - git: '{{< kbd linux=Ctrl-Alt-M mac=Cmd-Option-M win=Ctrl-Alt-M >}} or with the Palette ({{< var keybind.palette >}}, then type "commit")' - chunk: '{{< kbd linux=Ctrl-Alt-I mac=Cmd-Option-I win=Ctrl-Alt-I >}} or with the Palette ({{< var keybind.palette >}}, then type "new chunk")' - restart-r: '{{< kbd linux=Ctrl-Shift-F10 mac=Cmd-Shift-F10 win=Ctrl-Shift-F10 >}} or with the Palette ({{< var keybind.palette >}}, then type "restart")' - source: '{{< kbd linux=Ctrl-Shift-S mac=Cmd-Shift-S win=Ctrl-Shift-S >}} or with the Palette ({{< var keybind.palette >}}, then type "source")' - render: '{{< kbd linux=Ctrl-Shift-K mac=Cmd-Shift-K win=Ctrl-Shift-K >}} or with the Palette ({{< var keybind.palette >}}, then type "render")' - roxygen: '{{< kbd linux=Ctrl-Shift-Alt-R mac=Cmd-Shift-Alt-R win=Ctrl-Shift-Alt-R >}} or with the Palette ({{< var keybind.palette >}}, then type "roxygen comment")' - outline: '{{< kbd linux=Ctrl-Shift-O mac=Cmd-Shift-O win=Ctrl-Shift-O >}} or with the Palette ({{< var keybind.palette >}}, then type "outline")' + palette: '{{< kbd Ctrl-Shift-P >}}' + git: '{{< kbd Ctrl-Alt-M >}} or with the Palette ({{< var keybind.palette >}}, then type "commit")' + chunk: '{{< kbd Ctrl-Alt-I >}} or with the Palette ({{< var keybind.palette >}}, then type "new chunk")' + restart-r: '{{< kbd Ctrl-Shift-F10 >}} or with the Palette ({{< var keybind.palette >}}, then type "restart")' + source: '{{< kbd Ctrl-Shift-S >}} or with the Palette ({{< var keybind.palette >}}, then type "source")' + render: '{{< kbd Ctrl-Shift-K >}} or with the Palette ({{< var keybind.palette >}}, then type "render")' + roxygen: '{{< kbd Ctrl-Shift-Alt-R >}} or with the Palette ({{< var keybind.palette >}}, then type "roxygen comment")' + outline: '{{< kbd Ctrl-Shift-O >}} or with the Palette ({{< var keybind.palette >}}, then type "outline")' styler: 'the Palette ({{< var keybind.palette >}}, then type "style file")' - outline: '{{< kbd linux=Ctrl-Shift-O mac=Cmd-Shift-O win=Ctrl-Shift-O >}} or with the Palette ({{< var keybind.palette >}}, then type "outline")' - targets_make: 'the Palette ({{< var keybind.palette >}}, then type "targets run")' - targets_vis: 'the Palette ({{< var keybind.palette >}}, then type "targets visual")' - targets_outdated: 'the Palette ({{< var keybind.palette >}}, then type "targets outdated")' - build_site: '{{< kbd linux=Ctrl-Shift-B mac=Cmd-Shift-B win=Ctrl-Shift-B >}}' - find: '{{< kbd linux=Ctrl-Shift-F mac=Cmd-Shift-F win=Ctrl-Shift-F >}} or with the Palette ({{< var keybind.palette >}}, then type "find files")' - visual_edit: '{{< kbd linux=Ctrl-Shift-F4 mac=Cmd-Shift-F4 win=Ctrl-Shift-F4 >}}' - - + targets-make: 'the Palette ({{< var keybind.palette >}}, then type "targets run")' + targets-vis: 'the Palette ({{< var keybind.palette >}}, then type "targets visual")' + targets-outdated: 'the Palette ({{< var keybind.palette >}}, then type "targets outdated")' + build-site: '{{< kbd Ctrl-Shift-B >}}' + find: '{{< kbd Ctrl-Shift-F >}} or with the Palette ({{< var keybind.palette >}}, then type "find files")' + visual-edit: '{{< kbd Ctrl-Shift-F4 >}}' + pipe: '{{< kbd Ctrl-Shift-M >}}' + code-section: '{{< kbd Ctrl-Shift-R >}} or with the Palette ({{< var keybind.palette >}}, then type "code section")' + run-code: '{{< kbd Ctrl-Enter >}}' diff --git a/sessions/stats-analyses-multiple.qmd b/sessions/stats-analyses-multiple.qmd index 4e7e637..35e71be 100644 --- a/sessions/stats-analyses-multiple.qmd +++ b/sessions/stats-analyses-multiple.qmd @@ -327,10 +327,14 @@ to add the original variable names. Then we can add our first > Time: \~25 minutes. -Convert the code that calculates the model estimates as well as the code -that adds the original metabolite names into functions. Start with the -code for the metabolite names, using the scaffold below as a starting -point. +::: {.callout-warning appearance="default"} +There are two parts to this exercise and two solution chunks. +::: + +**Part 1**: Convert the code that calculates the model estimates as well +as the code that adds the original metabolite names into functions. +Start with the code for the metabolite names, using the scaffold below +as a starting point. 1. Name the new function `add_original_metabolite_names`. 2. Within the `function()`, add two arguments, where the first is @@ -370,8 +374,8 @@ add_original_metabolite_names <- function(model_results, data) { } ``` -Do the same thing with the code that creates the model results, using -the scaffold below as a starting point. +**Part 2**: Do the same thing with the code that creates the model +results, using the scaffold below as a starting point. ``` r calculate_estimates <- function(data) { @@ -714,4 +718,3 @@ targets::tar_make() than fewer, bigger ones. - Use dot-whisker plots like `geom_pointrange()` to visualize the estimates and their standard error. -