VersionHistory¶
- class chango.abc.VersionHistory¶
Bases:
MutableMapping[str|None,VNT],ABC,GenericAbstract base class for a version history describing the versions in a software project over several versions.
Hint
Objects of this class can be used as
MutableMapping, where the keys are the unique identifiers of the versions and the values are the version notes themselves.- add_version_note(version_note)¶
Add a version note to the version note.
- Parameters:
version_note (
VNT) – TheVersionNotenote to add.
- remove_version_note(version_note)¶
Remove a version note from the version note.
- Parameters:
version_note (
VNT) – TheVersionNotenote to remove.
- abstractmethod render(markup)¶
Render the version note as a string. Must include information about all change notes contained in the version note.
Hint
Make use of
chango.abc.VersionNote.render()to render the change notes.The change notes should be rendered in reverse chronological order. This needs to be handled by the implementation and can be achieved either by applying appropriate sorting the
uidor by sorting bydateif available.
- Parameters:
markup (
str) – The markup language to use for rendering. If the markup language is not supported, anUnsupportedMarkupErrorshould be raised.- Returns:
The rendered version note.
- Return type:
str