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

refactor: ♻️ convert schedule from csv into Markdown table #36

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
.Rhistory
.RData
.Ruserdata
public
_site
/.quarto/
_freeze
26 changes: 0 additions & 26 deletions preamble/schedule.csv

This file was deleted.

79 changes: 32 additions & 47 deletions preamble/schedule.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,58 +12,43 @@ and others may be longer. Instead, it is meant to be an approximate
guide and overview.

::: panel-tabset
```{r schedule-table}
#| eval: true
#| echo: false
#| output: asis
library(dplyr)
add_link <- function(text, icon, link) {
colour <- "#138d75"
added_link <- paste0("<i class='fa-solid fa-", icon, "' style='color:", colour, "'></i>&nbsp;&nbsp;<a href=\"", link, "\">", text, "</a>")
if (link == "") {
added_link <- paste0("<i class='fa-solid fa-", icon, "' style='color:", colour, "'></i>&nbsp;&nbsp;", text)
}
return(htmltools::HTML(added_link))
}

schedule <- here::here("preamble/schedule.csv") %>%
readr::read_csv(col_types = "ccccc") %>%
mutate(across(everything(), ~ if_else(is.na(.x), "", .x))) %>%
mutate(
`Session topic` = list(`Session topic`, icon, link) %>%
purrr::pmap(~ add_link(..1, ..2, ..3)) %>%
unlist()
) %>%
select(-icon, -link)
```

## Day 1 {.unnumbered}

```{r}
#| echo: false
schedule %>%
filter(Day == "Day 1") %>%
select(-Day) %>%
knitr::kable()
```
| Time | Session topic |
|:------------|:----------------------------------------------------------|
| 9:30 | {{< fa mug-hot >}} Arrival. Coffee and snacks |
| 10:00 | {{< fa person-chalkboard >}} [Introduction to the course](../sessions/introduction.qmd) |
| 10:30 | {{< fa laptop-code >}} [Package setup](../sessions/package-setup.qmd) |
| 12:30 | {{< fa utensils >}} Lunch |
| 13:15 | {{< fa user-group >}} [Networking and social activity](../appendix/social.qmd#social-day-one) |
| 13:35 | {{< fa laptop-code >}} [Package setup](../sessions/package-setup.qmd) |
| 14:45 | {{< fa mug-hot >}} Break with coffee and snacks |
| 15:00 | {{< fa laptop-code >}} [Function development in a package environment](../sessions/function-development.qmd) |
| 16:30 | {{< fa comment-dots >}} End-of-day short survey |

## Day 2 {.unnumbered}

```{r}
#| echo: false
schedule %>%
filter(Day == "Day 2") %>%
select(-Day) %>%
knitr::kable()
```
| Time | Session topic |
|:------------|:----------------------------------------------------------|
| 9:00 | {{< fa laptop-code >}} [Documenting functions](../sessions/documenting-functions.qmd) |
| 10:15 | {{< fa mug-hot >}} Break with coffee, tea, and snacks |
| 10:30 | {{< fa laptop-code >}} [Creating formal tests of functions](../sessions/testing.qmd) |
| 12:30 | {{< fa utensils >}} Lunch |
| 13:15 | {{< fa user-group >}} [Networking and social activity](../appendix/social.qmd#social-day-two) |
| 13:35 | {{< fa laptop-code >}} [Debugging issues in your functions](../sessions/debugging.qmd) |
| 14:45 | {{< fa mug-hot >}} Break with coffee and snacks |
| 15:00 | {{< fa laptop-code >}} [Automated and independent testing](../sessions/automated-testing.qmd) |
| 16:30 | {{< fa comment-dots >}} End-of-day short survey |

## Day 3 {.unnumbered}

```{r}
#| echo: false
schedule %>%
filter(Day == "Day 3") %>%
select(-Day) %>%
knitr::kable()
```
:::
| Time | Session topic |
|:------------|:----------------------------------------------------------|
| 9:00 | {{< fa laptop-code >}} [Writing usage and guide documents](../sessions/writing-guides.qmd) |
| 10:15 | {{< fa mug-hot >}} Break with coffee and snacks |
| 11:00 | {{< fa laptop-code >}} [Creating a package website](../sessions/creating-website.qmd) |
| 12:30 | {{< fa utensils >}} Lunch |
| 13:15 | {{< fa user-group >}} [Project work](../appendix/project.qmd) |
| 16:00 | {{< fa person-chalkboard >}} [Closing remarks](../sessions/what-next.qmd) |
| 16:30 | {{< fa comment-dots >}} End-of-course short survey and farewell |
:::