-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add prettier to pre-commit (#427)
* add prettier * add prettier fixes * add var name to formatter * add "" to Lineage * fmt table formatter * dont check fomatter * run pre-commits
- Loading branch information
Showing
35 changed files
with
34,997 additions
and
913 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
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
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
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
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
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 |
---|---|---|
|
@@ -17,8 +17,7 @@ jobs: | |
with: | ||
workflows: "main.yml" | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
|
||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
Formatting: | ||
runs-on: ubuntu-latest | ||
|
@@ -35,7 +34,6 @@ jobs: | |
VALIDATE_PYTHON_BLACK: true | ||
VALIDATE_MARKDOWN: true | ||
|
||
|
||
Linting: | ||
runs-on: ubuntu-latest | ||
env: | ||
|
@@ -50,15 +48,13 @@ jobs: | |
stagein: mamba install -n snakemake -c conda-forge peppy | ||
args: "--lint" | ||
|
||
|
||
Pre-Commit: | ||
runs-on: ubuntu-latest | ||
if: github.ref != 'refs/heads/master' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: pre-commit/[email protected] | ||
|
||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: pre-commit/[email protected] | ||
|
||
Technology-Tests: | ||
runs-on: ubuntu-latest | ||
|
@@ -186,7 +182,16 @@ jobs: | |
- Pre-Commit | ||
strategy: | ||
matrix: | ||
rule: [benchmark_strain_calling, benchmark_assembly, benchmark_mixtures, benchmark_non_sars_cov_2, benchmark_reads, compare_assemblers, generate_test_cases] | ||
rule: | ||
[ | ||
benchmark_strain_calling, | ||
benchmark_assembly, | ||
benchmark_mixtures, | ||
benchmark_non_sars_cov_2, | ||
benchmark_reads, | ||
compare_assemblers, | ||
generate_test_cases, | ||
] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
|
@@ -197,7 +202,6 @@ jobs: | |
# .tests/.snakemake/conda | ||
# key: benchmarks-${{ runner.os }}-${{ matrix.rule }}-${{ matrix.technology }}-${{ matrix.seq_method }}-${{ hashFiles('*.tests/.snakemake/conda/*.yaml') }} | ||
|
||
|
||
# TODO caches are currently completely misleading, as they lead to certain files becoming present on disk which might | ||
# then hide failures that would otherwise be seen. | ||
|
||
|
@@ -279,7 +283,6 @@ jobs: | |
# ${{ runner.os }}-sars-cov-benchmark-dependencies-${{ steps.get-date.outputs.date }}- | ||
# ${{ runner.os }}-sars-cov-benchmark-dependencies- | ||
|
||
|
||
- name: Prepare test data | ||
if: matrix.rule == 'generate_test_cases' | ||
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
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
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 |
---|---|---|
@@ -1,44 +1,49 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
exclude: "^publication/|CHANGELOG.md|docs/index.md|.github/pull_request_template.md" | ||
exclude: "^publication/|CHANGELOG.md|docs/index.md|.github/pull_request_template.md|resources/report-table-formatter.js" | ||
|
||
default_stages: [commit, push] | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
exclude: ^config/multiqc_config_lab.yaml|.tests/config/multiqc_config_lab.yaml | ||
- id: check-added-large-files | ||
- id: no-commit-to-branch | ||
- id: check-added-large-files | ||
- id: no-commit-to-branch | ||
|
||
- repo: https://github.com/snakemake/snakefmt | ||
- repo: https://github.com/snakemake/snakefmt | ||
rev: 0.4.4 | ||
hooks: | ||
- id: snakefmt | ||
- id: snakefmt | ||
|
||
- repo: https://github.com/psf/black | ||
- repo: https://github.com/psf/black | ||
rev: 21.12b0 | ||
hooks: | ||
- id: black | ||
- id: black-jupyter | ||
- id: black | ||
- id: black-jupyter | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
- id: isort | ||
|
||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.30.0 | ||
hooks: | ||
- id: markdownlint-fix | ||
- id: markdownlint-fix | ||
args: [-c, .markdownlint.yaml] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.5.1 | ||
hooks: | ||
- id: prettier | ||
|
||
# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date | ||
ci: | ||
autoupdate_schedule: weekly | ||
skip: [] | ||
submodules: false | ||
autoupdate_schedule: weekly | ||
skip: [] | ||
submodules: false |
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Oops, something went wrong.