gitws.manifestformat module

Manifest Format.

We support multiple manifest formats. The ManifestFormat class describes the access interface.

class gitws.manifestformat.ManifestFormat[source]

Bases: object

Manifest Format.

Specific Implementations of this class, handle specific manifest formats.

dump(spec: ManifestSpec, path: Optional[Path] = None) str[source]

Return ManifestSpec As String.

Parameters:

spec – Manifest Spec

Keyword Arguments:
  • doc – Existing Document To Be Updated.

  • path – Path To Possibly Existing Document.

is_compatible(path: Path) bool[source]

Check If File At path Is Compatible.

load(path: Path) ManifestSpec[source]

Load Manifest From path.

Raises:
prio: int = 0

Manifest Format Priority In Case Of Multiple Matching Formats.

save(spec: ManifestSpec, path: Path, update: bool = True)[source]

Save spec At path.

Parameters:
  • spec – Manifest Specification to be stored

  • path – Filepath For Manifest.

Keyword Arguments:

update – Additional Attributes And Comments Added By The User Are Kept. Otherwise The File Is Just Overwritten.

upgrade(path: Path)[source]

Upgrade ManifestSpec at path To Latest Version Including Documentation.