Skip to content
Back to top
View this page

# VersionNote

class chango.abc.VersionNote(version)

  Bases: `MutableMapping`[`str`, `CNT`], `ABC`, `Generic`

  Abstract base class for a version note describing the set of changes in a software project for a single version.

  Hint

  Objects of this class can be used as `MutableMapping`, where the keys are the unique identifiers (or file names) of the change notes and the values are the change notes themselves.

  Warning

  To ensure that the changes in this version are displayed in the correct order, the change notes should be added in the order they were made. Manual reordering of the change notes may interfere with the order in which they are displayed.

  Parameters:

    version (`Version` | `None`) – The version of the software project this note is for or May be `None` if the version is not yet released.

  version

    (`Version` | `None`): The version of the software project this note is for or May be `None` if the version is not yet released.

  add_change_note(change_note)

    Add a change note to the version note.

    Parameters:

      change_note (`CNT`) – The `ChangeNote` note to add.

  property date

    Convenience property for the version UID.

    Returns:

      The release date of `version` if available,

        `None` otherwise.

    Return type:

      `datetime.date` | `None`

  remove_change_note(change_note)

    Remove a change note from the version note.

    Parameters:

      change_note (`CNT`) – The `ChangeNote` note to remove.

  abstractmethod render(markup)

    Render the version note as a string.

    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`

  property uid

    Convenience property for the version UID.

    Returns:

      The UID of `version` if available, `None`

        otherwise.

    Return type:

      `str` | `None`