generated from AlexsLemonade/training-specific-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 69b612d
Showing
120 changed files
with
3,063 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
name: All other issues | ||
about: All issues that are not for requesting read access | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
|
19 changes: 19 additions & 0 deletions
19
.github/ISSUE_TEMPLATE/request-read-access-to-use-template-for-a-workshop.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Request read access to use template for a workshop | ||
about: Use this issue template to request read access to the repository so you can | ||
use it as a template. | ||
title: "[Request read access] " | ||
labels: request | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- Hi there, please fill out this issue template so we can understand your use case!--> | ||
|
||
#### Your information | ||
|
||
<!-- Add some basic information about yourself like your name and institution. If a GitHub user other than the one you are filing this issue from needs read access, tell us here. --> | ||
|
||
#### Workshop format, location, and dates | ||
|
||
<!-- Tell us about your workshop. Is in virtual or in-person? If it's in-person, where will you be holding the workshop? When will the workshop run? --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Copy completed HTML notebooks to training website repository | ||
# Copy completed HTML notebooks from the training-modules repo to this repo | ||
# This action will open a pull request containing completed HTML notebooks | ||
|
||
# This is a manually triggered workflow that takes two inputs: | ||
# # The name of the workshop being taught | ||
# # The training-modules repo tag to copy notebooks from | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
training-module: | ||
type: choice | ||
description: Use the dropdown menu to select which training workshop module this website is being created for. | ||
options: | ||
- "Introduction to R and Tidyverse" | ||
- "Introduction to single-cell RNA-seq" | ||
- "Advanced single-cell RNA-seq" | ||
- "Bulk RNA-seq" | ||
required: true | ||
training-modules-tag: | ||
type: string | ||
description: The `training-modules` repo tag to copy completed notebooks from, e.g. 2023-june | ||
default: "master" | ||
required: true | ||
|
||
jobs: | ||
file-completed-notebooks-pr: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout training-modules repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: AlexsLemonade/training-modules | ||
ref: ${{ github.event.inputs.training-modules-tag }} | ||
path: training-modules | ||
|
||
- name: Checkout this repository | ||
uses: actions/checkout@v3 | ||
with: | ||
path: website | ||
|
||
- name: Configure git | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
- name: Copy HTML completed notebooks from training-modules | ||
shell: bash | ||
run: | | ||
# The completed notebooks to copy will depend on which workshop module this is. | ||
# For each module, the directory of notebooks to copy are: | ||
# Intro R: intro_to_R_tidyverse/ | ||
# Intro scRNA-seq: intro_to_R_tidyverse/ and scRNA-seq/ | ||
# Advanced scRNA-seq: advanced-scRNA-seq/ | ||
# bulk RNA-seq: RNA-seq/ | ||
# Path to copy notebooks to | ||
target_path=website/completed-notebooks | ||
# Create array of directories from which notebooks should be copied | ||
case "${{ github.event.inputs.training-module }}" in | ||
"Introduction to R and Tidyverse") | ||
modules=("intro-to-R-tidyverse") | ||
;; | ||
"Introduction to single-cell RNA-seq") | ||
modules=("intro-to-R-tidyverse" "scRNA-seq") | ||
;; | ||
"Advanced single-cell RNA-seq") | ||
modules=("scRNA-seq-advanced") | ||
;; | ||
"Bulk RNA-seq") | ||
modules=("intro-to-R-tidyverse", "RNA-seq") | ||
;; | ||
esac | ||
# Copy all completed notebooks from the given directories | ||
for module in ${modules[@]}; do | ||
mkdir -p ${target_path}/${module} | ||
cp training-modules/${module}/[0-9]*.html ${target_path}/${module} | ||
done | ||
- name: Create PR with rendered notebooks | ||
uses: peter-evans/create-pull-request@v5 | ||
id: cpr | ||
with: | ||
path: website # must be a RELATIVE path to _this_ repo | ||
commit-message: Copy completed notebooks from training-modules@${{ github.event.inputs.training-modules-tag }} | ||
signoff: false | ||
branch: auto_copy_completed_notebooks | ||
delete-branch: true | ||
title: 'GHA: Automated transfer of completed notebooks' | ||
body: | | ||
### Description: | ||
This PR was auto-generated from github actions | ||
- Copy completed notebooks for the "${{ github.event.inputs.training-module }}" module from the `training-modules` repository, tag `${{ github.event.inputs.training-modules-tag }}` | ||
labels: | | ||
automated | ||
reviewers: $GITHUB_ACTOR | ||
|
||
|
||
# Write out PR info | ||
- name: Check outputs | ||
run: | | ||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Manually trigger issue creation for standard set up | ||
|
||
# This is a manually triggered workflow | ||
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch | ||
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow#running-a-workflow-on-github | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# This runs a single job that creates issues from files | ||
createIssuesFromFile: | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
|
||
# Check out | ||
- uses: actions/checkout@v3 | ||
|
||
# Issue for turning on GitHub pages | ||
- name: Create GitHub Pages issue | ||
uses: peter-evans/[email protected] | ||
with: | ||
title: Turn on GitHub Pages | ||
content-filepath: ./setup-issue-templates/gh-pages.md | ||
labels: automated training issue | ||
|
||
# Issue for turning on branch protection | ||
- name: Create branch protection issue | ||
uses: peter-evans/[email protected] | ||
with: | ||
title: Set up branch protection - pull requests required | ||
content-filepath: ./setup-issue-templates/branch-protection.md | ||
labels: automated training issue | ||
|
||
# Issue updating `_config.yaml` | ||
- name: Create issue for _config.yaml | ||
uses: peter-evans/[email protected] | ||
with: | ||
title: Update _config.yaml to use values relevant to this workshop | ||
content-filepath: ./setup-issue-templates/update-config.md | ||
labels: automated training issue | ||
|
||
# Issue for adding PDF versions of slides | ||
- name: Create issue for slides | ||
uses: peter-evans/[email protected] | ||
with: | ||
title: Add PDF versions of slides to `slides` | ||
content-filepath: ./setup-issue-templates/pdf-slides.md | ||
labels: automated training issue, slides | ||
|
||
# Issue for creating a draft version of schedule | ||
- name: Create draft schedule issue | ||
uses: peter-evans/[email protected] | ||
with: | ||
title: Draft version of schedule | ||
content-filepath: ./setup-issue-templates/draft-schedule.md | ||
labels: automated training issue, schedule | ||
|
||
# Issue for creating a training-specific release of training-modules | ||
- name: Create issue for training-specific release | ||
uses: peter-evans/[email protected] | ||
with: | ||
title: Create release of training-modules to associate with this workshop | ||
content-filepath: ./setup-issue-templates/workshop-release.md | ||
labels: automated training issue | ||
|
||
# Issue for copying completed notebooks from training-modules | ||
- name: Create issue for copying completed notebooks | ||
uses: peter-evans/[email protected] | ||
with: | ||
title: Copy completed notebooks to training website | ||
content-filepath: ./setup-issue-templates/copy-completed-notebooks.md | ||
labels: automated training issue, blocked | ||
|
||
# Issue for customizing participant-information.md | ||
- name: Create issue for updating participant-information.md | ||
uses: peter-evans/[email protected] | ||
with: | ||
title: Update in-person logistics in `participant-information.md` | ||
content-filepath: ./setup-issue-templates/update-participant-information.md | ||
labels: automated training issue | ||
|
||
# Issue for creating a final version of schedule | ||
- name: Create final schedule issue | ||
uses: peter-evans/[email protected] | ||
with: | ||
title: Final version of schedule | ||
content-filepath: ./setup-issue-templates/final-schedule.md | ||
labels: automated training issue, schedule, blocked | ||
|
||
# Issue for updating README | ||
- name: Create issue for updating README | ||
uses: peter-evans/[email protected] | ||
with: | ||
title: Update README to be user-facing (remove instructions) | ||
content-filepath: ./setup-issue-templates/user-facing-readme.md | ||
labels: automated training issue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
name: Spell check Markdown files | ||
|
||
# Controls when the action will run. | ||
# Pull requests to main only. | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
# This workflow contains a single job called "spell check" | ||
spell-check: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: rocker/tidyverse:4.2.3 | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install packages | ||
run: Rscript --vanilla -e "install.packages(c('spelling'), repos = c(CRAN = '$CRAN'))" | ||
|
||
- name: Run spell check | ||
id: spell_check_run | ||
run: | | ||
results=$(Rscript --vanilla "scripts/spell-check.R") | ||
echo "sp_chk_results=$results" >> $GITHUB_OUTPUT | ||
cat spell_check_errors.tsv | ||
- name: Archive spelling errors | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ steps.spell_check_run.outputs.sp_chk_results > 0 }} | ||
with: | ||
name: spell-check-results | ||
path: spell_check_errors.tsv | ||
|
||
# If there are too many spelling errors, this will stop the workflow | ||
- name: Check spell check results - fail if too many errors | ||
if: ${{ steps.spell_check_run.outputs.sp_chk_results > 0 }} | ||
run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# jekyll built site | ||
_site | ||
.DS_Store | ||
Gemfile.lock | ||
|
||
.ruby-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
This file provides an overview of contents in this repository. | ||
|
||
- Please see the `LICENSE.md` file for the terms of use of this repository's materials. | ||
- Please see the `README.md` file for instructions on using and contributing to this repository. | ||
|
||
## Workshop files | ||
|
||
These files/directories are directly shown in the rendered website. | ||
|
||
- `workshop` | ||
- This directory contains all pages that appear in the website header | ||
- `software-setup` | ||
- This directory contains all website pages that detail software installation, setup, and procedures | ||
- `additional-resources` | ||
- This directory contains all other website pages | ||
- `images` | ||
- This directory contains images used in this repository's `README.md` file as well as Data Lab logo and favicon files used for the website | ||
- `completed-notebooks` | ||
- Empty by default, this directory can be populated with completed training notebooks to link to from the schedule in `workshop/SCHEDULE.md` | ||
- `slides` | ||
- Empty by default, this directory can be populated with slide PDFs to link to from the schedule in `workshop/SCHEDULE.md` | ||
- `code-of-conduct.md` | ||
- The Data Lab's Code of Conduct, as displayed on the workshop website | ||
|
||
## Setup files | ||
|
||
These files/directories are used to prepare contents for a given training website. | ||
|
||
- `scripts` | ||
- This directory contains a helper script for automated spell checking | ||
- `components` | ||
- This directory contains a dictionary of words to ignore during spell check | ||
- `.github/workflows` | ||
- This directory contains GitHub Actions Workflows used during repository setup and development | ||
- `setup-issue-templates` | ||
- Contains templates for automatic issues filed by the manually-triggered action `.github/workflows/file-setup-issues.yml` | ||
|
||
## Jekyll files | ||
|
||
These files/directories are used by [`jekyll`](https://jekyllrb.com/) to create and render the website. | ||
|
||
- `Gemfile` and `Gemfile.lock` | ||
- `_config.yml` | ||
- `_includes` | ||
|
||
## Additional files | ||
|
||
- `ccdl-training-waiver.pdf` | ||
- PDF copy of the Data Lab training waiver that participants must sign | ||
- `supplemental-notebooks` | ||
- This directory is empty but can be used to add supplemental notebooks to distribute to participants | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "github-pages", group: :jekyll_plugins | ||
gem "webrick" |
Oops, something went wrong.