module: prop_revu_grid

widgets of one Reviewer of one Proposal instance

ProposalReviewerRow

adds one row of widgets for possible Reviewer of Proposal

Method Description
getAssignment() return which type of reviewer this is (0, 1, 2)
setAssignment() define which type of reviewer this is (0, 1, 2)
setValue() set dotProduct value as percentage
setEnabled() enable/disable the checkboxes based on Reviewer eligibility
setNumberAssigned() show the number of assigned proposals with given role (1 | 2)
dotProduct() compute and set widget with dot product of reviewer & proposal topics

ReviewerAssignmentGridLayout

QGridLayout of possible Reviewers of Proposal

Method Description
addReviewer() add controls for one Reviewer to the grid
addReviewers() add list of Reviewers to the grid
setEnabled() enable/disable one Reviewer
setProposal() specify the Proposal associated with this grid
setAssignment() define the type for a named Reviewer
onCheck() ensure only one reviewer is either primary or secondary
setValue() set dotProduct value of a named Reviewer as percentage

class Assign_GUP.prop_revu_grid.ProposalReviewerRow(parent, layout, reviewer, proposal)[source]

Bases: PyQt4.QtCore.QObject

Adds a row of widgets to an existing grid layout for one Reviewer of one Proposal instance

dotProduct()[source]

dot product of Proposal and Reviewer topic strengths, \(\vec{p} \cdot \vec{r}\)

Computes \(\vec{p} \cdot \vec{r}\) where:

  • \(\vec{p}\) is array of topic value strengths for Proposal
  • \(\vec{r}\) is array of topic value strengths for Reviewer
getAssignment()[source]

report which type of reviewer this is

returns description
0 unassigned
1 primary reviewer (#1)
2 secondary reviewer (#2)
onCheckBoxClick(widget)[source]

either check box was clicked

rowCheck(checkbox)[source]

ensure at most one checkbox (primary or secondary) is checked for this reviewer

Parameters:checkbox (obj) – instance of QCheckBox
setAssignment(code)[source]

define which type of reviewer this is

code description
0 unassigned
1 primary reviewer (#1)
2 secondary reviewer (#2)
Parameters:code (int) – integer code (0 | 1 | 2)
setNumberAssigned(number, role)[source]

show the number of assigned proposals with given role

setProposal(proposal)[source]

define the proposal to be used with this row

setValue(percentage)[source]

set the percentage value

Parameters:percentage (int) – dot product of reviewer and proposal topic strengths
update()[source]
class Assign_GUP.prop_revu_grid.ReviewerAssignmentGridLayout(parent, agup)[source]

Bases: PyQt4.QtGui.QGridLayout

display and manage the assignment checkboxes and reported percentages for each reviewer on this proposal

addReviewer(rvwr)[source]

add this reviewer object for display

addReviewers(reviewers)[source]

add a list of reviewers

onCheck(row_widget)[source]

ensure only one reviewer is either primary or secondary

setAssignment(sort_name, code)[source]

define which type of reviewer this is

Parameters:
  • sort_name (str) – reviewer’s identifying key
  • code (int) – integer code (0 | 1 | 2)
setEnabled(sort_name, state=True)[source]

enable (True) or disable (False) a Reviewer identified by sort_name

All eligible Reviewers are enabled. Reviewers become ineligible when they are named as part of the Proposal team.

setProposal(proposal)[source]

declare which proposal is associated with this grid

setReviewersValues(reviewers)[source]

set the widget values for all Reviewers

setValue(sort_name, percentage)[source]

set the percentage value

update()[source]
updateNumbersOfAssignedProposals()[source]

update the numbers of assigned proposals shown for each reviewer and each role

Assign_GUP.prop_revu_grid.developer_main()[source]

create QGroupBox + QGridLayout and run the panel

R1 #1 R2 #2 % Reviewer Name
[x] 1 [ ] 0 100% Joe User
[ ] 0 [x] 1 80% Second Reviewer
[ ] 0 [ ] 0 22% Some Panel Member
[ ] 0 [ ] 0 1% Another Panel Member