Coverage for src / local_deep_research / settings / env_definitions / bootstrap.py: 100%

2 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-02-25 01:07 +0000

1""" 

2Bootstrap environment settings. 

3 

4These settings are required early in the application lifecycle, 

5before database initialization and other core systems. 

6""" 

7 

8from ..env_settings import ( 

9 BooleanSetting, 

10 StringSetting, 

11 PathSetting, 

12 SecretSetting, 

13) 

14 

15 

16# Bootstrap settings required before DB init 

17BOOTSTRAP_SETTINGS = [ 

18 # Security and encryption 

19 SecretSetting( 

20 key="bootstrap.encryption_key", 

21 description="Database encryption key", 

22 required=False, # Not required if allow_unencrypted is True 

23 ), 

24 SecretSetting( 

25 key="bootstrap.secret_key", 

26 description="Application secret key for session encryption", 

27 ), 

28 # Database 

29 StringSetting( 

30 key="bootstrap.database_url", 

31 description="Database connection URL", 

32 ), 

33 BooleanSetting( 

34 key="bootstrap.allow_unencrypted", 

35 description="Allow unencrypted database (for development)", 

36 default=False, 

37 deprecated_env_var="LDR_ALLOW_UNENCRYPTED", 

38 ), 

39 # System paths 

40 PathSetting( 

41 key="bootstrap.data_dir", 

42 description="Data directory path", 

43 create_if_missing=True, 

44 ), 

45 PathSetting( 

46 key="bootstrap.config_dir", 

47 description="Configuration directory path", 

48 create_if_missing=True, 

49 ), 

50 PathSetting( 

51 key="bootstrap.log_dir", 

52 description="Log directory path", 

53 create_if_missing=True, 

54 ), 

55 # Logging 

56 BooleanSetting( 

57 key="bootstrap.enable_file_logging", 

58 description="Enable logging to file", 

59 default=False, 

60 ), 

61]