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

1"""Configuration management for the application.""" 

2 

3from pydantic import BaseModel, Field 

4 

5 

6class SemanticAnalysisConfig(BaseModel): 

7 """Configuration for semantic analysis.""" 

8 

9 num_topics: int = Field( 

10 default=3, description="Number of topics to extract using LDA" 

11 ) 

12 

13 lda_passes: int = Field(default=10, description="Number of passes for LDA training") 

14 

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 ) 

19 

20 

21class ChunkingConfig(BaseModel): 

22 """Configuration for document chunking.""" 

23 

24 chunk_size: int = Field( 

25 default=1000, description="Maximum size of each chunk in characters" 

26 ) 

27 

28 chunk_overlap: int = Field( 

29 default=200, description="Number of characters to overlap between chunks" 

30 ) 

31 

32 

33class GlobalConfig(BaseModel): 

34 """Global configuration settings.""" 

35 

36 chunking: ChunkingConfig = Field( 

37 default_factory=ChunkingConfig, description="Chunking configuration" 

38 ) 

39 

40 semantic_analysis: SemanticAnalysisConfig = Field( 

41 default_factory=SemanticAnalysisConfig, 

42 description="Semantic analysis configuration", 

43 ) 

44 

45 

46class Settings(BaseModel): 

47 """Application settings.""" 

48 

49 # Qdrant configuration 

50 QDRANT_URL: str 

51 QDRANT_API_KEY: str 

52 QDRANT_COLLECTION_NAME: str 

53 

54 # OpenAI configuration 

55 OPENAI_API_KEY: str 

56 

57 # State management 

58 STATE_DB_PATH: str 

59 

60 # Git repository configuration 

61 REPO_TOKEN: str 

62 REPO_URL: str 

63 

64 # Confluence configuration 

65 CONFLUENCE_URL: str 

66 CONFLUENCE_SPACE_KEY: str 

67 CONFLUENCE_TOKEN: str 

68 CONFLUENCE_EMAIL: str 

69 

70 # Jira configuration 

71 JIRA_URL: str 

72 JIRA_PROJECT_KEY: str 

73 JIRA_TOKEN: str 

74 JIRA_EMAIL: str 

75 

76 # Global configuration 

77 global_config: GlobalConfig = Field( 

78 default_factory=GlobalConfig, description="Global configuration settings" 

79 )