-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
50 lines (46 loc) · 1.52 KB
/
.pre-commit-config.yaml
File metadata and controls
50 lines (46 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Pre-commit configuration for PhysioMotion4D
# Simplified to use Ruff for all linting and formatting
repos:
# Ruff - fast linter and formatter (replaces black, isort, flake8)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
hooks:
# Run the linter with auto-fixes
- id: ruff
args: [--fix]
# Run the formatter
- id: ruff-format
# Type checking with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
hooks:
- id: mypy
# With pass_filenames: false, we must provide an explicit target for mypy.
# Otherwise mypy exits with: "Missing target module, package, files, or command."
args: [--config-file=pyproject.toml, src]
additional_dependencies:
- types-setuptools
- scipy-stubs
- types-requests
pass_filenames: false
files: ^src/
# Regenerate docs/API_MAP.md whenever Python source files change
- repo: local
hooks:
- id: generate-api-map
name: Regenerate API map (docs/API_MAP.md)
entry: py utils/generate_api_map.py
language: system
pass_filenames: false
files: \.py$
# Local tests (optional - can be disabled if too slow)
- repo: local
hooks:
- id: fast-unit-tests
name: Run Fast Unit Tests
entry: pytest tests/ -m "not slow" -v --maxfail=3
language: system
pass_filenames: false
always_run: false
files: ^(src/physiomotion4d/|tests/)
stages: [pre-push]