diff --git a/09-student_guide.Rmd b/09-student_guide.Rmd new file mode 100644 index 0000000..d6fff4a --- /dev/null +++ b/09-student_guide.Rmd @@ -0,0 +1,10 @@ + +# Student Guide + +## Activity One + +You might want to create a student guide that contains a different subset of Rmd files from your book, or renders to a different output format (e.g. word document). You can specify the output and Rmd files that will be used for the student guide using the `_output.yml` and `_bookdown.yml` files in the student-guide directory. + +## Activity Two + +Steps of the guide could go here. \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 1c0c6e0..0000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -FROM rocker/tidyverse:4.0.2 -LABEL maintainer="cansav09@gmail.com" -WORKDIR /rocker-build/ - -COPY install_github.R . - -# Install apt-getable packages to start -RUN apt-get update && apt-get install -y --no-install-recommends apt-utils dialog -RUN apt-get install -y --no-install-recommends \ - libxt6 \ - libpoppler-cpp-dev \ - vim \ - libglpk40 \ - curl \ - gpg - -# Install gh -RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg; -RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null; -RUN apt update && apt install -y gh; - -# Remove old symlinks to old pandoc -RUN unlink /usr/lib/rstudio-server/bin/pandoc/pandoc - -# Uninstall old version of pandoc -RUN sudo apt-get purge pandoc pandoc-citeproc pandoc-data \ - && sudo apt-get autoremove --purge - -# Install pandoc -RUN wget https://github.com/jgm/pandoc/releases/download/2.14.1/pandoc-2.14.1-1-amd64.deb \ - && sudo apt-get install ./pandoc-2.14.1-1-amd64.deb - -# Create new symlinks -RUN ln -s /usr/bin/pandoc /usr/lib/rstudio-server/bin/pandoc/pandoc - -# Add curl, bzip2 -RUN apt-get update -qq && apt-get -y --no-install-recommends install \ - bzip2 \ - curl - -# Install pip3 and installation tools -RUN apt-get -y --no-install-recommends install \ - python3-pip python3-dev - -# Commonly used R packages -RUN Rscript -e "options(warn = 2);install.packages( \ - c('bookdown', \ - 'here', \ - 'leanpubr', \ - 'optparse', \ - 'oro.nifti', \ - 'qpdf', \ - 'R.utils', \ - 'rprojroot', \ - 'rgoogleslides', \ - 'servr', \ - 'spelling', \ - 'styler', \ - 'reticulate'), \ - repos = 'https://cloud.r-project.org/')" - -# cow needs this dependency: -RUN Rscript -e "devtools::install_version('gitcreds', version = '0.1.1', repos = 'http://cran.us.r-project.org')" - -# Didactr needs this dependency: -RUN Rscript -e "devtools::install_version('lifecycle', version = '1.0.0', repos = 'http://cran.us.r-project.org')" - -# Copy over git token and package list -COPY git_token.txt . -COPY github_package_list.tsv . - -# Install packages from github -RUN Rscript install_github.R \ - --packages github_package_list.tsv \ - --token git_token.txt - -# Set final workdir for commands -WORKDIR /home/rstudio diff --git a/docker/Dockerfile_ottrpal b/docker/Dockerfile_ottrpal deleted file mode 100644 index 692e5b7..0000000 --- a/docker/Dockerfile_ottrpal +++ /dev/null @@ -1,29 +0,0 @@ -FROM jhudsl/course_template:main -LABEL maintainer="cansav09@gmail.com" - -# Install apt-getable packages to start -RUN apt-get update && apt-get install -y --no-install-recommends apt-utils dialog - -RUN apt-get install -y --no-install-recommends \ - libxt6 \ - libpoppler-cpp-dev \ - vim \ - libglpk40 \ - curl \ - gpg - -# Install R -RUN apt-get update && apt-get install -y r-base curl - -# Install R packages -RUN Rscript -e "install.packages('curl')" - -# Install phantomjs -RUN apt-get update && apt-get install build-essential chrpath libssl-dev libxft-dev -y \ - && apt-get install libfontconfig1 libfontconfig1-dev -y \ - && cd ~ && export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" \ - && wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2 \ - && sudo tar xvjf $PHANTOM_JS.tar.bz2 \ - && sudo mv $PHANTOM_JS /usr/local/share \ - && sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin \ - && phantomjs --version diff --git a/docker/github_package_list.tsv b/docker/github_package_list.tsv deleted file mode 100644 index e587cda..0000000 --- a/docker/github_package_list.tsv +++ /dev/null @@ -1,10 +0,0 @@ -rstudio/rmarkdown 02d3c2512686fda9c14c2a0e300aa02525f16ca5 -yihui/xfun 74c2a6605d8f0fb19314da542baeead6dc8697d9 -yihui/knitr a1052d12e0ff8f4ead365b4c85ef5835faa1c492 -r-lib/rlang f0c9be5c5806b4e4b120b7516f286fef3c66bda5 -jhudsl/didactr cde4598c10f2b5e2e31b47fe94ca1b02db420e10 -jhudsl/ottrpal HEAD -tidyverse/rvest 4fe39fb5089512d77b6a9cc026e5c895258ff6ce -R-lib/testthat e99155af85261e065192feb946dcfa6679cffae4 -rstudio/bookdown 88bc4ead8562ea281838041c795b38fc4a6a7165 -jhudsl/cow HEAD \ No newline at end of file diff --git a/docker/install_github.R b/docker/install_github.R deleted file mode 100644 index fb532ec..0000000 --- a/docker/install_github.R +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env Rscript - -if (!"optparse" %in% installed.packages()) { - install.packages("optparse") -} - -library(optparse) - -################################ Set up options ################################ -# Set up optparse options -option_list <- list( - make_option( - opt_str = c("-p", "--packages"), type = "character", - default = "github_package_list.tsv" , - help = "Path to a TSV with a list of packages to be installed through Github, - where file where the first column is the github package name e.g. - jhudsl/ottrpal and the second column is the commit ID to be installed - (to be supplied to the ref argument). - ", - metavar = "character" - ), - make_option( - opt_str = c("--token"), type = "character", - default = NULL, - help = "GITHUB PAT file", - metavar = "character" - ) -) - -# Parse options -opt <- parse_args(OptionParser(option_list = option_list)) - -# Read in the token -token <- as.character(readLines(opt$token)[1]) - -# Reset GITHUB PAT to be token -Sys.unsetenv("GITHUB_PAT") -Sys.setenv(GITHUB_PAT = token) - -# set up list of packages to install -packages <- readr::read_tsv(opt$packages, - col_names = c("package_name", "ref")) - -purrr::pmap( - packages, - ~remotes::install_github(..1, - auth_token = token, - ref = ..2) - ) - -# Remove the file after we are done -file.remove(opt$token) diff --git a/resources/TEMPLATE_Dockerfile b/resources/TEMPLATE_Dockerfile deleted file mode 100644 index f68ae97..0000000 --- a/resources/TEMPLATE_Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM jhudsl/course_template:main -LABEL maintainer="your_email.com" - -#################### EXAMPLES OF INSTALLING PACKAGES ########################### -# Install a Linux/Ubuntu package -# RUN apt-get update && apt-get install -y --no-install-recommends \ -# package_name - -# Install a package from CRAN -# RUN Rscript -e "options(warn = 2);install.packages( \ -# c('package_name'), \ -# repos = 'https://cloud.r-project.org/')" - -# Install a package from Bioconductor -# RUN Rscript -e "options(warn = 2); BiocManager::install( \ -# c('package_name') - -# Add a python package -# RUN RUN pip3 install \ -# "somepackage==0.1.0" diff --git a/resources/exclude_files.txt b/resources/exclude_files.txt new file mode 100644 index 0000000..5525a40 --- /dev/null +++ b/resources/exclude_files.txt @@ -0,0 +1,8 @@ +About.Rmd +docs/* +style-sets/* +manuscript/* +CONTRIBUTING.md +LICENSE.md +code_of_conduct.md +README.md