Skip to content
Back to top
View this page

# VersionHistory

class chango.abc.VersionHistory

  Bases: `MutableMapping`[`str` | `None`, `VNT`], `ABC`, `Generic`

  Abstract 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`) – The `VersionNote` note to add.

  remove_version_note(version_note)

    Remove a version note from the version note.

    Parameters:

      version_note (`VNT`) – The `VersionNote` note 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 `uid` or by sorting by `date` if available.

    Parameters:

      markup (`str`) – The markup language to use for rendering. If the markup language is not supported, an `UnsupportedMarkupError` should be raised.

    Returns:

      The rendered version note.

    Return type:

      `str`