Skip to content

Commit

Permalink
add pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
akaszynski committed Aug 30, 2024
1 parent 2722d08 commit 50e7e94
Show file tree
Hide file tree
Showing 9 changed files with 1,733 additions and 1,735 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing-and-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
url: https://pypi.org/p/lsdyna-mesh-reader
permissions:
id-token: write # this permission is mandatory for trusted publishing
contents: write # required to create a release
contents: write # required to create a release
steps:
- uses: actions/download-artifact@v4
- name: Flatten directory structure
Expand Down
70 changes: 70 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# See https://pre-commit.ci/
ci:
autofix_prs: true
autoupdate_schedule: quarterly

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
exclude: ^(docs/|tests)
- id: ruff-format

- repo: https://github.com/keewis/blackdoc
rev: v0.3.9
hooks:
- id: blackdoc
exclude: README.rst

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: [--skip=*.vt*]

- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
additional_dependencies: [tomli==2.0.1]
files: ^src/pyminiply/.*\.py

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: trailing-whitespace
exclude: .*\.(cdb|k|dat)$

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies: [numpy>=2.0, npt-promote==0.1]
exclude: ^tests/

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-toml
args: [--autofix]
- id: pretty-format-yaml
args: [--autofix, --indent, '2']

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
hooks:
- id: clang-format

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.2
hooks:
- id: check-github-workflows

- repo: https://github.com/dzhu/rstfmt
rev: v0.0.14
hooks:
- id: rstfmt
Loading

0 comments on commit 50e7e94

Please sign in to comment.