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.
- load(path: Path) ManifestSpec [source]
Load Manifest From
path
.- Raises:
ManifestNotFoundError – if file is not found
IncompatibleFormatError – Not Supported File Format.
ManifestError – On Syntax Or Data Scheme Errors.
- prio: int = 0
Manifest Format Priority In Case Of Multiple Matching Formats.
- save(spec: ManifestSpec, path: Path, update: bool = True)[source]
Save
spec
Atpath
.- 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
atpath
To Latest Version Including Documentation.