Update peptides_proteins.rst #226
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
name: Linting code-blocks | |
on: [pull_request] | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax | |
- name: Installing Dependencies | |
run: | | |
pip install blacken-docs | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v41 | |
with: | |
dir_names_max_depth: 0 | |
files: | | |
docs/source/*.rst | |
docs/source/**/*.rst | |
!docs/source/**/_templates | |
- name: Running blacken | |
run: | | |
blacken-docs -E -l 80 ${{ steps.changed-files.outputs.all_changed_files }} > blacken.log | true | |
cat blacken.log | |
if grep -q "parse error" "blacken.log"; then | |
exit 1 | |
fi | |
- name: Run action-suggester (only works on lines that were changes in this PR) | |
uses: reviewdog/action-suggester@v1 | |
with: | |
tool_name: blacken-docs | |
- name: Display diff and fail if there was anything changed by blacken-docs | |
run: | | |
git diff --diff-algorithm histogram --exit-code |