Skip to content

Commit

Permalink
Merge branch 'main' into 501-have-urls-periodically-checked
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Feb 29, 2024
2 parents b8775cb + cc497be commit cff4724
Show file tree
Hide file tree
Showing 45 changed files with 299 additions and 299 deletions.
4 changes: 3 additions & 1 deletion .github/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ group:
jhudsl/Machine_Learning_for_Cancer_Informatics
jhudsl/Cancer_Informatics_Data_Visualization
jhudsl/Cancer_Genome_Informatics
jhudsl/Cancer-Imaging-Informatics
fhdsl/Cancer_Imaging_Informatics
datatrail-jhu/DataTrail_Template
abyzovlab/CNVpytor-course
opencasestudies/OCS_Guide
Expand All @@ -56,11 +56,13 @@ group:
griffithlab/CIVIC_SVI_Course
PracticalGenomics/cogaps-on-sciserver
fhdsl/AI_for_software
fhdsl/AI_for_Decision_Makers
griffithlab/Immuno_Workflow_Course
fhdsl/S1_Intro_to_R
fhdsl/S1_Intro_to_Command_Line
fhdsl/S1_Intro_to_Git_GitHub
fhdsl/WDL_Workflows_Guide
fhdsl/S2-Collaborative-Git-GitHub
###ADD NEW REPO HERE following the format above#

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delete-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

# Check out current repository
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Login as jhudsl-robot
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:

steps:
- name: checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Verify Dockerfiles changed?
uses: tj-actions/verify-changed-files@v8.8
uses: tj-actions/verify-changed-files@v17
id: verify-changed-files
with:
files: |
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}

# Use the yaml-env-action action.
- name: Load environment from YAML
Expand All @@ -41,6 +42,7 @@ jobs:
git push --set-upstream origin $branch_name || echo echo branch exists remotely
shell: bash


outputs:
toggle_spell_check: "${{ env.SPELL_CHECK }}"
toggle_style_code: "${{ env.STYLE_CODE }}"
Expand All @@ -59,6 +61,7 @@ jobs:
check_type: spelling
error_min: 3
gh_pat: secrets.GH_PAT
branch_name: ${GITHUB_HEAD_REF}

url-check:
name: Check URLs
Expand All @@ -69,6 +72,7 @@ jobs:
check_type: urls
error_min: 0
gh_pat: secrets.GH_PAT
branch_name: ${GITHUB_HEAD_REF}

quiz-check:
name: Check quiz formatting
Expand All @@ -79,6 +83,7 @@ jobs:
check_type: quiz_format
error_min: 0
gh_pat: secrets.GH_PAT
branch_name: ${GITHUB_HEAD_REF}

############################# Style the code ###################################
style-code:
Expand All @@ -91,7 +96,7 @@ jobs:

steps:
- name: Checkout files
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -117,7 +122,7 @@ jobs:

steps:
- name: Checkout files
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/render-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Use the yaml-env-action action.
- name: Load environment from YAML
Expand All @@ -44,7 +44,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
Expand All @@ -229,12 +229,16 @@ jobs:
run: Rscript -e "ottrpal::convert_coursera_quizzes()"

# Commit the rendered bookdown files
# Only commit coursera quizzes if the directory is present
- name: Commit rendered Coursera files
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
git remote set-url origin https://${GH_PAT}@github.com/${GITHUB_REPOSITORY}
git fetch origin
if [ -d 'coursera_quizzes' ]; then
git add --force coursera_quizzes/*
fi
git add --force manuscript/*
git add --force resources/*
git add --force docs/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/send-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Login as jhudsl-robot
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/starting-course.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: github.event.repository.name != 'OTTR_Template'
steps:
- name: checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Login as jhudsl-robot
run: |
Expand Down
30 changes: 17 additions & 13 deletions .github/workflows/transfer-rendered-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Use the yaml-env-action action.
- name: Load environment from YAML
Expand All @@ -42,31 +42,33 @@ jobs:
if: ${{needs.yaml-check.outputs.toggle_coursera == 'yes' || needs.yaml-check.outputs.toggle_leanpub == 'yes'}}

steps:
- name: Checkout from Bookdown Repo
uses: actions/checkout@v4
with:
path: bookdown
token: ${{ secrets.GH_PAT }}

- name: Run git repo check
id: git_repo_check
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
sudo apt-get install subversion
# What's the Quizzes repository's name?
QUIZ_REPO=$(echo ${GITHUB_REPOSITORY} | sed "s/_Bookdown/ /g" | sed "s/_Template/ /g" | awk '{print $1"_Quizzes"}')
echo $QUIZ_REPO
# Get repo check script
svn export --force https://github.com/${GITHUB_REPOSITORY}.git/branches/${GITHUB_REF#refs/heads/}/scripts/git_repo_check.R git_repo_check.R
# Run repo check script
results=$(Rscript --vanilla git_repo_check.R --repo "$GITHUB_REPOSITORY" --git_pat "$GH_PAT")
results=$(Rscript --vanilla bookdown/scripts/git_repo_check.R --repo "$GITHUB_REPOSITORY" --git_pat "$GH_PAT")
echo $QUIZ_REPO exists: $results
echo "git_results=$results" >> $GITHUB_OUTPUT
echo "leanpub_repo=$QUIZ_REPO" >> $GITHUB_OUTPUT
- name: Checkout code from Leanpub repo
if: ${{ steps.git_repo_check.outputs.git_results == 'TRUE' }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: quizzes
repository: ${{ steps.git_repo_check.outputs.leanpub_repo }}
token: ${{ secrets.GH_PAT }}

Expand All @@ -76,17 +78,19 @@ jobs:
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
# Copy over images folder
svn export --force https://github.com/${GITHUB_REPOSITORY}.git/branches/${GITHUB_REF#refs/heads/}/resources/chapt_screen_images resources/chapt_screen_images
# Copy over _bookdown.yml
svn export --force https://github.com/${GITHUB_REPOSITORY}.git/branches/${GITHUB_REF#refs/heads/}/_bookdown.yml _bookdown.yml
# Copy over images folder (from bookdown to quizzes repo)
mkdir -p quizzes/resources/chapt_screen_images
cp bookdown/resources/chapt_screen_images/* quizzes/resources/chapt_screen_images
# Copy over _bookdown.yml (from bookdown to quizzes repo)
cp bookdown/_bookdown.yml quizzes/_bookdown.yml
- name: Create PR with resources files
if: ${{ steps.git_repo_check.outputs.git_results == 'TRUE' }}
uses: peter-evans/create-pull-request@v3
id: cpr
with:
path: quizzes # Must create the PR in the Quizzes Repo
token: ${{ secrets.GH_PAT }}
commit-message: Copy files from Bookdown repository
signoff: false
Expand Down
17 changes: 9 additions & 8 deletions 02-chapter_of_course.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,6 @@ knitr::include_url("https://www.youtube.com/embed/VOCYL-FNbr0")

<iframe src="https://www.youtube.com/embed/VOCYL-FNbr0" width="672" height="400px"></iframe>

## File examples

You can again use simple markdown syntax to just include a link to a file like so:

[A file](https://www.bgsu.edu/content/dam/BGSU/center-for-faculty-excellence/docs/TLGuides/TLGuide-Learning-Objectives.pdf).

Alternatively you can embed files like PDFs.

### Using `knitr`

```{r, fig.align="center", echo=FALSE, out.width="100%"}
Expand Down Expand Up @@ -243,6 +235,15 @@ reflection text
</div>


Here is a `<div class = "wip">` box:

<div class = "wip">

Work in Progress text

</div>


## Dropdown summaries

<details><summary> You can hide additional information in a dropdown menu </summary>
Expand Down
Binary file added assets/box_images/under_construction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ li.appendix span, li.part span { /* for TOC part names */
/* Sidebar formating --------------------------------------------*/
/* from r-pkgs.org*/

div.notice, div.warning, div.github, div.dictionary, div.reflection {
div.notice, div.warning, div.github, div.dictionary, div.reflection, div.wip {
padding: 1em;
margin: 1em 0;
padding-left: 100px;
Expand Down Expand Up @@ -304,6 +304,14 @@ div.reflection{
background-image: url("../assets/box_images/thinking_face.png");
}

div.wip{
border: 4px #000000;
border-style: solid;
background-size: 70px;
background-position: 15px center;
background-color: #f4d03f;
background-image: url("../assets/box_images/under_construction.png");
}

/* .book .book-body .page-wrapper .page-inner section.normal is needed
to override the styles produced by gitbook, which are ridiculously
Expand Down
2 changes: 1 addition & 1 deletion docs/01-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ devtools::session_info()
## collate en_US.UTF-8
## ctype en_US.UTF-8
## tz Etc/UTC
## date 2023-05-24
## date 2024-01-16
##
## ─ Packages ───────────────────────────────────────────────────────────────────
## package * version date lib source
Expand Down
19 changes: 10 additions & 9 deletions docs/02-chapter_of_course.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,6 @@ Note that you should use `echo=FALSE` in the code chunk because we don't want th

<iframe src="https://www.youtube.com/embed/VOCYL-FNbr0" width="672" height="400px"></iframe>

## File examples

You can again use simple markdown syntax to just include a link to a file like so:

[A file](https://www.bgsu.edu/content/dam/BGSU/center-for-faculty-excellence/docs/TLGuides/TLGuide-Learning-Objectives.pdf).

Alternatively you can embed files like PDFs.

### Using `knitr`

<iframe src="https://drive.google.com/file/d/1mm72K4V7fqpgAfWkr6b7HTZrc3f-T6AV/preview" width="100%" height="400px"></iframe>
Expand Down Expand Up @@ -271,6 +263,15 @@ reflection text
</div>


Here is a `<div class = "wip">` box:

<div class = "wip">

Work in Progress text

</div>


## Dropdown summaries

<details><summary> You can hide additional information in a dropdown menu </summary>
Expand All @@ -297,7 +298,7 @@ devtools::session_info()
## collate en_US.UTF-8
## ctype en_US.UTF-8
## tz Etc/UTC
## date 2023-05-24
## date 2024-01-16
##
## ─ Packages ───────────────────────────────────────────────────────────────────
## package * version date lib source
Expand Down
Loading

0 comments on commit cff4724

Please sign in to comment.