Skip to content

models

Models for metadata harvested from Git.

GitAuthor

Bases: SomesyBaseModel

A Git author mapped to a Somesy project contributor.

Source code in src/somesy/git/models.py
14
15
16
17
18
19
20
21
22
23
class GitAuthor(SomesyBaseModel):
    """A Git author mapped to a Somesy project contributor."""

    name: str
    email: str | None = None
    commit_count: Annotated[int, Field(ge=0)] = 0
    author: bool = True
    contribution_types: list[ContributionTypeEnum] = Field(
        default_factory=lambda: [ContributionTypeEnum.code], min_length=1
    )

GitMetadata

Bases: SomesyBaseModel

Git values that map to Somesy project metadata.

Source code in src/somesy/git/models.py
26
27
28
29
30
31
32
33
34
class GitMetadata(SomesyBaseModel):
    """Git values that map to Somesy project metadata."""

    name: str | None = None
    repository: str | None = None
    version: str | None = None
    date_created: date | None = None
    date_modified: date | None = None
    authors: list[GitAuthor] = Field(default_factory=list)