Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,6 @@ results/

# remove background jobs
*nohup.out

# ignore .vscode settings
.vscode/
49 changes: 24 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,73 +1,72 @@

# Pre-commit configuration file
# Documentation: https://pre-commit.com/

repos:
# Basic file checks first (fast and foundational)
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-json
- id: check-merge-conflict
- id: check-added-large-files
- id: check-yaml
- id: check-json
- id: check-merge-conflict
- id: check-added-large-files
args: ["--maxkb=102400"]

# Format TOML files early (before other tools might read config)
- repo: https://github.com/pappasam/toml-sort
- repo: https://github.com/pappasam/toml-sort
rev: v0.24.3
hooks:
- id: toml-sort
- id: toml-sort
args: ["--in-place"]

# Python syntax upgrades (should run before linting/formatting)
- repo: https://github.com/asottile/pyupgrade
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
hooks:
- id: pyupgrade
- id: pyupgrade
args: ["--py311-plus"]

# Import sorting (should run before Ruff to avoid conflicts)
- repo: https://github.com/pre-commit/mirrors-isort
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
- id: isort
args: ["--profile", "black"]

# Ruff for linting and formatting Python files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.1
hooks:
- id: ruff-check
- id: ruff-check
args: ["--fix"]
- id: ruff-format # Add Ruff formatter
- id: ruff-format # Add Ruff formatter

# nbQA to run Ruff on Jupyter Notebooks (after Python tools)
- repo: https://github.com/nbQA-dev/nbQA
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.1
hooks:
- id: nbqa-ruff
- id: nbqa-ruff
name: nbQA-Ruff
args: ["--fix"]
additional_dependencies: ["ruff"]

# Final cleanup (whitespace and newlines)
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: end-of-file-fixer
- id: trailing-whitespace

# Keep pre-commit itself up to date (run last)
- repo: https://gitlab.com/vojko.pribudic.foss/pre-commit-update
- repo: https://gitlab.com/vojko.pribudic.foss/pre-commit-update
rev: v0.9.0
hooks:
- id: pre-commit-update
- id: pre-commit-update
args: ["--verbose"]

- repo: local
- repo: local
hooks:
- id: shellcheck
- id: shellcheck
name: ShellCheck
description: Test shell scripts with ShellCheck
entry: shellcheck
Expand Down
File renamed without changes.
Loading