repos:
  - repo: https://github.com/kynan/nbstripout
    rev: 0.8.2
    hooks:
      - id: nbstripout
  - repo: https://github.com/astral-sh/ruff-pre-commit
    # Ruff version.
    rev: v0.14.9
    hooks:
      # Run the linter.
      - id: ruff-check
        args: [--fix]
      # Run the formatter.
      - id: ruff-format
  - repo: https://gitlab.com/bmares/check-json5
    rev: v1.0.0
    hooks:
    - id: check-json5
  - repo: https://github.com/jag-k/pydantic-settings-export
    # Use a tag version with the `v` prefix (e.g. v1.0.0)
    rev: v1.0.3
    hooks:
     - id: pydantic-settings-export
       entry: pdm run pydantic-settings-export
       language: system
       files: ^src/madsci_common/madsci/common/types/.*\.py$
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: check-yaml
      - id: check-toml
      - id: check-ast
      - id: check-merge-conflict
      - id: check-added-large-files
      - id: mixed-line-ending
        exclude: ^docs/api/
      - id: end-of-file-fixer
        exclude: ^docs/api/
      - id: trailing-whitespace
        exclude: ^docs/api/

  - repo: local
    hooks:
      - id: madsci-logging-patterns
        name: MADSci logging patterns
        entry: python scripts/precommit_check_logging_patterns.py
        language: system
        types: [python]
        files: ^src/.*\.py$
        exclude: ^(tests/|src/.*/tests/).*$
