TDAgentTools / .pre-commit-config.yaml
pedrobento988's picture
Initial project structure (#1)
e30962b verified
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: requirements-txt-fixer
files: requirements.txt|requirements-dev.txt|requirements-test.txt
- id: trailing-whitespace
exclude: |
(?x)^(
notebooks/
)
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
exclude: |
(?x)^(
notebooks/
)
- id: check-yaml
- id: check-symlinks
- id: check-toml
- id: check-added-large-files
args: ["--maxkb=1000"]
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
exclude: |
(?x)^(
notebooks/
)
- repo: https://github.com/pycqa/isort
rev: "5.12.0"
hooks:
- id: isort
exclude: |
(?x)^(
notebooks/
)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.7
hooks:
- id: ruff # linter
exclude: |
(?x)^(
scripts/|
notebooks/
)
# - id: ruff-format
- repo: local
hooks:
- id: update-req
name: Update requirements.txt
stages: [pre-commit]
language: system
entry: uv
files: uv.lock|requirements.txt
pass_filenames: false
args:
[
"export",
"--format",
"requirements-txt",
"--no-hashes",
"--no-dev",
"-o",
"requirements.txt",
]
- id: update-dev-req
name: Update requirements-dev.txt
stages: [pre-commit]
language: system
entry: uv
files: uv.lock|requirements-dev.txt
pass_filenames: false
args:
[
"export",
"--format",
"requirements-txt",
"--no-hashes",
"--group",
"dev",
"--group",
"test",
"-o",
"requirements-dev.txt",
]
- id: mypy
name: Running mypy
stages: [commit]
language: system
entry: uv run mypy
args: [--install-types, --non-interactive]
types: [python]
exclude: |
(?x)^(
scripts/|
notebooks/
)
# - id: pytest
# name: pytest
# stages: [commit]
# language: system
# entry: poetry run pytest
# types: [python]
# - id: pytest-cov
# name: pytest
# stages: [push]
# language: system
# entry: poetry run pytest --cov --cov-fail-under=100
# types: [python]
# pass_filenames: false