Coverage for src/qdrant_loader/config.py: 0%
27 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"""Configuration management for the application."""
3from pydantic import BaseModel, Field
6class SemanticAnalysisConfig(BaseModel):
7 """Configuration for semantic analysis."""
9 num_topics: int = Field(
10 default=3, description="Number of topics to extract using LDA"
11 )
13 lda_passes: int = Field(default=10, description="Number of passes for LDA training")
16class ChunkingConfig(BaseModel):
17 """Configuration for document chunking."""
19 chunk_size: int = Field(
20 default=1000, description="Maximum size of each chunk in characters"
21 )
23 chunk_overlap: int = Field(
24 default=200, description="Number of characters to overlap between chunks"
25 )
28class GlobalConfig(BaseModel):
29 """Global configuration settings."""
31 chunking: ChunkingConfig = Field(
32 default_factory=ChunkingConfig, description="Chunking configuration"
33 )
35 semantic_analysis: SemanticAnalysisConfig = Field(
36 default_factory=SemanticAnalysisConfig,
37 description="Semantic analysis configuration",
38 )
41class Settings(BaseModel):
42 """Application settings."""
44 # Qdrant configuration
45 QDRANT_URL: str
46 QDRANT_API_KEY: str
47 QDRANT_COLLECTION_NAME: str
49 # OpenAI configuration
50 OPENAI_API_KEY: str
52 # State management
53 STATE_DB_PATH: str
55 # Git repository configuration
56 REPO_TOKEN: str
57 REPO_URL: str
59 # Confluence configuration
60 CONFLUENCE_URL: str
61 CONFLUENCE_SPACE_KEY: str
62 CONFLUENCE_TOKEN: str
63 CONFLUENCE_EMAIL: str
65 # Jira configuration
66 JIRA_URL: str
67 JIRA_PROJECT_KEY: str
68 JIRA_TOKEN: str
69 JIRA_EMAIL: str
71 # Global configuration
72 global_config: GlobalConfig = Field(
73 default_factory=GlobalConfig, description="Global configuration settings"
74 )