Skip to content

Commit

Permalink
Add pre-commit tool and configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Nov 14, 2024
1 parent 8de715d commit 94d6d8e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: [--maxkb=8192]
- id: check-merge-conflict
- id: check-yaml
args: [--allow-multiple-documents]
exclude: "conda.recipe/meta.yaml"
- id: end-of-file-fixer
exclude: "tests/cis_tests/.*"
- id: trailing-whitespace
exclude: "tests/cis_tests/.*"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
exclude: "tests/cis_tests/.*"
- id: ruff-format
exclude: "tests/cis_tests/.*"
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
3 changes: 2 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ channels:
- conda-forge
dependencies:
- h5py
- numpy
- numpy=1 # for now
- pre-commit
- pytest
- pytest-cov
- versioningit
Expand Down

0 comments on commit 94d6d8e

Please sign in to comment.