Skip to content

Commit 4749b1a

Browse files
Merge branch 'main' into kweav-nameChunks
trying to fix url checker with most recent sync changes
2 parents f50d487 + 682f37e commit 4749b1a

File tree

5 files changed

+57
-12
lines changed

5 files changed

+57
-12
lines changed

.github/workflows/check-url.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ jobs:
7878
run: |
7979
echo ${{ steps.check-report.outputs.error_url }}
8080
echo ${{ steps.check-report.outputs.error_num }}
81+
82+
# Commit file
83+
- name: Commit tocless bookdown files
84+
if: ${{ steps.check-report.outputs.error_num >= 1 }}
85+
env:
86+
GH_PAT: ${{ secrets.GH_PAT }}
87+
run: |
88+
git add --force check_reports/url_checks.tsv
89+
git commit -m 'Add spell check file' || echo "No changes to commit"
90+
git push --set-upstream origin preview-spell-error || echo echo branch exists remotely
8191
8292
- name: Find issues
8393
id: find-issue

.github/workflows/pull_request.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
20-
token: ${{ secrets.GH_PAT }}
2120

2221
# Use the yaml-env-action action.
2322
- name: Load environment from YAML
@@ -49,6 +48,8 @@ jobs:
4948
toggle_style_code: "${{ env.STYLE_CODE }}"
5049
toggle_url_check: "${{ env.URL_CHECKER }}"
5150
toggle_quiz_check: "${{ env.CHECK_QUIZZES }}"
51+
toggle_md_linter: "${{ env.MARKDOWN_LINTER }}"
52+
toggle_readability: "${{ env.READABILITY_REPORT }}"
5253
toggle_render_preview: "${{ env.RENDER_PREVIEW }}"
5354
rendering_docker_image: "${{ env.RENDERING_DOCKER_IMAGE }}"
5455

@@ -61,8 +62,9 @@ jobs:
6162
with:
6263
check_type: spelling
6364
error_min: 3
64-
gh_pat: secrets.GH_PAT
6565
branch_name: ${GITHUB_HEAD_REF}
66+
secrets:
67+
gh_pat: ${{ secrets.GH_PAT }}
6668

6769
url-check:
6870
name: Check URLs
@@ -72,8 +74,9 @@ jobs:
7274
with:
7375
check_type: urls
7476
error_min: 0
75-
gh_pat: secrets.GH_PAT
7677
branch_name: ${GITHUB_HEAD_REF}
78+
secrets:
79+
gh_pat: ${{ secrets.GH_PAT }}
7780

7881
quiz-check:
7982
name: Check quiz formatting
@@ -83,8 +86,9 @@ jobs:
8386
with:
8487
check_type: quiz_format
8588
error_min: 0
86-
gh_pat: secrets.GH_PAT
8789
branch_name: ${GITHUB_HEAD_REF}
90+
secrets:
91+
gh_pat: ${{ secrets.GH_PAT }}
8892

8993
############################# Style the code ###################################
9094
style-code:
@@ -111,6 +115,26 @@ jobs:
111115
git commit -m 'Style *mds' || echo "No changes to commit"
112116
git push origin || echo "No changes to commit"
113117
118+
############################# Readability Report ###################################
119+
120+
readability-report:
121+
name: Readability report
122+
needs: yaml-check
123+
runs-on: ubuntu-latest
124+
if: ${{needs.yaml-check.outputs.toggle_readability == 'yes'}}
125+
126+
steps:
127+
- name: Checkout repo
128+
uses: actions/checkout@v4
129+
with:
130+
fetch-depth: 0
131+
132+
- name: Readability report
133+
uses: Rebilly/lexi@v2
134+
with:
135+
github-token: ${{ secrets.GH_PAT }}
136+
glob: '**/*.md'
137+
114138
############################# Render Preview ###################################
115139

116140
render-preview:

.github/workflows/render-all.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88
push:
99
branches: [ main, staging ]
1010
paths:
11-
- '**md$'
11+
- '*.qmd'
12+
- '*.Rmd'
1213
- assets/*
1314
- quizzes/*
1415

@@ -101,7 +102,7 @@ jobs:
101102
git add --force docs/*
102103
git commit -m 'Render course' || echo "No changes to commit"
103104
git status docs/*
104-
git push -u origin main || echo "No changes to push"
105+
git push --force -u origin main || echo "No changes to push"
105106
106107
render-tocless:
107108
name: Render TOC-less version for Leanpub or Coursera
@@ -149,7 +150,7 @@ jobs:
149150
git add --force docs/no_toc*
150151
git commit -m 'Render toc-less' || echo "No changes to commit"
151152
git status docs/no_toc*
152-
git push -u origin main || echo "No changes to push"
153+
git push --force -u origin main || echo "No changes to push"
153154
154155
render-leanpub:
155156
name: Finish Leanpub prep
@@ -188,6 +189,7 @@ jobs:
188189
--git_pat ${{ secrets.GH_PAT }} \
189190
--repo $GITHUB_REPOSITORY \
190191
--output_dir resources/chapt_screen_images)
192+
rm make_screenshots.R
191193
192194
# We want a fresh run of the renders each time
193195
- name: Delete manuscript/
@@ -276,4 +278,4 @@ jobs:
276278
git add --force docs/*
277279
git commit -m 'Render Coursera quizzes' || echo "No changes to commit"
278280
git status
279-
git push -u origin main || echo "No changes to push"
281+
git push --force -u origin main || echo "No changes to push"

config_automation.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
##### Checks run at pull request #####
23
# Check quiz formatting
34
check-quizzes: no
@@ -9,6 +10,10 @@ render-preview: yes
910
spell-check: yes
1011
# Style any R code
1112
style-code: yes
13+
# Would you like your markdown files to be checked for formatting
14+
markdown-linter: yes
15+
# Would you like a readability report on your markdowns?
16+
readability-report: yes
1217
# Test build the docker image if any docker-relevant files have been changed
1318
docker-test: no
1419
# Should URLs be tested periodically?
@@ -18,8 +23,12 @@ url-check-periodically: yes
1823
# Rendering each platform's content
1924
render-website: rmd
2025
render-leanpub: yes
21-
render-coursera: yes
26+
render-coursera: no
27+
28+
## Automate the creation of Book.txt file? yes/no
29+
## This is only relevant if render-leanpub is yes, otherwise it will be ignored
30+
make-book-txt: yes
2231

2332
# What docker image should be used for rendering?
24-
# The default is jhudsl/course_template:main
25-
rendering-docker-image: 'jhudsl/course_template:main'
33+
# The default is jhudsl/base_ottr:main
34+
rendering-docker-image: 'jhudsl/base_ottr:main'

style-sets/itcr/index.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ knitr::write_bib(c(
2020

2121
# About this Course {-}
2222

23-
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.
23+
This course is part of a series of courses for the [Informatics Technology for Cancer Research (ITCR)](https://www.cancer.gov/about-nci/organization/cssi/research/itcr). 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.

0 commit comments

Comments
 (0)