Skip to content



Tools related to assigning proposals to reviewers

In Pretalx assignments can be done in two directions

  1. Assign proposals to reviewers
  2. Assign reviewers to proposals

We will always assume direction 1. in this file when we talk about an assignment. So in Operation Research-speak, resources get assigned tasks, not the other way around. The time needed for the task of reviewing a proposal is quite homogeneous while the number of reviews a single reviewer may highly vary. Also, we will rather use the name submission instead of proposal as this also reflects the naming of the Pretalx API.

We follow the convention over configuration principle here and thus check out the Col class for the naming of columns.


Additional conventions used for reviews

address_as = 'Address as' class-attribute

all_proposals = 'All Proposals' class-attribute

committee_contact = 'Committee Contact' class-attribute

curr_assignments = 'Current Assignments' class-attribute

done_nreviews = 'Done #Reviews' class-attribute

nassignments = '#Assignments' class-attribute

nvotes = '#Votes' class-attribute

pretalx_activated = 'Pretalx activated' class-attribute

rem_nreviews = 'Remaining #Reviews' class-attribute

target_nreviews = 'Target #Reviews' class-attribute

track_prefs = 'Track Preferences' class-attribute

vote_score = 'Vote Score' class-attribute

read_assignment_as_df(file_path: Path) -> pd.DataFrame

Reads an assignment and returns a dataframe

Source code in pytanis/
def read_assignment_as_df(file_path: Path) -> pd.DataFrame:
    """Reads an assignment and returns a dataframe"""
    with open(file_path) as fh:
        curr_assign = json.load(fh)
    df = pd.DataFrame({k: [v] for k, v in curr_assign.items()})
    df = df.T.rename_axis({0: Col.curr_assignments}).reset_index()
    return df

save_assignments_as_json(df: pd.DataFrame, file_path: Union[Path, str])

Save the dataframe as proposal assignment JSON file

Source code in pytanis/
def save_assignments_as_json(df: pd.DataFrame, file_path: Union[Path, str]):
    """Save the dataframe as proposal assignment JSON file"""
    file_path = Path(file_path)
    df = df.loc[:, [, Col.curr_assignments]]
    json_dct = json.loads(df.set_index([Col.curr_assignments]
    # prettify the json string for human-edit-ability if reviewers need to be dropped later
    json_str = json.dumps(json_dct).replace("{", "{\n").replace("], ", "],\n").replace("]}", "]\n}")
    with open(file_path, "w") as fh: