project_inventory#

import pwa_pages.project_inventory

Helper tools for writing tables.

class Project(*, name: str, url: str, collaboration: List[str] | str | None = None, languages: List[str] = [], sub_projects: List[SubProject] | None = None, since: int = 0)[source]#

Bases: BaseModel

collaboration: List[str] | str | None[source]#
languages: List[str][source]#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}[source]#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'collaboration': FieldInfo(annotation=Union[List[str], str, NoneType], required=False), 'languages': FieldInfo(annotation=List[str], required=False, default=[]), 'name': FieldInfo(annotation=str, required=True), 'since': FieldInfo(annotation=int, required=False, default=0), 'sub_projects': FieldInfo(annotation=Union[List[pwa_pages.project_inventory.SubProject], NoneType], required=False), 'url': FieldInfo(annotation=str, required=True)}[source]#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

name: str[source]#
since: int[source]#
sub_projects: List[SubProject] | None[source]#
url: str[source]#
class ProjectInventory(*, projects: List[Project], collaborations: Dict[str, str] = {})[source]#

Bases: BaseModel

collaborations: Dict[str, str][source]#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}[source]#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'collaborations': FieldInfo(annotation=Dict[str, str], required=False, default={}), 'projects': FieldInfo(annotation=List[pwa_pages.project_inventory.Project], required=True)}[source]#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

projects: List[Project][source]#
class SubProject(*, name: str, url: str)[source]#

Bases: BaseModel

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}[source]#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=True), 'url': FieldInfo(annotation=str, required=True)}[source]#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

name: str[source]#
url: str[source]#
export_json_schema(argv: Sequence[str] | None = None) int[source]#
fix_html_alignment(src: str) str[source]#
load_yaml(path: Path | str) dict[source]#
to_html_table(inventory: ProjectInventory, selected_languages: List[str], *, fetch: bool = False, min_percentage: float = 2.5, hide_columns: Iterable[str] | None = None) str[source]#