Skip to content

Commit 34ac505

Browse files
authored
Initial commit
0 parents  commit 34ac505

File tree

777 files changed

+32638
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

777 files changed

+32638
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: New content idea
3+
about: Suggest an idea for the course
4+
title: ''
5+
labels: ''
6+
assignees:
7+
8+
---
9+
10+
## Describe the your scope of your content idea
11+
<!-- What will this cover and how does it relate to the current course material? -->
12+
13+
## Describe the learning objectives for your content idea
14+
<!-- What will users learn from this new content? -->
15+
16+
## Additional context or resources
17+
<!-- Add any other context or related resources we should know about? -->
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Course Problem Report
3+
about: Create a report to help improve the course
4+
title: [Problem]
5+
labels: bug
6+
assignees:
7+
8+
---
9+
10+
## Describe what is not working with the course
11+
<!-- A clear and concise description of what the bug is. -->
12+
13+
## Steps to Reproduce
14+
<!-- Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
-->
20+
21+
## Expected behavior
22+
<!-- A clear and concise description of what you expected to happen. -->
23+
24+
## Screenshots
25+
<!-- If applicable, add screenshots to help explain your problem. -->
26+
27+
## Additional context
28+
<!-- Add any other context about the problem here. -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!--This PR Template was modified from https://github.com/AlexsLemonade/OpenPBTA-analysis/blob/master/.github/PULL_REQUEST_TEMPLATE.md-->
2+
3+
### Purpose/implementation Section
4+
5+
#### What changes are being implemented in this Pull Request?
6+
7+
8+
9+
#### What was your approach?
10+
11+
12+
13+
#### What GitHub issue does your pull request address?
14+
15+
16+
17+
### Tell potential reviewers what kind of feedback you are soliciting.
18+
19+
20+
21+
### New Content Checklist
22+
23+
- [ ] New content/chapter is in an Rmd file with [this kind of format and headers](https://github.com/jhudsl/OTTR_Template/blob/main/02-chapter_of_course.Rmd).
24+
25+
- [ ] New content/chapter contains [Learning Objectives and are in the correct format](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-images-and-graphics#learning-objectives-formatting).
26+
27+
- [ ] [Bookdown successfully re-renders and any new content files have been added to the _bookdown.yml](https://github.com/jhudsl/OTTR_Template/wiki/Publishing-with-Bookdown).
28+
29+
- [ ] Spell check runs successfully in [Github actions style-n-check](https://github.com/jhudsl/OTTR_Template/wiki/How-to-set-up-and-customize-GitHub-actions-robots#spell-check)).
30+
31+
- [ ] Any newly necessary packages that are needed have been added to the [Dockerfile and image](https://github.com/jhudsl/OTTR_Template/wiki/Using-Docker#adding-packages-to-the-dockerfile).
32+
33+
- [ ] Images are in the [correct format for rendering](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-images-and-graphics#adding-images-and-graphics-in-text).
34+
35+
- [ ] Every new image has [alt text and is in a Google Slide](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-images-and-graphics#accessibility).
36+
37+
- [ ] Each slide is described in the notes of the slide so learners relying on a screen reader can access the content. See https://lastcallmedia.com/blog/accessible-comics for more guidance on this.
38+
39+
- [ ] The color palette choices of the slide are contrasted in a way that is friendly to those with color vision deficiencies.
40+
You can check this using [Color Oracle](https://colororacle.org/).
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
To help users report issues or areas of improvement for your course, you should provide a clear method of feedback for your users to route their concerns through.
3+
4+
A feedback method (Google Form) has already been provided for AnVIL and GDSCN courses. Github actions automatically populates the Google Form with the `title` field from [`index.Rmd`](https://github.com/jhudsl/AnVIL_Template/blob/main/index.Rmd) using the [AnVIL Feedback Script](https://github.com/jhudsl/AnVIL_Template/blob/main/scripts/AnVIL_Feedback_Script.sh).
5+
6+
- [ ] The `title` field has been filled out in the header yaml of `index.Rmd`.
7+
8+
*No further action is needed on your part*. However, if you would like to change the feedback method, you can do so by editing [this line of code](https://github.com/jhudsl/AnVIL_Template/blob/7c501e9804cf88a151832bb0a9bbc1eae9d23fdf/_output.yml#L19) in `_output.yml`.
9+
10+
[See these instructions](https://docs.google.com/document/d/1uhGafEkbtJL3ar3TVHqRFypwTbXjudHa7h2mXu53CkA/edit?usp=sharing) for how to manually create a feedback link for AnVIL / GDSCN content or events.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
If you want this repository to be added to the AnVIL Collection, make sure you do the following:
3+
4+
- Click the gear icon on the top right of the "Code" page next to "About"
5+
- [ ] Create a repository description
6+
- [ ] Add the homepage where your course will be rendered
7+
- [ ] Add a description of your course/content
8+
- [ ] Add the topic tag `anvil` or `gdscn`. You should also supply any other relevant tags.
9+
10+
Following these steps will also automatically add this repository to the [AnVIL Collection](https://hutchdatascience.org/AnVIL_Collection/) if this repository is owned by one of the DaSL organizations.
11+
12+
For more information on these settings see instructions in the [wiki pages](https://github.com/jhudsl/AnVIL_Template/wiki/The-AnVIL-Collection#adding-your-course-to-the-anvil-collection).
13+
14+
For more information about adding repositories to the DaSL Collection, see the [AnVIL Collection README](https://github.com/fhdsl/AnVIL_Collection#readme).
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
**Note these steps are only pertinent if you are setting up this course outside of the jhudsl organization**
3+
4+
For more information on these settings see instructions in the [getting started GitHub wiki pages](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-GitHub-secrets).
5+
6+
It's important that these are set up and named exactly what they are below in order for Github actions to work correctly.
7+
8+
To set up these repository secrets, on your repository's main Github page, go to `Settings` and scroll down to see `Secrets` on the left side menu bar.
9+
10+
- [ ] Set `GH_PAT`
11+
`Name`: `GH_PAT`
12+
`value`: A personal access token [following these instructions](https://github.com/jhudsl/OTTR_Template/wiki/Start-a-new-course#6-set-up-your-github-personal-access-token).
13+
Underneath `Select scopes`, check both `repo` and `workflow`.
14+
Then copy the PAT and save as the value.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Use this checklist to make sure your slides and images are set up correctly!
3+
4+
See [Setting Up Images and Graphics](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-images-and-graphics) for more info!
5+
6+
- [ ] Create your [course's main Google Slides](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-images-and-graphics)
7+
8+
- [ ] The slides use the [appropriate template](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-images-and-graphics).
9+
10+
- [ ] Each slide is described in the notes of the slide so learners relying on a screen reader can access the content. See https://lastcallmedia.com/blog/accessible-comics for more guidance on this.
11+
12+
- [ ] The color palette choices of the slide are contrasted in a way that is friendly to those with color vision deficiencies.
13+
You can check this using [Color Oracle](https://colororacle.org/).
14+
15+
- [ ] Every image is [inserted into the text](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-images-and-graphics#adding-images-and-graphics-in-text) using one of these options: `ottrpal::include_slide()`, `knitr::include_image()`, or this format: `<img src="blah.png" alt="SOMETHING">`.
16+
17+
- [ ] Every image has [alternative text added to it](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-images-and-graphics#adding-images-and-graphics-in-text).
18+
19+
- [ ] The beginning of each Rmd contains this chunk so the images are saved in the correct spot:
20+
21+
`````
22+
```{r, include = FALSE}
23+
ottrpal::set_knitr_image_path()
24+
```
25+
`````
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
For more information on these settings see instructions in the [getting started GitHub wiki pages](https://github.com/jhudsl/OTTR_Template/wiki/Start-a-new-course).
3+
4+
- [ ] This course repository is set to `public`.
5+
- [ ] [Add the `jhudsl-robot` as a collaborator to your repository.](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-your-repository-settings#add-jhudsl-robot-as-a-collaborator).
6+
- [ ] [GH_PAT has been set up as a GitHub secret](https://github.com/jhudsl/OTTR_Template/wiki/Start-a-new-course#6-set-up-your-github-personal-access-token)
7+
8+
- [ ] GitHub pages is turned on
9+
- [ ] Go to `Settings` > `Pages`. Underneath `Source`, choose `main` for the branch and select the `docs` folder. Then click `Save`.
10+
- [ ] Check `Enforce HTTPS`.
11+
12+
- [ ] [Github secret `GH_PAT` has been set](https://github.com/jhudsl/OTTR_Template/wiki/Start-a-new-course#6-set-up-your-github-personal-access-token)
13+
`Name`: `GH_PAT`
14+
`value`: A personal access token [following these instructions](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-token).
15+
Underneath `Select scopes`, check both `repo` and `workflow`.
16+
Then copy the PAT and save as the value.
17+
18+
- [ ] [Set branch protections settings](https://github.com/jhudsl/OTTR_Template/wiki/Start-a-new-course#9-set-up-branch-rules)
19+
- [ ] `main` branch has been set up:
20+
- [ ] `Require pull request reviews before merging` box is checked.
21+
- [ ] `Require status checks to pass before merging` box is checked.
22+
- [ ] Underneath that `Require branches to be up to date before merging` box is checked.
23+
- [ ] Click `Save` at the bottom of the page!
24+
25+
- [ ] [Customize GitHub actions](https://github.com/jhudsl/OTTR_Template/wiki/How-to-set-up-and-customize-GitHub-actions-robots) for what you will need in this course.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
[Follow the Wiki instructions here](https://github.com/jhudsl/OTTR_Template/wiki/Start-editing-your-course) for details on how to complete the items in this issue.
3+
4+
The following files need to be edited to get this new course started!
5+
6+
### Files that need edited upon creating a new course.
7+
8+
- [ ] `README.md` - Fill in all the `{ }`.
9+
- [ ] `index.Rmd` - `title:` should be updated.
10+
- [ ] `01-intro.Rmd` - replace the information there with information pertinent to this new course.
11+
- [ ] `02-chapter_of_course.Rmd` - This Rmd has examples of how to set things up, if you don't need it as a reference, it can be deleted.
12+
13+
### Files that need to be edited upon adding each new chapter (including upon creating a new course):
14+
15+
- [ ] `_bookdown.yml` - The list of Rmd files that need to be rendered needs to be updated. See [instructions](https://github.com/jhudsl/OTTR_Template/wiki/Publishing-with-Bookdown).
16+
- [ ] `book.bib` - any citations need to be added. See [instructions](https://github.com/jhudsl/OTTR_Template/wiki/Citations).
17+
18+
### Picking a style
19+
20+
See more [about customizing style on this page in the guide](https://github.com/jhudsl/OTTR_Template/wiki/Change-Title-&-Customize-style).
21+
By default this course template will use the jhudsl data science lab style. However, you can customize and switch this to another style set.
22+
23+
#### Using a style set
24+
25+
[Read more about the style sets here](https://github.com/jhudsl/OTTR_Template/wiki/Change-Title-&-Customize-style#using-a-style-set).
26+
27+
- [ ] On a new branch, copy the `style-sets/<set-name>/index.Rmd` and `style-sets/<set-name>/_output.yml` to the top of the repository to overwrite the default `index.Rmd` and `_output.yml`.
28+
- [ ] Copy over all the files in the `style-sets/<set-name>/copy-to-assets` to the `assets` folder in the top of the repository.
29+
- [ ] [Create a pull request](https://github.com/jhudsl/OTTR_Template/wiki/Start-editing-your-course#getting-started-with-the-github-workflow) with these changes, and double check the rendered preview to make sure that the style is what you are looking for.
30+
31+
### Files that need to be edited upon adding new packages that the book's code uses:
32+
33+
- `docker/Dockerfile` needs to have the new package added so it will be installed. See [instructions](https://github.com/jhudsl/OTTR_Template/wiki/Using-Docker#starting-a-new-docker-image).
34+
- The code chunk in `index.Rmd` should be edited to add the new package.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
The original template: https://github.com/jhudsl/OTTR_Template is always a work in progress.
3+
We are working on adding more features and smoothing out bugs as we go. The AnVIL Template collects these and can pass them along to this repository.
4+
5+
If you want to receive updates from the AnVIL template to your course template, you will need to enroll this repository to the template updates by adding it to the `sync.yml` file.
6+
7+
- [ ] [Follow these instructions](https://github.com/jhudsl/AnVIL_Template/wiki/Start-a-New-Book-or-Course#enroll-your-repository-for-anvil-updates) to enroll your course repository to receive these updates.
8+
9+
- [ ] [Ensure that you have followed these instructions](https://github.com/jhudsl/OTTR_Template/wiki/Start-a-new-course#5-add-jhudsl-robot-as-a-collaborator) to add the `jhudsl-robot` as a collaborator to your repository.

.github/switch_sync_repo.R

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env Rscript
2+
3+
# This script switches the repo entry for the yaml file to whatever is specified
4+
# Written by Candace Savonen Jan 2022
5+
6+
if (!("optparse" %in% installed.packages())){
7+
install.packages("optparse")
8+
}
9+
10+
library(optparse)
11+
12+
option_list <- list(
13+
optparse::make_option(
14+
c("--repo"),
15+
type = "character",
16+
default = "jhudsl/OTTR_Template_Test",
17+
help = "GitHub repository name, e.g. jhudsl/OTTR_Template_Test",
18+
)
19+
)
20+
21+
# Read the arguments passed
22+
opt_parser <- optparse::OptionParser(option_list = option_list)
23+
opt <- optparse::parse_args(opt_parser)
24+
25+
# Find .git root directory
26+
root_dir <- rprojroot::find_root(rprojroot::has_dir(".git"))
27+
28+
# Get test sync yaml path
29+
sync_file_path <- file.path(root_dir, ".github", "test-sync.yml")
30+
31+
yaml_contents <- yaml::yaml.load_file(sync_file_path)
32+
33+
# Only keep first grouping
34+
yaml_contents$group <- yaml_contents$group[[1]]
35+
36+
# Switch out repo
37+
yaml_contents$group$repos <- opt$repo
38+
39+
yaml::write_yaml(yaml_contents, sync_file_path)

0 commit comments

Comments
 (0)