Coverage for src/qdrant_loader/config/types.py: 100%
68 statements
« prev ^ index » next coverage.py v7.8.2, created at 2025-06-04 05:50 +0000
« prev ^ index » next coverage.py v7.8.2, created at 2025-06-04 05:50 +0000
1"""Shared configuration types.
3This module defines shared TypedDict types for different configuration structures
4used across the application. These types provide type safety and documentation
5for configuration data structures.
6"""
8from enum import Enum
9from typing import Any, TypedDict
12class SourceType(str, Enum):
13 """Enum for supported source types."""
15 PUBLICDOCS = "publicdocs"
16 GIT = "git"
17 CONFLUENCE = "confluence"
18 JIRA = "jira"
19 LOCALFILE = "localfile"
22class GitConfig(TypedDict):
23 """Configuration for Git repositories."""
25 base_url: str
26 branch: str
27 include_paths: list[str]
28 exclude_paths: list[str]
29 file_types: list[str]
30 max_file_size: int
31 depth: int
32 token: str | None
35class ConfluenceConfig(TypedDict):
36 """Configuration for Confluence spaces."""
38 base_url: str
39 space_key: str
40 content_types: list[str]
41 token: str
42 email: str
45class JiraConfig(TypedDict):
46 """Configuration for Jira projects."""
48 base_url: str
49 project_key: str
50 requests_per_minute: int
51 page_size: int
52 process_attachments: bool
53 track_last_sync: bool
54 api_token: str
55 email: str
56 issue_types: list[str]
57 include_statuses: list[str]
60class PublicDocsConfig(TypedDict):
61 """Configuration for public documentation sources."""
63 base_url: str
64 version: str
65 content_type: str
66 path_pattern: str
67 exclude_paths: list[str]
70class SourcesConfigDict(TypedDict):
71 """Configuration for all sources."""
73 publicdocs: dict[str, PublicDocsConfig]
74 git: dict[str, GitConfig]
75 confluence: dict[str, ConfluenceConfig]
76 jira: dict[str, JiraConfig]
79class SemanticAnalysisConfigDict(TypedDict):
80 """Configuration for semantic analysis."""
82 num_topics: int
83 lda_passes: int
86class MarkItDownConfigDict(TypedDict):
87 """Configuration for MarkItDown settings."""
89 enable_llm_descriptions: bool
90 llm_model: str
91 llm_endpoint: str
94class FileConversionConfigDict(TypedDict):
95 """Configuration for file conversion."""
97 max_file_size: int
98 conversion_timeout: int
99 markitdown: MarkItDownConfigDict
102class QdrantConfigDict(TypedDict):
103 """Configuration for Qdrant vector database."""
105 url: str
106 api_key: str | None
107 collection_name: str
110class GlobalConfigDict(TypedDict):
111 """Global configuration settings."""
113 chunking: dict[str, Any]
114 embedding: dict[str, Any]
115 semantic_analysis: SemanticAnalysisConfigDict
116 sources: dict[str, Any]
117 state_management: dict[str, Any]
118 file_conversion: FileConversionConfigDict
119 qdrant: QdrantConfigDict | None