Skip to content

Commit

Permalink
Add the ability to reject submissions with AutoReviewPoller
Browse files Browse the repository at this point in the history
  • Loading branch information
mawelborn committed Jan 21, 2025
1 parent db6081f commit 6243fe5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/poll_auto_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ async def auto_review(

return AutoReviewed(
changes=predictions.to_changes(result),
stp=True, # Defaults to `False` and may be omitted.
reject=False, # Defaults to `False` and may be omitted.
stp=False, # Defaults to `False` and may be omitted.
)


Expand Down
2 changes: 2 additions & 0 deletions indico_toolkit/polling/autoreview.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
@dataclass
class AutoReviewed:
changes: "dict[str, Any] | list[dict[str, Any]]"
reject: bool = False
stp: bool = False


Expand Down Expand Up @@ -170,6 +171,7 @@ async def _worker(self, submission_id: "SubmissionId") -> None:
SubmitReview(
submission_id,
changes=auto_reviewed.changes,
rejected=auto_reviewed.reject,
force_complete=auto_reviewed.stp,
)
)
Expand Down

0 comments on commit 6243fe5

Please sign in to comment.