| Title: | Deploy Empty Field Teaching Material |
|---|---|
| Description: | This package helps set up new teaching material and deploy courses based on the Empty Field teaching workflow. |
| Authors: | Malcolm Barrett [aut, cre] (ORCID: <https://orcid.org/0000-0003-0299-5825>) |
| Maintainer: | Malcolm Barrett <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.1 |
| Built: | 2026-05-24 05:45:57 UTC |
| Source: | https://github.com/emptyfield-ds/shunyata |
Open rendered, hostes slides
browse_slides(.module)browse_slides(.module)
.module |
the name of the module |
Check solutions hosted in emptyfield-ds/solutions
check_solutions(.file = NULL) check_shiny_solutions(.file = NULL)check_solutions(.file = NULL) check_shiny_solutions(.file = NULL)
.file |
The path of the files to check. If |
Create a new directory with R Markdown files for slides, exercises, and solutions.
create_module( module_dir, module_title, module_subtitle = "", include_exercises = TRUE, include_solutions = TRUE, include_img = TRUE )create_module( module_dir, module_title, module_subtitle = "", include_exercises = TRUE, include_solutions = TRUE, include_img = TRUE )
module_dir |
The directory name. Also the file name of the slides file. |
module_title |
The title of the module |
module_subtitle |
The subtitle of the module |
include_exercises |
Include |
include_solutions |
Include |
include_img |
Include an |
module_dir, invisibly.
Dehydrate and rehydrate rproj files for safe project hygiene
dehydrate_rproj(dir) rehydrate_rproj(dir)dehydrate_rproj(dir) rehydrate_rproj(dir)
dir |
The project directory |
a filename of either .Rproj or .dehydrated_Rproj
Copy a teaching package to a temporary directory and open it in RStudio
open_temp_module(module, github = TRUE, open = interactive())open_temp_module(module, github = TRUE, open = interactive())
module |
The path to a local module or the name of a repo on
|
github |
Use the copy of the module on GitHub? |
open |
Open in RStudio? |
Invisibly, the temporary directory where the module package has been copied
path_warehouse() uses the shunyata.teaching_warehouse option to assemble
an path to a given module.
path_warehouse(...)path_warehouse(...)
... |
Additional path details passed to |
A path
path_warehouse("purrr_basics")path_warehouse("purrr_basics")
Render Module Slides
render_slides(dir, qmd_name = NULL, render = TRUE)render_slides(dir, qmd_name = NULL, render = TRUE)
dir |
The directory where the module is located |
qmd_name |
The name of Quarto file. By default, assumes that it is the same
as |
render |
Logical. Render the Quarto file? |
Invisibly, the path to the rendered PDF
rsc_archive_course() removes members except for rsc_user_id, moving space
member projects to their own workspace.
rsc_archive_course( space_id, rsc_user_id = getOption("shunyata.rscloud_user_id") )rsc_archive_course( space_id, rsc_user_id = getOption("shunyata.rscloud_user_id") )
space_id |
The RStudio Cloud space ID |
rsc_user_id |
The user ID of the course lead |
Invisibly, the course ID
Remove files and directories that aren't needed for the student copy
sanitize_module( module, new_path = NULL, rm_files = c("theme.css", "kakashi.css", "solutions.qmd"), rm_dir = c("img", "libs", "_extensions"), overwrite = FALSE, build_slides = TRUE, qmd_name = NULL )sanitize_module( module, new_path = NULL, rm_files = c("theme.css", "kakashi.css", "solutions.qmd"), rm_dir = c("img", "libs", "_extensions"), overwrite = FALSE, build_slides = TRUE, qmd_name = NULL )
module |
The name of the module |
new_path |
Where to copy the sanitized directory |
rm_files |
Which files to remove |
rm_dir |
Which directories to remove |
overwrite |
Overwrite the sanitized module if it already exists? |
build_slides |
Logical. Render the slides? |
qmd_name |
The name of Quarto file. By default, assumes that it is the same
as |
invisibly, the path of the new module
sync_module() takes a raw teaching module, renders slides, sanitizes, and
syncs with the existing GitHub repo for the module. Use with
path_warehouse().
sync_module(.dir)sync_module(.dir)
.dir |
The path to the module |
A wrapper around usethis::use_template to use templates in this package.
use_course_template( template, save_as = template, data = list(), ignore = FALSE, open = FALSE )use_course_template( template, save_as = template, data = list(), ignore = FALSE, open = FALSE )
template |
Path to template file relative to |
save_as |
Path of file to create, relative to root of active project.
Defaults to |
data |
A list of data passed to the template. |
ignore |
Should the newly created file be added to |
open |
Open the newly created file for editing? Happens in RStudio, if
applicable, or via |
README
use_edu_cca_license() adds a Creative Commons Attribution 4.0 International
License to the README of an educational repository.
use_edu_cca_license(proj = usethis::proj_get())use_edu_cca_license(proj = usethis::proj_get())
proj |
The directory of the project, by default the usethis project. |
Invisibly, the path to the README
use_ef_github() creates a bare-bones repo intended for use with
sync_module()
use_ef_github(repo_name, private = FALSE)use_ef_github(repo_name, private = FALSE)
repo_name |
The name of the repo to be created |
private |
Logical. Should the repo be private? |
Opens the URL of the repo
read_deps() pulls the package dependencies in .deps for modules from GitHub
write_deps(deps, path = ".") detect_deps(path) read_deps(modules)write_deps(deps, path = ".") detect_deps(path) read_deps(modules)
deps |
A vector of dependencies |
path |
A path to the module |
modules |
A vector of modules |
A vector of module dependencies
zip_modules() zips modules in a directory for upload to RStudio Cloud, e.g.
the mastering_r_for_epi repository.
zip_modules()zip_modules()
invisibly, a vector of directories