diff --git a/.github/ISSUE_TEMPLATE/course-content-add.md b/.github/ISSUE_TEMPLATE/course-content-add.md
index 71213d8..1a5f795 100644
--- a/.github/ISSUE_TEMPLATE/course-content-add.md
+++ b/.github/ISSUE_TEMPLATE/course-content-add.md
@@ -3,15 +3,15 @@ name: New content idea
about: Suggest an idea for the course
title: ''
labels: ''
-assignees: cansavvy
+assignees:
---
-**Describe the your scope of your content idea**
-What will this cover and how does it relate to the current course material?
+## Describe the your scope of your content idea
+
-**Describe the learning objectives for your content idea**
-What will users learn from this new content?
+## Describe the learning objectives for your content idea
+
-**Additional context or resources**
-Add any other context or related resources we should know about?
+## Additional context or resources
+
diff --git a/.github/ISSUE_TEMPLATE/course-problem-report.md b/.github/ISSUE_TEMPLATE/course-problem-report.md
index 7d5b83f..26f6f36 100644
--- a/.github/ISSUE_TEMPLATE/course-problem-report.md
+++ b/.github/ISSUE_TEMPLATE/course-problem-report.md
@@ -1,27 +1,28 @@
---
name: Course Problem Report
about: Create a report to help improve the course
-title: problem
+title: [Problem]
labels: bug
-assignees: cansavvy
+assignees:
---
-**Describe what is not working with the course**
-A clear and concise description of what the bug is.
+## Describe what is not working with the course
+
-**To Reproduce**
-Steps to reproduce the behavior:
+## Steps to Reproduce
+
-**Expected behavior**
-A clear and concise description of what you expected to happen.
+## Expected behavior
+
-**Screenshots**
-If applicable, add screenshots to help explain your problem.
+## Screenshots
+
-**Additional context**
-Add any other context about the problem here.
+## Additional context
+
diff --git a/.github/workflows/render-bookdown.yml b/.github/workflows/render-bookdown.yml
index 61dd531..0db1b8c 100644
--- a/.github/workflows/render-bookdown.yml
+++ b/.github/workflows/render-bookdown.yml
@@ -15,7 +15,7 @@ on:
branches: [ main ]
paths:
- '**.Rmd'
- - docker/Dockerfile
+ - docker/*
- assets/*
jobs:
# This workflow contains a single job called "build-all"
@@ -67,17 +67,23 @@ jobs:
###### END OF DOCKER UPDATE CHUNK ##############################################
+ # We want a fresh run of the renders each time
+ - name: Delete old docs/*
+ run: rm -r docs/*
+
# Run bookdown rendering
- name: Run bookdown render
+ id: bookdown
run: |
docker run \
--mount type=bind,target=/home/rstudio,source=$PWD \
jhudsl/course_template \
- Rscript -e "bookdown::render_book('index.Rmd')"
+ Rscript -e "bookdown::render_book('index.Rmd', output_format = 'all')"
##### If you do not wish to host your course on Coursera, you can delete this section #####
# Run Coursera version
- name: Run Coursera version of render
+ id: coursera
run: |
docker run \
--mount type=bind,target=/home/rstudio,source=$PWD \
@@ -86,6 +92,15 @@ jobs:
##### End of Coursera rendering section ########################################
+ # This checks on the steps before it and makes sure that they completed.
+ # If the renders didn't complete we don't want to commit the file changes
+ - name: Check on render steps
+ if: steps.bookdown.outcome != 'success' || steps.coursera.outcome != 'success'
+ run: |
+ echo Bookdown status ${{steps.bookdown.outcome}}
+ echo Coursera status ${{steps.coursera.outcome}}
+ exit 1
+
# Commit the rendered bookdown files
- name: Commit rendered bookdown files
run: |
diff --git a/.github/workflows/render-preview.yml b/.github/workflows/render-preview.yml
index bdd65fb..5aa3c18 100644
--- a/.github/workflows/render-preview.yml
+++ b/.github/workflows/render-preview.yml
@@ -7,6 +7,8 @@ on:
pull_request:
branches: [ main ]
+permissions: write-all
+
jobs:
# This workflow contains a single job called "build-all"
build-all:
@@ -20,20 +22,24 @@ jobs:
with:
# get the full repo
fetch-depth: 0
- # use github PAT
- token: ${{ secrets.GH_PAT }}
+
+ # We want a fresh run of the renders each time
+ - name: Delete old docs/*
+ run: rm -r docs/*
# Run bookdown rendering
- name: Run bookdown render
+ id: bookdown
run: |
docker run \
--mount type=bind,target=/home/rstudio,source=$PWD \
jhudsl/course_template \
- Rscript -e "bookdown::render_book('index.Rmd')"
+ Rscript -e "bookdown::render_book('index.Rmd', output_format = 'all')"
##### If you do not wish to host your course on Coursera, you can delete this section #####
# Run Coursera version
- name: Run Coursera version of render
+ id: coursera
run: |
docker run \
--mount type=bind,target=/home/rstudio,source=$PWD \
@@ -42,35 +48,57 @@ jobs:
##### End of Coursera rendering section ########################################
+ # This checks on the steps before it and makes sure that they completed.
+ # If the renders didn't complete we don't want to commit the file changes
+ - name: Check on render steps
+ if: steps.bookdown.outcome != 'success' || steps.coursera.outcome != 'success'
+ run: |
+ echo Bookdown status ${{steps.bookdown.outcome}}
+ echo Coursera status ${{steps.coursera.outcome}}
+ exit 1
+
# Commit the rendered bookdown files
- name: Commit rendered bookdown files to development branch
+ id: commit
run: |
git checkout -b "preview-${{ github.event.pull_request.number }}"
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
+ changes=$(git diff --name-only origin/main -- docs)
git add -A
git commit -m 'Render bookdown preview' || echo "No changes to commit"
git push --force origin "preview-${{ github.event.pull_request.number }}" || echo "No changes to push"
+ if [[ -n $changes ]]; then
+ echo ::set-output name=changes::$(echo 'changes')
+ else
+ echo ::set-output name=changes::$(echo 'no_changes')
+ fi
+
- name: Find Comment
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
- body-includes: Re-rendered
+ body-includes: latest commit
- name: Build components of the comment
id: build-components
run: |
+ course_name=$(head -n 1 _bookdown.yml | cut -d'"' -f 2| tr " " "-")
bookdown_link=$(echo "https://htmlpreview.github.io/?https://raw.githubusercontent.com/$GITHUB_REPOSITORY/preview-${{ github.event.pull_request.number }}/docs/index.html")
coursera_link=$(echo "https://htmlpreview.github.io/?https://raw.githubusercontent.com/$GITHUB_REPOSITORY/preview-${{ github.event.pull_request.number }}/docs/coursera/index.html")
+ docx_link=$(echo "https://github.com/$GITHUB_REPOSITORY/raw/preview-${{ github.event.pull_request.number }}/docs/$course_name.docx")
echo ::set-output name=bookdown_link::$bookdown_link
echo ::set-output name=coursera_link::$coursera_link
+ echo ::set-output name=docx_link::$docx_link
echo ::set-output name=time::$(date +'%Y-%m-%d')
echo ::set-output name=commit_id::$GITHUB_SHA
+ echo ${{steps.commit.outputs.changes}}
- name: Create or update comment
+ if: steps.commit.outputs.changes == 'changes'
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
@@ -79,6 +107,19 @@ jobs:
Re-rendered previews from the latest commit:
- See [preview of Bookdown here](${{ steps.build-components.outputs.bookdown_link }})
- See [preview of Coursera version here](${{ steps.build-components.outputs.coursera_link }})
+ - Download the [preview of .docx file](${{ steps.build-components.outputs.docx_link }})
+
+ _Updated at ${{ steps.build-components.outputs.time }} with changes from ${{ steps.build-components.outputs.commit_id }}_
+ edit-mode: replace
+
+ - name: No comment if no changes
+ if: steps.commit.outputs.changes == 'no_changes'
+ uses: peter-evans/create-or-update-comment@v1
+ with:
+ comment-id: ${{ steps.fc.outputs.comment-id }}
+ issue-number: ${{ github.event.pull_request.number }}
+ body: |
+ The latest commit did not produce rendering changes.
_Updated at ${{ steps.build-components.outputs.time }} with changes from ${{ steps.build-components.outputs.commit_id }}_
edit-mode: replace
diff --git a/.github/workflows/transfer-rendered-files.yml b/.github/workflows/transfer-rendered-files.yml
index 6557a1c..9875bd0 100644
--- a/.github/workflows/transfer-rendered-files.yml
+++ b/.github/workflows/transfer-rendered-files.yml
@@ -106,6 +106,12 @@ jobs:
curl --fail -s ${base_url}/${line} > ${line}
done < "$input"
+
+ # Get rid of GA Script spec in output yaml
+ sed 's/GA_Script.Rhtml,//' _output.yml > output.txt
+ cat output.txt > _output.yml
+ rm output.txt
+
- name: Create PR with rendered docs files
if: ${{ steps.git_repo_check.outputs.git_results == 'TRUE' }}
uses: peter-evans/create-pull-request@v3
diff --git a/code_of_conduct.md b/code_of_conduct.md
index ced4b39..c4b61f6 100644
--- a/code_of_conduct.md
+++ b/code_of_conduct.md
@@ -58,7 +58,7 @@ representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported to the Jeff Leek at jtleek@hey.com.
+reported to Jeff Leek at jtleek@hey.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
diff --git a/scripts/spell-check.R b/scripts/spell-check.R
index 2e159ee..f364b0e 100644
--- a/scripts/spell-check.R
+++ b/scripts/spell-check.R
@@ -19,9 +19,10 @@ dictionary <- readLines(file.path(root_dir, 'resources', 'dictionary.txt'))
# Add mysterious emoji joining character
dictionary <- c(dictionary, spelling::spell_check_text("⬇️")$word)
-# Only declare `.Rmd` files
+# Only declare `.Rmd` files but not the ones in the style-sets directory
files <- list.files(pattern = 'Rmd$', recursive = TRUE, full.names = TRUE)
files <- grep("About.Rmd", files, ignore.case = TRUE, invert = TRUE, value = TRUE)
+files <- grep("style-sets", files, ignore.case = TRUE, invert = TRUE, value = TRUE)
# Run spell check
sp_errors <- spelling::spell_check_files(files, ignore = dictionary) %>%
diff --git a/style-sets/AnVIL/_output.yml b/style-sets/AnVIL/_output.yml
new file mode 100644
index 0000000..7440ec7
--- /dev/null
+++ b/style-sets/AnVIL/_output.yml
@@ -0,0 +1,16 @@
+bookdown::gitbook:
+ css: assets/style_anvil.css
+ includes:
+ before_body: assets/big-image.html
+ after_body: assets/footer.html
+ highlight: tango
+ config:
+ toc:
+ collapse: section
+ before: |
+
+ after: |
+
would */
+}
+
+.sourceCode pre {
+ margin: 0 !important; /* makes space above and below symmetrical*/
+}
+
+/* Footer */
+
+.footer {
+ font-family: "Lora", serif;
+ font-size: .85em;
+ color: #193a5c;
+}
\ No newline at end of file
diff --git a/style-sets/GDSCN/index.Rmd b/style-sets/GDSCN/index.Rmd
new file mode 100644
index 0000000..7717286
--- /dev/null
+++ b/style-sets/GDSCN/index.Rmd
@@ -0,0 +1,23 @@
+---
+title: "GDSCN: Course Name "
+date: "`r format(Sys.time(), '%B, %Y')`"
+site: bookdown::bookdown_site
+documentclass: book
+bibliography: [book.bib, packages.bib]
+biblio-style: apalike
+link-citations: yes
+description: "Description about Course/Book."
+favicon: assets/gdscn_favicon.ico
+---
+
+
+```{r include=FALSE}
+# automatically create a bib database for R packages
+knitr::write_bib(c(
+ .packages(), "bookdown", "knitr", "rmarkdown"
+), "packages.bib")
+```
+
+# About this Course {-}
+
+This course is part of a series of courses for the [The Genomic Data Science Community Network (GDSCN)](https://www.gdscn.org/home) is a group of educators gathered with the aim to bring genomic data science education to students at diverse institutions.
diff --git a/style-sets/data-trail/_output.yml b/style-sets/data-trail/_output.yml
new file mode 100644
index 0000000..4c7c20f
--- /dev/null
+++ b/style-sets/data-trail/_output.yml
@@ -0,0 +1,17 @@
+bookdown::gitbook:
+ css: assets/style_DataTrail.css
+ includes:
+ before_body: assets/big-image-DataTrail.html
+ after_body: assets/footer.html
+ highlight: tango
+ config:
+ toc:
+ collapse: section
+ before: |
+
+ after: |
+
would */
+}
+
+.sourceCode pre {
+ margin: 0 !important; /* makes space above and below symmetrical*/
+}
+
+/* Footer */
+
+.footer {
+ font-family: "Lora", serif;
+ font-size: .85em;
+ color: #193a5c;
+}
\ No newline at end of file
diff --git a/style-sets/data-trail/index.Rmd b/style-sets/data-trail/index.Rmd
new file mode 100644
index 0000000..34e0f3a
--- /dev/null
+++ b/style-sets/data-trail/index.Rmd
@@ -0,0 +1,38 @@
+---
+title: " Course Name "
+date: "`r format(Sys.time(), '%B, %Y')`"
+site: bookdown::bookdown_site
+documentclass: book
+bibliography: [book.bib, packages.bib]
+biblio-style: apalike
+link-citations: yes
+description: "Description about Course/Book."
+favicon: assets/DataTrail_favicon.ico
+---
+
+
+```{r include=FALSE}
+# automatically create a bib database for R packages
+knitr::write_bib(c(
+ .packages(), "bookdown", "knitr", "rmarkdown"
+), "packages.bib")
+```
+
+# About this Course {-}
+
+This course is part of a series of courses for [DataTrail](https://www.datatrail.org/). DataTrail is a no-cost, paid 14-week educational initiative for young-adult, high school and GED-graduates. DataTrail aims to equip members of underserved communities with the necessary skills and support required to work in the booming field of data science.
+
+DataTrail is a fresh take on workforce development that focuses on training both Black, Indigenous, and other people of color (BIPOC) interested in the data science industry and their potential employers.
+
+Offered by the Johns Hopkins Bloomberg School of Public Health, in partnership with local non-profits and Leanpub, DataTrail combines a mutually-intensive learning experience (MILE) with a whole-person ecosystem of support to allow aspiring data scientists and their employers to succeed.
+
+DataTrail uses mutually-intensive learning
+DataTrail joins aspiring data science scholars and expert-level data scientist mentors in a mutually-intensive learning experience (MILE).
+
+In the DataTrail MILE:
+
+Scholars engage in cutting-edge technical and soft skills training needed to enter the data science field.
+
+Mentors engage in anti-racism and mentorship training needed to be impactful mentors and informed colleagues on diverse data science teams.
+
+The social connections created along the way will fuel job opportunities for scholars and foster a more diverse, equitable, and inclusive climate at the mentors' institutions.
diff --git a/style-sets/itcr/_output.yml b/style-sets/itcr/_output.yml
new file mode 100644
index 0000000..4554097
--- /dev/null
+++ b/style-sets/itcr/_output.yml
@@ -0,0 +1,17 @@
+bookdown::gitbook:
+ css: assets/style_ITN.css
+ includes:
+ before_body: assets/big-image-itcr.html
+ after_body: assets/footer.html
+ highlight: tango
+ config:
+ toc:
+ collapse: section
+ before: |
+
+ after: |
+
would */
+}
+
+.sourceCode pre {
+ margin: 0 !important; /* makes space above and below symmetrical*/
+}
+
+/* Footer */
+
+.footer {
+ font-family: "Lora", serif;
+ font-size: .85em;
+ color: #193a5c;
+}
\ No newline at end of file
diff --git a/style-sets/itcr/index.Rmd b/style-sets/itcr/index.Rmd
new file mode 100644
index 0000000..33a998f
--- /dev/null
+++ b/style-sets/itcr/index.Rmd
@@ -0,0 +1,23 @@
+---
+title: "Informatics Technology for Cancer Research (ITCR): Course Name "
+date: "`r format(Sys.time(), '%B, %Y')`"
+site: bookdown::bookdown_site
+documentclass: book
+bibliography: [book.bib, packages.bib]
+biblio-style: apalike
+link-citations: yes
+description: "Description about Course/Book."
+favicon: assets/ITN_favicon.ico
+---
+
+
+```{r include=FALSE}
+# automatically create a bib database for R packages
+knitr::write_bib(c(
+ .packages(), "bookdown", "knitr", "rmarkdown"
+), "packages.bib")
+```
+
+# About this Course {-}
+
+This course is part of a series of courses for the [Informatics Technology for Cancer Research (ITCR)](https://itcr.cancer.gov/) called the Informatics Technology for Cancer Research Education Resource. This material was created by the ITCR Training Network (ITN) which is a collaborative effort of researchers around the United States to support cancer informatics and data science training through resources, technology, and events. This initiative is funded by the following grant: [National Cancer Institute (NCI)](https://www.cancer.gov/) UE5 CA254170. Our courses feature tools developed by ITCR Investigators and make it easier for principal investigators, scientists, and analysts to integrate cancer informatics into their workflows. Please see our website at [www.itcrtraining.org](www.itcrtraining.org) for more information.