review

review(mapping: SemanticMapping, reviewers: Reference | list[Reference], *, score: float | None = None, date: date | None = None, exists_action: Literal['error', 'overwrite', 'keep'] | None = None) SemanticMapping[source]

Review a mapping and produce a new record.

Parameters:
  • mapping – A semantic mapping record

  • reviewers – A reviewer or list of reviewers

  • score – The agreement score, where 1.0 means agree, 0.0 means unsure, and -1.0 means disagree

  • date – The date of the review. Defaults to today.

  • exists_action – The action to take if a reviewer already exists. By default, will raise a value error.

Returns:

A new mapping record with new reviewer information. If there was already reviewer information, this will get overwritten.

Raises:
  • ValueError – If the mapping already has reviewer information, and exists_action is either set to “error” or is unset (since error is the default action)

  • InvalidExistsActionError – if an invalid value is passed to exists_action