vantage6.client.subclients.store.review.ReviewSubClient#

class ReviewSubClient(parent)#

Bases: SubClient

Subclient for the reviews from the algorithm store.

__init__(parent)#

Methods

__init__(parent)

approve(id_[, comment])

Approve a review.

create(algorithm, reviewer)

Assign an algorithm to be reviewed by a particular user.

delete(id_)

Delete a review.

get(id_)

Get a review by its id.

list([algorithm, reviewer, under_review, ...])

List reviews

reject(id_[, comment])

Reject a review.

approve(id_, comment=None)#

Approve a review.

Parameters:
  • id (int) – The id of the review.

  • comment (str) – A comment for the approval of the review. Optional.

Returns:

The approved review.

Return type:

dict

create(algorithm, reviewer)#

Assign an algorithm to be reviewed by a particular user.

Parameters:
  • algorithm (int) – The id of the algorithm.

  • reviewer (int) – The user id for the reviewer.

Returns:

The created review.

Return type:

dict

delete(id_)#

Delete a review.

Parameters:

id (int) – The id of the review.

Returns:

The deleted review.

Return type:

dict

get(id_)#

Get a review by its id.

Parameters:

id (int) – The id of the review.

Returns:

The review.

Return type:

dict

list(algorithm=None, reviewer=None, under_review=None, reviewed=None, approved=None, rejected=None, page=1, per_page=10)#

List reviews

Parameters:
  • algorithm (int) – Filter by algorithm id.

  • reviewer (int) – Filter by user id of the reviewer.

  • under_review (bool) – Filter by under review status.

  • reviewed (bool) – Filter by reviewed (either approve or rejected).

  • approved (bool) – Filter by approved status.

  • rejected (bool) – Filter by rejected status.

  • page (int) – Page number for pagination (default=1)

  • per_page (int) – Number of items per page (default=10)

Returns:

List of reviews

Return type:

list[dict]

reject(id_, comment=None)#

Reject a review.

Parameters:
  • id (int) – The id of the review.

  • comment (str) – A comment for the rejection of the review. Optional.

Returns:

The rejected review.

Return type:

dict