Skip to content

Commit

Permalink
Merge pull request #6 from AFM-SPM/ns-rse/5-pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ns-rse authored Nov 13, 2023
2 parents 0a9b525 + 903fd01 commit 2d1f7bc
Show file tree
Hide file tree
Showing 4 changed files with 763 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Configuration
config:
# MD013 - line-length
line_length:
line_length: 120
code_blocks: false
tables: false
html:
allowed_elements:
- div

# Globs
globs:
- "**/*.md"

# Fix any fixable errors
fix: true
66 changes: 66 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 # Use the ref you want to point at
hooks:
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
types: [python]
- id: fix-byte-order-marker
- id: name-tests-test
args: ["--pytest-test-first"]
- id: requirements-txt-fixer
- id: trailing-whitespace
types: [python, yaml, markdown]

- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.10.0
hooks:
- id: markdownlint-cli2
args: []

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py38-plus]

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.4
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]

- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
- id: black
types: [python]
additional_dependencies: ['click==8.0.4']
args: ["--extend-exclude", "topostats/plotting.py"]
- id: black-jupyter

- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
hooks:
- id: nbstripout

- repo: local
hooks:
- id: pylint
args: ["--rcfile=.pylintrc"]
name: Pylint
entry: python -m pylint
language: system
files: \.py$

ci:
autofix_prs: true
autofix_commit_msg: '[pre-commit.ci] Fixing issues with pre-commit'
autoupdate_schedule: weekly
autoupdate_commit_msg: '[pre-commit.ci] pre-commit-autoupdate'
skip: [pylint] # Optionally list ids of hooks to skip on CI
Loading

0 comments on commit 2d1f7bc

Please sign in to comment.