Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add readability report and secrets: bug fix #794

Merged
merged 21 commits into from
Jan 10, 2025
Merged
31 changes: 28 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
toggle_style_code: "${{ env.STYLE_CODE }}"
toggle_url_check: "${{ env.URL_CHECKER }}"
toggle_quiz_check: "${{ env.CHECK_QUIZZES }}"
toggle_md_linter: "${{ env.MARKDOWN_LINTER }}"
toggle_readability: "${{ env.READABILITY_REPORT }}"
toggle_render_preview: "${{ env.RENDER_PREVIEW }}"
rendering_docker_image: "${{ env.RENDERING_DOCKER_IMAGE }}"

Expand All @@ -60,8 +62,9 @@ jobs:
with:
check_type: spelling
error_min: 3
gh_pat: secrets.GH_PAT
branch_name: ${GITHUB_HEAD_REF}
secrets:
gh_pat: ${{ secrets.GH_PAT }}

url-check:
name: Check URLs
Expand All @@ -71,8 +74,9 @@ jobs:
with:
check_type: urls
error_min: 0
gh_pat: secrets.GH_PAT
branch_name: ${GITHUB_HEAD_REF}
secrets:
gh_pat: ${{ secrets.GH_PAT }}

quiz-check:
name: Check quiz formatting
Expand All @@ -82,8 +86,9 @@ jobs:
with:
check_type: quiz_format
error_min: 0
gh_pat: secrets.GH_PAT
branch_name: ${GITHUB_HEAD_REF}
secrets:
gh_pat: ${{ secrets.GH_PAT }}

############################# Style the code ###################################
style-code:
Expand All @@ -110,6 +115,26 @@ jobs:
git commit -m 'Style *mds' || echo "No changes to commit"
git push origin || echo "No changes to commit"

############################# Readability Report ###################################

readability-report:
name: Readability report
needs: yaml-check
runs-on: ubuntu-latest
if: ${{needs.yaml-check.outputs.toggle_readability == 'yes'}}

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

- name: Readability report
uses: Rebilly/lexi@v2
with:
github-token: ${{ secrets.GH_PAT }}
glob: '**/*.md'

############################# Render Preview ###################################

render-preview:
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ _This template and guide helps you_:
- [Advanced Reproducibility in Cancer Informatics](https://jhudatascience.org/Adv_Reproducibility_in_Cancer_Informatics/)

## To Get Started

- Go to the [ottrproject.org](https://www.ottrproject.org/).
- Check out the [rendered version of the template](https://jhudatascience.org/OTTR_Template/).
- Check out our [course on using Leanpub](https://hutchdatascience.org/Using_Leanpub/index.html) for help publishing on this platform.
- Please take a look at the [code of conduct](./code_of_conduct.md).
- If you encounter any problems or have ideas for improvements to this template repository or this getting started guide, please [file an issue here](https://github.com/jhudsl/OTTR_Template/issues/new/choose)! Your feedback is very much appreciated.

## Contributing

If you'd like to contribute, we love that! Please go to the [CONTRIBUTING.md doc](https://github.com/jhudsl/OTTR_Template/blob/main/CONTRIBUTING.md).
1 change: 1 addition & 0 deletions _output.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ bookdown::gitbook:
<p style="text-align:center; font-size: 12px;"> <a href="https://github.com/rstudio4edu/rstudio4edu-book/"> Style adapted from: rstudio4edu-book </a> <a href ="https://creativecommons.org/licenses/by/2.0/"> (CC-BY 2.0) </a></p>
bookdown::word_document2:
toc: true
always_allow_html: true
4 changes: 4 additions & 0 deletions config_automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ render-preview: yes
spell-check: yes
# Style any R code
style-code: yes
# Would you like your markdown files to be checked for formatting
markdown-linter: yes
# Would you like a readability report on your markdowns?
readability-report: yes
# Test build the docker image if any docker-relevant files have been changed
docker-test: no
# Should URLs be tested periodically?
Expand Down
Loading