diff --git a/scripts/AnVIL_Feedback_Script.sh b/.github/AnVIL_Feedback_Script.sh
similarity index 100%
rename from scripts/AnVIL_Feedback_Script.sh
rename to .github/AnVIL_Feedback_Script.sh
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index a137bc48..de764597 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -171,7 +171,7 @@ jobs:
id: feedback
if: ${{needs.yaml-check.outputs.toggle_feedback_link == 'yes'}}
run: |
- bash scripts/AnVIL_Feedback_Script.sh
+ bash .github/AnVIL_Feedback_Script.sh
git add _output.yml
git commit -m 'Set up feedback link' || echo "No changes to commit"
diff --git a/.github/workflows/render-all.yml b/.github/workflows/render-all.yml
index 36a4cae0..177b4a9c 100644
--- a/.github/workflows/render-all.yml
+++ b/.github/workflows/render-all.yml
@@ -67,7 +67,7 @@ jobs:
- name: Set up feedback link
if: ${{needs.yaml-check.outputs.toggle_feedback_link == 'yes'}}
run: |
- bash scripts/AnVIL_Feedback_Script.sh
+ bash .github/AnVIL_Feedback_Script.sh
git add _output.yml
git commit -m 'Set up feedback link' || echo "No changes to commit"
diff --git a/_output.yml b/_output.yml
index 97ea280e..a5168361 100644
--- a/_output.yml
+++ b/_output.yml
@@ -2,6 +2,7 @@ bookdown::gitbook:
# When using multiple css files, the default file path will be the first one #
css: [assets/style.css, assets/AnVIL_style/anvil.css]
includes:
+ in_header: GA_Script.html
before_body: assets/AnVIL_style/big-image_anvil.html
after_body: assets/AnVIL_style/footer.html
highlight: tango
@@ -15,6 +16,6 @@ bookdown::gitbook:
The Johns Hopkins Data Science Lab
Style adapted from: rstudio4edu-book (CC-BY 2.0)
-
+
-# Note: Do not edit the feedback link in this file. This is automatically edited through the render-preview and render-bookdown workflows.
\ No newline at end of file
+# Note: Do not edit the feedback link in this file. This is automatically edited through the render-preview and render-bookdown workflows.
diff --git a/assets/GDSCN_style/logo_BioDIGS_final.png b/assets/GDSCN_style/logo_BioDIGS_final.png
new file mode 100644
index 00000000..8bbc378e
Binary files /dev/null and b/assets/GDSCN_style/logo_BioDIGS_final.png differ
diff --git a/assets/GDSCN_style/powered-by-anvil.png b/assets/GDSCN_style/powered-by-anvil.png
new file mode 100644
index 00000000..c6d5f091
Binary files /dev/null and b/assets/GDSCN_style/powered-by-anvil.png differ
diff --git a/index.Rmd b/index.Rmd
index dfe1b1c2..29e88a3f 100644
--- a/index.Rmd
+++ b/index.Rmd
@@ -41,4 +41,3 @@ _Programming skills_
Additional guides are provided to help you with Workspaces, launch interactive tools, and start working with data. Learn more about AnVIL by visiting https://anvilproject.org or reading the [article in Cell Genomics](https://www.sciencedirect.com/science/article/pii/S2666979X21001063).
Please check out our full collection of AnVIL and related resources: https://hutchdatascience.org/AnVIL_Collection/
-
diff --git a/scripts/git_repo_check.R b/scripts/git_repo_check.R
deleted file mode 100644
index fd4b8f56..00000000
--- a/scripts/git_repo_check.R
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/usr/bin/env Rscript
-
-# Written by Candace Savonen Sept 2021
-
-if (!("optparse" %in% installed.packages())){
- install.packages("optparse")
-}
-
-library(optparse)
-
-option_list <- list(
- optparse::make_option(
- c("--repo"),
- type = "character",
- default = NULL,
- help = "GitHub repository name, e.g. jhudsl/OTTR_Template",
- ),
- optparse::make_option(
- c("--git_pat"),
- type = "character",
- default = NULL,
- help = "GitHub personal access token",
- )
-)
-
-# Read the arguments passed
-opt_parser <- optparse::OptionParser(option_list = option_list)
-opt <- optparse::parse_args(opt_parser)
-
-repo <- opt$repo
-git_pat <- opt$git_pat
-
-if (!is.character(repo)) {
- repo <- as.character(repo)
-}
-
-check_git_repo <- function(repo, git_pat = NULL, silent = TRUE, return_repo = FALSE) {
- # Given a repository name, check with git ls-remote whether the repository
- # exists and return a TRUE/FALSE
-
- # Inputs:
- # repo: the name of the repository, e.g. jhudsl/OTTR_Template
- # git_pat: A personal access token from GitHub. Only necessary if the repository being
- # checked is a private repository.
- # silent: TRUE/FALSE of whether the warning from the git ls-remote command
- # should be echoed back if it does fail.
- # return_repo: TRUE/FALSE of whether or not the output from git ls-remote
- # should be saved to a file (if the repo exists)
-
- # Returns:
- # A TRUE/FALSE whether or not the repository exists.
- # Optionally the output from git ls-remote if return_repo = TRUE.
-
- message(paste("Checking for remote git repository:", repo))
-
- # If silent = TRUE don't print out the warning message from the 'try'
- report <- ifelse(silent, suppressWarnings, message)
-
- if (!is.null(git_pat)) {
- # If git_pat is supplied, use it
- test_repo <- report(
- try(system(paste0("git ls-remote https://", git_pat, "@github.com/", repo),
- intern = TRUE, ignore.stderr = TRUE
- ))
- )
- } else {
-
- # Try to git ls-remote the repo given
- test_repo <- report(
- try(system(paste0("git ls-remote https://github.com/", repo),
- intern = TRUE, ignore.stderr = TRUE
- ))
- )
- }
- # If 128 is returned as a status attribute it means it failed
- exists <- ifelse(is.null(attr(test_repo, "status")), TRUE, FALSE)
-
- if (return_repo && exists) {
- # Make file name
- output_file <- paste0("git_ls_remote_", gsub("/", "_", repo))
-
- # Tell the user the file was saved
- message(paste("Saving output from git ls-remote to file:", output_file))
-
- # Write to file
- writeLines(exists, file.path(output_file))
- }
-
- return(exists)
-}
-
-# Change repo name to its Leanpub equivalent:
-repo <- gsub("_Template", "", repo)
-repo <- paste0(repo, "_Quizzes")
-
-# Print out the result
-write(check_git_repo(repo, git_pat = git_pat), stdout())
diff --git a/scripts/make_screenshots.R b/scripts/make_screenshots.R
deleted file mode 100644
index c57a182e..00000000
--- a/scripts/make_screenshots.R
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env Rscript
-# Written by Candace Savonen Jan 2022
-
-if (!('devtools' %in% installed.packages())) {
- # install.packages("remotes", repos = "http://cran.us.r-project.org")
-}
-
-if (!('optparse' %in% installed.packages())) {
- # install.packages("optparse", repos = "http://cran.us.r-project.org")
-}
-
-webshot::install_phantomjs()
-
-library(optparse)
-library(magrittr)
-
-option_list <- list(
- optparse::make_option(
- c("--repo"),
- type = "character",
- default = NULL,
- help = "GitHub repository name, e.g. jhudsl/OTTR_Template",
- ),
- optparse::make_option(
- c("--git_pat"),
- type = "character",
- default = NULL,
- help = "GitHub personal access token",
- ),
- optparse::make_option(
- c("--output_dir"),
- type = "character",
- default = "resources/chapt_screen_images",
- help = "Output directory where the chapter's screen images should be stored",
- ),
- optparse::make_option(
- c("--base_url"),
- type = "character",
- default = NULL,
- help = "Output directory where the chapter's screen images should be stored",
- )
-)
-
-# Read the arguments passed
-opt_parser <- optparse::OptionParser(option_list = option_list)
-opt <- optparse::parse_args(opt_parser)
-
-output_folder <- file.path(opt$output_dir)
-if (!dir.exists(output_folder)) {
- dir.create(output_folder, recursive = TRUE)
-}
-
-if (is.null(opt$base_url)) {
- base_url <- cow::get_pages_url(repo_name = opt$repo, git_pat = opt$git_pat)
- base_url <- gsub("/$", "", base_url)
-}
-
-chapt_df <- ottrpal::get_chapters(base_url = file.path(base_url, "no_toc/"))
-
-file_names <- lapply(chapt_df$url, function(url) {
- file_name <- gsub(".html", ".png", file.path(output_folder, basename(url)))
- # Get rid of special characters
- webshot::webshot(url, file_name)
- file_name <- gsub(":|?|!|\\'", "", file_name)
- message(paste("Screenshot saved:", file_name))
- return(file_name)
-})
-
-# Save file of chapter urls and file_names
-chapt_df %>%
- dplyr::mutate(img_path = unlist(file_names)) %>%
- readr::write_tsv(file.path(output_folder, "chapter_urls.tsv"))
-
-message(paste("Image Chapter key written to: ", file.path(output_folder, "chapter_urls.tsv")))
diff --git a/scripts/ottr-fy.R b/scripts/ottr-fy.R
deleted file mode 100644
index aa079cee..00000000
--- a/scripts/ottr-fy.R
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env Rscript
-
-# This script downloads all the files and sets up the folders you need to
-# OTTR-fy a repository that has markdown or R Markdown files
-
-system("git checkout -b 'robot/ottr-fy'")
-
-if (!('optparse' %in% installed.packages())) {
- install.packages("optparse")
-}
-library(optparse)
-library(magrittr)
-
-option_list <- list(
- optparse::make_option(
- c("--bookdown"),
- action = "store_true",
- help = "Is this a bookdown repository already? If used, means bookdown repo.",
- )
-)
-
-# Read the arguments passed
-opt_parser <- optparse::OptionParser(option_list = option_list)
-opt <- optparse::parse_args(opt_parser)
-
-# Find .git root directory
-root_dir <- rprojroot::find_root(rprojroot::has_dir(".git"))
-
-base_url <- "https://raw.githubusercontent.com/jhudsl/OTTR_Template/main/"
-
-needed_files <- c(
- ".github/workflows/pull_request.yml",
- ".github/workflows/render-all.yml",
- ".github/workflows/delete-preview.yml",
- "scripts/git_repo_check.R",
- "scripts/make_screenshots.R",
- "_bookdown.yml",
- "_output.yml",
- "book.bib",
- "config_automation.yml",
- "assets/big-image.html",
- "assets/footer.html"
- )
-
-# If this is bookdown, we don't want to copy over the bookdown.yml or output.yml files
-if (opt$bookdown) {
- needed_files <- setdiff(needed_files,
- c("_bookdown.yml", "_output.yml", "assets/big-image.html", "assets/footer.html", "book.bib"))
-}
-
-# Set up a file list with the destination locations as the names
-url_to_files <- paste0(base_url, needed_files)
-names(url_to_files) <- file.path(root_dir, needed_files)
-
-# Download the file in the respective place
-for (index in 1:length(url_to_files)) {
- dest_folder <- dirname(names(url_to_files)[index])
- if (!dir.exists(dest_folder)){
- dir.create(dest_folder, recursive = TRUE)
- }
- download.file(url = url_to_files[index], destfile = names(url_to_files)[index])
-}
-
-system("git add .")
-system("git config commit.gpgsign false")
-system("git commit -m 'Add ottr-fying files'")
-system("git push --set-upstream origin robot/ottr-fy")
diff --git a/style-sets/AnVIL/index.Rmd b/style-sets/AnVIL/index.Rmd
index 0ae46264..d204825a 100644
--- a/style-sets/AnVIL/index.Rmd
+++ b/style-sets/AnVIL/index.Rmd
@@ -38,3 +38,4 @@ Please check out our full collection of AnVIL and related resources: https://hut
+