Coverage for rendercv/themes/classic/__init__.py: 100%
12 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-10-07 17:51 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-10-07 17:51 +0000
1from typing import Literal
3import pydantic
5from rendercv.themes.common_options import (
6 EntryAreaMargins,
7 LaTeXDimension,
8 Margins,
9 ThemeOptions,
10)
13class EntryAreaMarginsForClassic(EntryAreaMargins):
14 """This class is a data model for the entry area margins."""
16 education_degree_width: LaTeXDimension = pydantic.Field(
17 default="1 cm",
18 title="Date and Location Column Width",
19 description=(
20 "The width of the degree column in EducationEntry. The default value is"
21 " 1 cm."
22 ),
23 )
26class MarginsForClassic(Margins):
27 """This class is a data model for the margins."""
29 entry_area: EntryAreaMarginsForClassic = pydantic.Field(
30 default=EntryAreaMarginsForClassic(),
31 title="Entry Area Margins",
32 description="Entry area margins.",
33 )
36class ClassicThemeOptions(ThemeOptions):
37 """This class is the data model of the theme options for the `classic` theme."""
39 theme: Literal["classic"]
40 font: Literal[
41 "Latin Modern Serif",
42 "Latin Modern Sans Serif",
43 "Latin Modern Mono",
44 "Source Sans 3",
45 "Charter",
46 ] = pydantic.Field(
47 default="Source Sans 3",
48 title="Font",
49 description="The font family of the CV. The default value is Source Sans 3.",
50 )
51 show_timespan_in: list[str] = pydantic.Field(
52 default=[],
53 title="Show Time Span in These Sections",
54 description=(
55 "The time span will be shown in the date and location column in these"
56 " sections. The input should be a list of section titles as strings"
57 " (case-sensitive). The default value is [] (no section will show the time"
58 " span)."
59 ),
60 )
61 margins: MarginsForClassic = pydantic.Field(
62 default=MarginsForClassic(),
63 title="Margins",
64 description="Page, section title, entry field, and highlights field margins.",
65 )