Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cutsort authored Aug 2, 2024
0 parents commit b68d4f1
Show file tree
Hide file tree
Showing 621 changed files with 113,777 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/course-content-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: New content idea
about: Suggest an idea for the course
title: ''
labels: ''
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 learning objectives for your content idea
<!-- What will users learn from this new content? -->

## Additional context or resources
<!-- Add any other context or related resources we should know about? -->
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/course-problem-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Course Problem Report
about: Create a report to help improve the course
title: [Problem]
labels: bug
assignees:

---

## Describe what is not working with the course
<!-- A clear and concise description of what the bug is. -->

## Steps to Reproduce
<!-- Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
-->

## Expected behavior
<!-- A clear and concise description of what you expected to happen. -->

## Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->

## Additional context
<!-- Add any other context about the problem here. -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/course-template-feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Course Template Feature Request
about: Suggest an idea for the course templates
title: ''
labels: ''
assignees: cansavvy

---

## Is your feature request related to a problem? Please describe.
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

## Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->

## Describe alternatives you've considered
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

## Additional context
<!-- Add any other context or screenshots about the feature request here. -->
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/course-template-problem-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Course Template Problem Report
about: Create a report to help improve the template and its documentation
title: Problem
labels: bug
assignees: cansavvy

---

## Describe what is not working with the template or is unclear in the documentation
<!-- A clear and concise description of what the bug is. -->

## Please link to the specific course repository you are working on

## To Reproduce
<!-- Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error -->

## Expected behavior
<!-- A clear and concise description of what you expected to happen. -->

## Github actions links
<!-- If applicable please link to the Github actions that has failed. -->

## Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->

## Additional context
<!-- Add any other context about the problem here. -->
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/new-course-add-to-sync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Add your new course to syncs/OTTR updates
about: Provide information about your new course (which uses the OTTR template) so that we can enroll it in OTTR updates
title: ''
labels: ''
assignees: cansavvy

---

## What is the name of your new repository?
<!-- The name of the repo. Ex the name of this repo is OTTR_Template -->

## What username or organization is your new repository associated with?
<!-- The name of the username or organization where the new repository is located . Ex this repository is part of the jhudsl organization. A personal repository would be associated with a username instead of the organization. -->
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/update-course-info-for-sync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Update your course's info for syncs/OTTR updates
about: Provide information about your moved/renamed course (which uses the OTTR template) so that it can continue to be enrolled in OTTR updates
title: ''
labels: ''
assignees: cansavvy

---

<!-- Remove headings if they are not applicable to the changes/updates you made for your repo-->

## If the name of your repository was changed ...

### What was the old name?
<!-- The old/original name of the repo. Ex the name of this repo is OTTR_Template -->

### What is the new name?
<!-- The new/modified name of the repo. Ex the name of this repo is OTTR_Template -->

## If the repository was moved ...

### What was the original username or organization your repository was associated with?
<!-- The old/original name of the username or organization where the new repository was located . Ex this repository is part of the jhudsl organization. A personal repository would be associated with a username instead of the organization. -->

### What is the new username or organization your repository was associated with?
<!-- The new/modified name of the username or organization where the new repository is located . Ex this repository is part of the jhudsl organization. A personal repository would be associated with a username instead of the organization. -->
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/url-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Broken URLs found in the course!
labels: url-error
---
URL's in this course were just checked and some broken URLs were found.

**Number of errors:** {{ env.ERROR_NUM }}
**File where errors are:** [url checks file here]({{ env.FILE_URL }})
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/add_to_sync_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Add new repository to sync
about: Enroll your repository for OTTR updates
title: OTTR Updates Enrollment
labels: ''
assignees: cansavvy
---

Added __ repository to sync.yml in order to enroll in OTTR updates.
49 changes: 49 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template_general.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: New Content or Feature
about: New Content or Feature Update
title: General Update
labels: ''
assignees:
---


<!--This PR Template was modified from https://github.com/AlexsLemonade/OpenPBTA-analysis/blob/master/.github/PULL_REQUEST_TEMPLATE.md-->

### Purpose/implementation Section

#### What changes are being implemented in this Pull Request?



#### What was your approach?



#### What GitHub issue does your pull request address?



### Tell potential reviewers what kind of feedback you are soliciting.



### New Content Checklist

- [ ] 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).

- [ ] New content/chapter contains learning objectives.

- [ ] [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).

- [ ] [Spell check runs successfully](https://www.ottrproject.org/customize-robots.html#Spell_checking)).

- [ ] Any newly necessary packages that are needed have been added to the [Dockerfile and image](https://www.ottrproject.org/customize-docker.html).

- [ ] Images are in the [correct format for rendering](https://www.ottrproject.org/writing_content_courses.html#set-up-images).

- [ ] Every new image has [alt text and is in a Google Slide](https://www.ottrproject.org/writing_content_courses.html#Accessibility).

- [ ] 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.

- [ ] The color palette choices of the slide are contrasted in a way that is friendly to those with color vision deficiencies.
You can check this using [Color Oracle](https://colororacle.org/).
8 changes: 8 additions & 0 deletions .github/automatic-issues/add-feedback-method.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

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.

- [ ] [Read this chapter from an OTTR-made course about how to obtain user feedback](https://jhudatascience.org/Documentation_and_Usability/obtaining-user-feedback.html).

It's also a good idea to collect passive feedback via Google Analytics.

- [ ] [Read our guide to Google Analytics here](https://www.ottrproject.org/more_features.html#google-analytics).
14 changes: 14 additions & 0 deletions .github/automatic-issues/git-secrets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

**Note these steps are only pertinent if you are setting up this course outside of the jhudsl organization**

For more information on these settings see instructions in the [getting started on ottrproject.org](https://www.ottrproject.org/getting_started.html#6_Set_up_your_GitHub_personal_access_token).

It's important that these are set up and named exactly what they are below in order for Github actions to work correctly.

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.

- [ ] Set `GH_PAT`
`Name`: `GH_PAT`
`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).
Underneath `Select scopes`, check both `repo` and `workflow`.
Then copy the PAT and save as the value.
25 changes: 25 additions & 0 deletions .github/automatic-issues/images-checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Use this checklist to make sure your slides and images are set up correctly!

See [Setting Up Images and Graphics](https://www.ottrproject.org/writing_content_courses.html#Set_up_images) for more info!

- [ ] Create your course's main Google Slides.

- [ ] The slides use the appropriate template.

- [ ] 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.

- [ ] The color palette choices of the slide are contrasted in a way that is friendly to those with color vision deficiencies.
You can check this using [Color Oracle](https://colororacle.org/).

- [ ] Every image is inserted into the text using one of these options: `ottrpal::include_slide()`, `knitr::include_image()`, or this format: `<img src="blah.png" alt="SOMETHING">`.

- [ ] Every image has alternative text added to it.

- [ ] The beginning of each Rmd contains this chunk so the images are saved in the correct spot:

`````
```{r, include = FALSE}
ottrpal::set_knitr_image_path()
```
`````
22 changes: 22 additions & 0 deletions .github/automatic-issues/set-repo-settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

For more information on these settings see instructions in [Starting a new OTTR course](https://www.ottrproject.org/getting_started.html#starting-a-new-ottr-course).

- [ ] This course repository is set to `public`.
- [ ] [Github secret `GH_PAT` has been set](https://www.ottrproject.org/getting_started.html#6_Set_up_your_GitHub_personal_access_token)
`Name`: `GH_PAT`
`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).
Underneath `Select scopes`, check both `repo` and `workflow`.
Then copy the PAT and save as the value.

- [ ] GitHub pages is turned on
- [ ] Go to `Settings` > `Pages`. Underneath `Source`, choose `main` for the branch and select the `docs` folder. Then click `Save`.
- [ ] Check `Enforce HTTPS`.

- [ ] [Set branch protections settings](https://www.ottrproject.org/getting_started.html#8_Set_up_branch_rules)
- [ ] `main` branch has been set up:
- [ ] `Require pull request reviews before merging` box is checked.
- [ ] `Require status checks to pass before merging` box is checked.
- [ ] Underneath that `Require branches to be up to date before merging` box is checked.
- [ ] Click `Save` at the bottom of the page!

- [ ] [Customize GitHub actions](https://www.ottrproject.org/customize-robots.html) for what you will need in this course.
34 changes: 34 additions & 0 deletions .github/automatic-issues/templates-to-edit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

[Follow the instructions here in ottrproject.org](https://www.ottrproject.org/writing_content_courses.html) for details on how to start editing your OTTR course

The following files need to be edited to get this new course started!

### Files that need edited upon creating a new course.

- [ ] `README.md` - Fill in all the `{ }`.
- [ ] `index.Rmd` - `title:` should be updated.
- [ ] `01-intro.Rmd` - replace the information there with information pertinent to this new course.
- [ ] `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.

### Files that need to be edited upon adding each new chapter (including upon creating a new course):

- [ ] `_bookdown.yml` - The list of Rmd files that need to be rendered needs to be updated. See [instructions](https://www.ottrproject.org/course_publishing.html#publishing-with-bookdown).
- [ ] `book.bib` - any citations need to be added. See [instructions](https://www.ottrproject.org/more_features.html#citing-sources).

### Picking a style

See more [about customizing style on this page in the guide](https://www.ottrproject.org/customize-style.html).
By default this course template will use the jhudsl data science lab style. However, you can customize and switch this to another style set.

#### Using a style set

[Read more about the style sets here](https://www.ottrproject.org/customize-style.html#Using_a_style_set).

- [ ] 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`.
- [ ] Copy over all the files in the `style-sets/<set-name>/copy-to-assets` to the `assets` folder in the top of the repository.
- [ ] [Create a pull request](https://www.ottrproject.org/writing_content_courses.html#Open_a_pull_request) with these changes, and double check the rendered preview to make sure that the style is what you are looking for.

### Files that need to be edited upon adding new packages that the book's code uses:

- `docker/Dockerfile` needs to have the new package added so it will be installed. See [instructions](https://www.ottrproject.org/customize-docker.html).
- The code chunk in `index.Rmd` should be edited to add the new package.
8 changes: 8 additions & 0 deletions .github/automatic-issues/update-enrollment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

The original template: https://github.com/jhudsl/OTTR_Template is always a work in progress.
We are working on adding more features and smoothing out bugs as we go.

If you want to receive updates from the original template to your course template, you will need to enroll this repository to the template updates by adding it to the `sync.yml` file.

- [ ] [Follow these instructions](https://www.ottrproject.org/getting_started.html#9_Enroll_your_repository_for_OTTR_updates) to enroll your course repository to receive these updates.
- [ ] Alternatively, [open an issue in the OTTR_Template repo](https://github.com/jhudsl/OTTR_Template/issues/new?assignees=cansavvy&labels=&projects=&template=new-course-add-to-sync.md&title=), providing us with the necessary information to add the course for you.
24 changes: 24 additions & 0 deletions .github/course_README_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# {Course Name}

This course was created from [this GitHub template](https://github.com/jhudsl/OTTR_Template).

You can see the rendered course material here: {Link to rendered bookdown and/or to the Leanpub.}

If you would like to contribute to this course material, take a look at the [OTTR documentation](https://www.ottrproject.org/).

## About this course

This course introduces {info on what this course introduces}

## Learning Objectives

This course will teach learners to:

- {You can use https://www.bobpikegroup.com/trainer-blog/5-steps-to-writing-clear-and-measurable-learning-objectives to define some learning objectives here}
- {More learning objectives}

## Encountering problems?

If you are encountering any problems with this course, please file a GitHub issue or contact us at {Some email or web address with a contact form}.

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />All materials in this course are licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a> unless noted otherwise.
39 changes: 39 additions & 0 deletions .github/switch_sync_repo.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env Rscript

# This script switches the repo entry for the yaml file to whatever is specified
# Written by Candace Savonen Jan 2022

if (!("optparse" %in% installed.packages())){
install.packages("optparse")
}

library(optparse)

option_list <- list(
optparse::make_option(
c("--repo"),
type = "character",
default = "jhudsl/OTTR_Template_Test",
help = "GitHub repository name, e.g. jhudsl/OTTR_Template_Test",
)
)

# 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"))

# Get test sync yaml path
sync_file_path <- file.path(root_dir, ".github", "test-sync.yml")

yaml_contents <- yaml::yaml.load_file(sync_file_path)

# Only keep first grouping
yaml_contents$group <- yaml_contents$group[[1]]

# Switch out repo
yaml_contents$group$repos <- opt$repo

yaml::write_yaml(yaml_contents, sync_file_path)
Loading

0 comments on commit b68d4f1

Please sign in to comment.