Coverage for rendercv/themes/sb2nov/__init__.py: 100%

52 statements  

« prev     ^ index     » next       coverage.py v7.6.10, created at 2025-01-26 00:25 +0000

1from typing import Literal, Optional 

2 

3import pydantic_extra_types.color as pydantic_color 

4 

5import rendercv.themes.options as o 

6 

7o.colors_name_field_info.default = "rgb(0,0,0)" 

8o.colors_connections_field_info.default = "rgb(0,0,0)" 

9o.colors_section_titles_field_info.default = "rgb(0,0,0)" 

10 

11 

12class Colors(o.Colors): 

13 name: pydantic_color.Color = o.colors_name_field_info 

14 connections: pydantic_color.Color = o.colors_connections_field_info 

15 section_titles: pydantic_color.Color = o.colors_section_titles_field_info 

16 

17 

18o.text_font_family_field_info.default = "New Computer Modern" 

19 

20 

21class Text(o.Text): 

22 font_family: o.FontFamily = o.text_font_family_field_info 

23 

24 

25o.section_titles_type_field_info.default = "with-full-line" 

26 

27 

28class SectionTitles(o.SectionTitles): 

29 line_type: o.SectionTitleType = o.section_titles_type_field_info 

30 

31 

32o.highlights_bullet_field_info.default = "◦" 

33 

34 

35class Highlights(o.Highlights): 

36 bullet: o.BulletPoint = o.highlights_bullet_field_info 

37 

38 

39o.education_entry_main_column_first_row_template_field_info.default = ( 

40 "**INSTITUTION**\n*DEGREE in AREA*" 

41) 

42o.education_entry_degree_column_template_field_info.default = None 

43o.entry_base_with_date_date_and_location_column_template_field_info.default = ( 

44 "*LOCATION*\n*DATE*" 

45) 

46 

47 

48class EducationEntry(o.EducationEntry): 

49 main_column_first_row_template: str = ( 

50 o.education_entry_main_column_first_row_template_field_info 

51 ) 

52 degree_column_template: Optional[str] = ( 

53 o.education_entry_degree_column_template_field_info 

54 ) 

55 date_and_location_column_template: str = ( 

56 o.entry_base_with_date_date_and_location_column_template_field_info 

57 ) 

58 

59 

60class NormalEntry(o.NormalEntry): 

61 date_and_location_column_template: str = ( 

62 o.entry_base_with_date_date_and_location_column_template_field_info 

63 ) 

64 

65 

66o.experience_entry_main_column_first_row_template_field_info.default = ( 

67 "**POSITION**\n*COMPANY*" 

68) 

69 

70 

71class ExperienceEntry(o.ExperienceEntry): 

72 main_column_first_row_template: str = ( 

73 o.experience_entry_main_column_first_row_template_field_info 

74 ) 

75 date_and_location_column_template: str = ( 

76 o.entry_base_with_date_date_and_location_column_template_field_info 

77 ) 

78 

79 

80o.entry_types_education_entry_field_info.default = EducationEntry() 

81o.entry_types_normal_entry_field_info.default = NormalEntry() 

82o.entry_types_experience_entry_field_info.default = ExperienceEntry() 

83 

84 

85class EntryTypes(o.EntryTypes): 

86 education_entry: EducationEntry = o.entry_types_education_entry_field_info 

87 normal_entry: NormalEntry = o.entry_types_normal_entry_field_info 

88 experience_entry: ExperienceEntry = o.entry_types_experience_entry_field_info 

89 

90 

91o.theme_options_text_field_info.default = Text() 

92o.theme_options_colors_field_info.default = Colors() 

93o.theme_options_highlights_field_info.default = Highlights() 

94o.theme_options_entry_types_field_info.default = EntryTypes() 

95o.theme_options_section_titles_field_info.default = SectionTitles() 

96o.theme_options_theme_field_info.default = "sb2nov" 

97 

98 

99class Sb2novThemeOptions(o.ThemeOptions): 

100 theme: Literal["sb2nov"] = o.theme_options_theme_field_info 

101 text: Text = o.theme_options_text_field_info 

102 colors: Colors = o.theme_options_colors_field_info 

103 highlights: Highlights = o.theme_options_highlights_field_info 

104 entry_types: EntryTypes = o.theme_options_entry_types_field_info 

105 section_titles: SectionTitles = o.theme_options_section_titles_field_info