Coverage for src/qdrant_loader/config.py: 0%
28 statements
« prev ^ index » next coverage.py v7.10.0, created at 2025-07-25 11:39 +0000
« prev ^ index » next coverage.py v7.10.0, created at 2025-07-25 11:39 +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")
15 spacy_model: str = Field(
16 default="en_core_web_md",
17 description="spaCy model to use for text processing. Options: en_core_web_sm (15MB, no vectors), en_core_web_md (50MB, 20k vectors), en_core_web_lg (750MB, 514k vectors)"
18 )
21class ChunkingConfig(BaseModel):
22 """Configuration for document chunking."""
24 chunk_size: int = Field(
25 default=1000, description="Maximum size of each chunk in characters"
26 )
28 chunk_overlap: int = Field(
29 default=200, description="Number of characters to overlap between chunks"
30 )
33class GlobalConfig(BaseModel):
34 """Global configuration settings."""
36 chunking: ChunkingConfig = Field(
37 default_factory=ChunkingConfig, description="Chunking configuration"
38 )
40 semantic_analysis: SemanticAnalysisConfig = Field(
41 default_factory=SemanticAnalysisConfig,
42 description="Semantic analysis configuration",
43 )
46class Settings(BaseModel):
47 """Application settings."""
49 # Qdrant configuration
50 QDRANT_URL: str
51 QDRANT_API_KEY: str
52 QDRANT_COLLECTION_NAME: str
54 # OpenAI configuration
55 OPENAI_API_KEY: str
57 # State management
58 STATE_DB_PATH: str
60 # Git repository configuration
61 REPO_TOKEN: str
62 REPO_URL: str
64 # Confluence configuration
65 CONFLUENCE_URL: str
66 CONFLUENCE_SPACE_KEY: str
67 CONFLUENCE_TOKEN: str
68 CONFLUENCE_EMAIL: str
70 # Jira configuration
71 JIRA_URL: str
72 JIRA_PROJECT_KEY: str
73 JIRA_TOKEN: str
74 JIRA_EMAIL: str
76 # Global configuration
77 global_config: GlobalConfig = Field(
78 default_factory=GlobalConfig, description="Global configuration settings"
79 )