File size: 1,547 Bytes
016b413
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8fa2ce6
016b413
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
repos:
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.4.4
    hooks:
      - id: ruff
        args: [--fix, --exclude, tests]
        exclude: ^reference_repos/
      - id: ruff-format
        args: [--exclude, tests]
        exclude: ^reference_repos/

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.10.0
    hooks:
      - id: mypy
        files: ^src/
        exclude: ^folder|^src/app.py
        additional_dependencies:
          - pydantic>=2.7
          - pydantic-settings>=2.2
          - tenacity>=8.2
          - pydantic-ai>=0.0.16
        args: [--ignore-missing-imports]

  - repo: local
    hooks:
      - id: pytest-unit
        name: pytest unit tests (no OpenAI)
        entry: uv
        language: system
        types: [python]
        args: [
          "run",
          "pytest",
          "tests/unit/",
          "-v",
          "-m",
          "not openai and not embedding_provider",
          "--tb=short",
          "-p",
          "no:logfire",
        ]
        pass_filenames: false
        always_run: true
        require_serial: false
      - id: pytest-local-embeddings
        name: pytest local embeddings tests
        entry: uv
        language: system
        types: [python]
        args: [
          "run",
          "pytest",
          "tests/",
          "-v",
          "-m",
          "local_embeddings",
          "--tb=short",
          "-p",
          "no:logfire",
        ]
        pass_filenames: false
        always_run: true
        require_serial: false