repos:
  - repo: local
    hooks:
      - id: format
        name: Format code with black, isort, flake8
        entry: poe format
        language: system
        pass_filenames: false
        stages: [pre-commit]
      
      - id: commit-message-check
        name: Check Commit Message Structure
        entry: uv run python scripts/validate_commit_msg.py
        language: system
        stages: [commit-msg]

      - id: test-coverage-check
        name: Ensure at least 70% test coverage
        entry: bash scripts/validate_test.sh
        language: system
        pass_filenames: false
        always_run: true
        require_serial: true
        stages: [pre-commit]

      - id: update-docs
        name: Ensure that documentation server is updated
        entry: bash scripts/documentation.sh
        language: system
        stages: [pre-commit]

      - id: generate-requirements
        name: Generate requirements.txt
        entry: bash
        args: ["-c", "uv pip freeze --exclude-editable > requirements.txt"]
        language: system
        stages: [pre-commit]