Event Planner

class main.components.event_planner.EventPlanner

The EventPlanner object contains functions used for Event Planner tab

Methods:

email_results(output_df, email_dict, event)

Function to send email to participants

get_criteria_list(other_cols_values, n)

Create list of criteria selection for every criteria column

process_result(df, event, n_groups, ...)

Processing for event planner, shuffling and splitting participants

static email_results(output_df: DataFrame, email_dict: Dict[str, str], event: str) bool

Function to send email to participants

Parameters:
  • output_df – output DataFrame from process_result

  • email_dict – dictionary mapping participants to email address

  • event – name of event, for result heading and email

Returns:

indicator if email is sent

static get_criteria_list(other_cols_values: List[str], n: int) List[str]

Create list of criteria selection for every criteria column

Parameters:
  • other_cols_values – list of criteria columns

  • n – number of criterias to generate

Returns:

list of criteria selection that is randomly selected

static process_result(df: DataFrame, event: str, n_groups: int, pair_flag: str, criteria_level: str, email_flag: str, hide_flag: str, style: Dict[str, Any])

Processing for event planner, shuffling and splitting participants

Parameters:
  • df – input DataFrame

  • event – name of event, for result heading and email

  • n_groups – number of groups

  • pair_flag – option whether to pair participants up

  • criteria_level – whether criteria is on individual or group level

  • email_flag – option whether to email results to recipients

  • hide_flag – option whether to display output results

  • style – current style of results div

Returns:

3-element tuple

  • (list): div result of result div

  • (list): div result of output div

  • (dict): updated style of output div