Coverage for src/ezcompiler/shared/__init__.py: 100.00%

10 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-16 16:37 +0000

1# /////////////////////////////////////////////////////////////// 

2# SHARED - Shared configuration and exceptions 

3# Project: ezcompiler 

4# /////////////////////////////////////////////////////////////// 

5 

6""" 

7Shared module - Shared configuration and exceptions for EzCompiler. 

8 

9This module provides access to shared components used across all layers: 

10- CompilerConfig: Project configuration dataclass 

11- Exceptions: Service and utility exception hierarchy 

12""" 

13 

14from __future__ import annotations 

15 

16# /////////////////////////////////////////////////////////////// 

17# IMPORTS 

18# /////////////////////////////////////////////////////////////// 

19# Local imports 

20from ._compilation_result import CompilationResult 

21from ._compiler_config import COMPILER_SECTION_KEYS, CompilerConfig 

22from ._installer_config import InstallerConfig 

23from ._release_preflight import ReleasePreflight 

24from ._tuf_status import TufStatus, TufVersion 

25from .exceptions import ( 

26 CompilationError, 

27 ConfigurationError, 

28 EzCompilerError, 

29 ReleaseError, 

30 TemplateError, 

31 UpdaterConfigError, 

32 UpdaterError, 

33 UpdaterGenerationError, 

34 UploadError, 

35 VersionError, 

36) 

37from .exceptions.utils._file_exceptions import FileError 

38 

39# /////////////////////////////////////////////////////////////// 

40# TYPE ALIASES 

41# /////////////////////////////////////////////////////////////// 

42 

43# Backward compatibility alias 

44FileOperationError = FileError 

45 

46# /////////////////////////////////////////////////////////////// 

47# PUBLIC API 

48# /////////////////////////////////////////////////////////////// 

49 

50__all__ = [ 

51 # Configuration 

52 # Result types 

53 "CompilationResult", 

54 # Configuration 

55 "CompilerConfig", 

56 "COMPILER_SECTION_KEYS", 

57 "InstallerConfig", 

58 # Publication 

59 "ReleasePreflight", 

60 # TUF status 

61 "TufStatus", 

62 "TufVersion", 

63 # Base exception 

64 "EzCompilerError", 

65 # Service exceptions 

66 "CompilationError", 

67 "ConfigurationError", 

68 "ReleaseError", 

69 "TemplateError", 

70 "UploadError", 

71 "VersionError", 

72 # File exceptions (backward compatibility alias) 

73 "FileOperationError", 

74 # Updater exceptions 

75 "UpdaterError", 

76 "UpdaterConfigError", 

77 "UpdaterGenerationError", 

78]