autojob.coordinator.gui package

GUI elements for the Coordinator GUI.

The GUI can be launched either programmatically:

from autojob.coordinator.gui import gui

gui.run()

or from the command line:

autojob coordinator

Submodules

autojob.coordinator.gui.groups module

Group tasks by structure and calculation and submission parameters.

This module defines classes used to group tasks by structure, calculation parameters, and submission parameters.

StructureGroup s are lists of structure filenames.

CalculationParameterGroup s map job.CalculationParameter s to values.

SubmissionParameterGroup s map structure filenames to dictionaries which map job.CalculationParameter s to values which define which calculations are to be included in the SubmissionParameterGroup.

class autojob.coordinator.gui.groups.CalculationParameterGroup(calculation_parameters: list[CalculationParameter])[source]

Bases: object

A collection of values of job.CalculationParameter s.

A CalculationParameterGroup maps a CalcuationParameter to a list of values of that CalculationParameter.

Example

>>> import math
>>> from autojob.coordinator.gui.groups import CalculationParameterGroup
>>> from autojob.coordinator.job import CalculationParameter
>>> parameter = CalculationParameter(
...     name="parameter",
...     explicit=False,
...     allowed_types=[int],
...     values=(-math.inf, math.inf, "()"),
...     default=1,
... )
>>> group = CalculationParameterGroup([parameter])

Initialize a CalculationParameterGroup.

Parameters:

calculation_parameters – A list of job.CalculationParameter s used to define the CalculationParameterGroup.

add_values(calculation_parameter: CalculationParameter, vals: Iterable) None[source]

Add values of parameter.

Parameters:
  • calculation_parameter – The calculation parameter to add.

  • vals – The values for the calculation parameter.

property defined_calculation_parameters: list[CalculationParameter]

The CalculationParameter s for which values are defined.

property defined_values: list[list[Any]]

The defined values of each CalculationParameter.

get_sets() list[dict[str, Any]][source]

Get all calculation parameter sets from a CalculationParameterGroup.

Parameters:

group_name – _description_

Returns:

A list of dictionaries mapping calculation parameter groups to values.

static initialize_values(calculation_parameters: list[CalculationParameter]) dict[CalculationParameter, list[Any]][source]

Initialize the values of a CalculationParameterGroup.

Parameters:

calculation_parameters – An iterable of job.CalculationParameter s for which from which to initialize the CalculationParameterGroup.

Returns:

A dictionary mapping parameters.CalculatorParameter s to a list of values defining the group.

remove_values(calculation_parameter: CalculationParameter, indices_to_remove: Iterable[int]) None[source]

Remove values from a calculation parameter set.

Parameters:
  • calculation_parameter – The calculation parameter from which a value will be removed.

  • indices_to_remove – The indices in the calculation parameter set to remove.

property values: dict[CalculationParameter, list[Any]]

A mapping from CalculationParameter s to its values.

class autojob.coordinator.gui.groups.StructureGroup[source]

Bases: object

A collection of structure filenames.

StructureGroup s indicate how to group calculations involving particular structures.

Initialize a StructureGroup.

add_structures(new_structures: Iterable[Path]) None[source]

Add and validate new structures to StructureGroup.

Parameters:

new_structures – An iterable of paths to add to the StructureGroup. Duplicates are removed.

remove_structures(indices_to_remove: Iterable[int]) None[source]

Remove structures from the StructureGroup.

Parameters:

indices_to_remove – The indices of structures to remove.

property structures: list[Path]

The filenames of structures in the StructureGroup.

static validate_structures(new_structures: Iterable[Path | str]) list[Path][source]

Check that each structure filename points to an existing file.

Parameters:

new_structures – An iterable of paths or filenames representing new structures.

Returns:

A list of paths corresponding to valid existing structure files.

validated_structures(new_structures: Iterable[Path | str]) list[Path][source]

Check that each structure filename points to an existing file.

Parameters:

new_structures – An iterable of paths or filenames representing new structures.

Returns:

A list of paths corresponding to valid existing structure files.

class autojob.coordinator.gui.groups.SubmissionParameterGroup[source]

Bases: object

A collection of values of submission parameters.

A SubmissionParameterGroup maps structure filenames to a mapping relating CalculationParameter s to a list of values of that CalculationParameter.

Example

>>> from autojob.coordinator.gui.groups import SubmissionParameterGroup
>>> group = SubmissionParameterGroup()

Initialize a SubmissionParameterGroup.

update(specs_to_add: dict[Path, dict[CalculationParameter, list[Any]]])[source]

Update the values of CalculationParameter s in the group.

Parameters:

specs_to_add – A dictionary of the same form as SubmissionParameterGroup.values() used to update the values in the SubmissionParameterGroup.

property values: dict[Path, dict[CalculationParameter, list[Any]]]

A mapping from structure names to a CalculationParameter mapping.

autojob.coordinator.gui.gui module

This module defines the logic for the main Coordinator GUI.

Importantly, this module defines the GUI class and run() function used to execute the Coordinator GUI.

Example:

>>> from autojob.coordinator.gui import gui
>>> gui.run()
class autojob.coordinator.gui.gui.CoordinatorTabs[source]

Bases: TypedDict

The Coordinator GUI tabs.

job_submission: JobSubmissionTab
parameter_selection: ParameterSelectionTab
structure_selection: StructureSelectionTab
study_configuration: StudyConfigurationTab
submission_configuration: SubmissionConfigurationTab
summary: SummaryTab
class autojob.coordinator.gui.gui.GUI(top_level: Tk, template: str | None, dest: Path | None = None)[source]

Bases: object

The main GUI for autojob.coordinator.

Variables:
  • parent – The top level widget for the GUI application.

  • coordinator – The Coordinator responsible for managing study group creation.

  • template – A string representing the path to the template of a previously created coordinator study group. Defaults to None.

  • notebook – A ttk.Notebook used to host the configuration tabs.

  • tabs – The tabs of the notebook.

Initialize the coordinator GUI.

Parameters:
  • top_level – The top-level tkinter.Tk instance.

  • template – The filename of a template with which to pre-populate the GUI.

  • dest – The root directory for study group creation. Defaults to the current working directory.

add_tabs_to_notebook() None[source]

Add each configuration tab to the notebook.

create_tabs() None[source]

Create ttk.Frame s for each configuration tab.

load(event: Event) None[source]

Load each tab in the GUI.

Parameters:

event – The event triggering the GUI to load.

organize() None[source]

Organize each configuration tab.

autojob.coordinator.gui.gui.configure_root(root: Tk) None[source]

Configure the root window.

Parameters:

root – The top-level tkinter.Tk instance.

autojob.coordinator.gui.gui.run(template: Path | None = None, dest: Path | None = None) None[source]

Run the main coordinator GUI.

Parameters:
  • template – The template file from which to recreate the study group. Defaults to None.

  • dest – The root directory for study group creation.

autojob.coordinator.gui.job_submission module

Configure scheduler parameters for SubmissionGroups.

class autojob.coordinator.gui.job_submission.AutoRestartPanel(parent: JobSubmissionTab)[source]

Bases: Labelframe

Specify auto-restart options.

Variables:
  • parent – The JobSubmissionTab in which the AutoRestartPanel resides.

  • frame1 – The tkinter.ttk.Frame containing the unlimited auto-restart prompt.

  • label1 – The tkinter.ttk.Label containing the prompt for unlimited auto-restart.

  • rbs – A list of Radiobutton s indicating the choice for unlimited auto-restart.

  • rb_var – An tkinter.IntVar indicating which selection the user has made. 0 if user has selected unlimited auto-restart, 1 otherwise.

  • frame2 – The tkinter.ttk.Frame for specifying the auto-restart limit.

  • label2 – The tkinter.ttk.Label containing the prompt for setting the auto-restart limit.

  • sb – A tkinter.Spinbox for specifying the auto-restart limit.

  • sb_var – An tkinter.IntVar storing the value of the auto-restart limit.

Initialize an AutoRestartPanel.

Parameters:

parent – The JobSubmissionTab in which the AutoRestartPanel resides.

create_auto_restart_limit() tuple[Frame, Label, IntVar][source]

Create restart limit elements.

create_unlimited_restart_prompt() tuple[Frame, Label, list[Radiobutton], IntVar][source]

Create the panel for selecting unlimited auto-restart.

Returns:

A tuple (frame, label, rbs, rb_var) where frame is the Frame containing the radio buttons, label contains the auto-restart text prompt, rbs is a list of Radiobutton s which set unlimited auto-restart, and rb_var is the IntVar indicating which radiobutton is selected.

display_autorestart_options() None[source]

Toggle display of restart limit selection.

load() None[source]

Display the stored auto-restart specification.

organize() None[source]

Pack frames.

update_limit() bool[source]

Update the stored restart limit. Returns True.

class autojob.coordinator.gui.job_submission.ExtrasPanel(parent: JobSubmissionTab)[source]

Bases: Labelframe

Specify additonal SLURM options.

Variables:
  • parent – The JobSubmissionTab in which the ExtrasPanel resides.

  • account – The tkinter.StringVar storing the value of the --account option.

  • mail_type – The tkinter.StringVar storing the value of the --mail-type option.

  • mail_user – The tkinter.StringVar storing the value of the --mail-user option.

Initialize a ExtrasPanel.

Parameters:

parent – The JobSubmissionTab in which the ExtrasPanel resides.

load() None[source]

Load the values of the displayed mail notification options.

class autojob.coordinator.gui.job_submission.GroupSelectionCombobox(parent: JobSubmissionTab)[source]

Bases: Combobox

Select a SubmissionGroup.

Variables:
  • parent – The JobSubmissionTab in which the GroupSelectionCombobox is embedded.

  • var – A tkinter.StringVar storing the name of the active SubmissionGroup.

Note

The .load() function of the parent frame is called during the validation function for the combobox.

Initialize a GroupSelectionCombobox.

Parameters:

parent – The JobSubmissionTab in which the GroupSelectionCombobox is embedded.

load() None[source]

Reload the displayed values of submission parameters.

class autojob.coordinator.gui.job_submission.JobSubmissionPanels[source]

Bases: TypedDict

The JobSubmissionTab panels.

ar_panel: AutoRestartPanel
mail_panel: ExtrasPanel
mem_panel: MemoryPanel
para_panel: ParallelizationPanel
part_panel: PartitionPanel
rt_panel: RunTimePanel
class autojob.coordinator.gui.job_submission.JobSubmissionParameters[source]

Bases: TypedDict

Job submission parameters.

account: int | None
cores: int
mail_type: str | None
mail_user: str | None
memory: tuple[float, Literal['GB', 'MB', 'KB']]
nodes: int
partitions: list[Partition]
restart_limit: int | None
run_time: RunTimeDict
class autojob.coordinator.gui.job_submission.JobSubmissionTab(main_app: Notebook)[source]

Bases: Frame

Specify submission parameters for a SubmissionGroup.

Variables:
  • parent – The tkinter.ttkNotebook in which the JobSubmissionTab resides.

  • app – The root coordinator.gui.GUI.

  • groub_cb – The GroupSelectionCombobox for selecting a group.

  • panels – A dictionary mapping panel names to the various frames used to set submission parameters.

Initialize the job submission tab.

Parameters:

main_app – The tkinter.ttkNotebook in which the JobSubmissionTab resides.

create_panels() None[source]

Create all panels.

initialize_submission_parameters() dict[str, JobSubmissionParameters][source]

Create the submission group dictionary.

Returns:

A dictionary mapping submission parameter group names to dictionaries of submission parameters.

load() None[source]

Reload the displayed parameters based on the stored values.

new_submission_parameters() JobSubmissionParameters[source]

Create a default set of submission parameters.

pack_panels() None[source]

Pack frames.

partition_enforcement() None[source]

Enforce partition capabilities.

remove_panels() None[source]

Remove all panels.

property submission_parameters: dict[str, JobSubmissionParameters]

The submission parameters of each submission parameter group.

update_panels() None[source]

Load each of the panels in the JobSubmissionTab.

update_parameters() None[source]

Update the stored submission parameters from the selected values.

class autojob.coordinator.gui.job_submission.MemoryPanel(parent)[source]

Bases: Labelframe

Specify a memory limit for jobs of the SubmissionGroup.

Variables:
  • parent – The JobSubmissionTab in which the MemoryPanel is embedded.

  • entry – The tkinter.Entry for specifying memory.

  • entry_var – The tkinter.StringVar storing the value of the specified memory.

  • units_rb_frame – The tkinter.ttk.Frame containing the units radiobuttons.

  • rbs – A list of tkinter.Radiobutton s, for selecting a memory units.

  • rb_var – A tkinter.IntVar storing the value of the selected memory unit.

  • shadow_var – A tkinter.IntVar storing the previous value of the selected memory unit.

Initialize a GroupSelectionCombobox.

Parameters:

parent – The JobSubmissionTab in which the GroupSelectionCombobox is embedded.

convert_mem() None[source]

Convert displayed units when unit changed.

create() tuple[Entry, StringVar][source]

Create a Entry and StringVar for the memory specifying entry.

create_rbs() tuple[Frame, list[Radiobutton], IntVar][source]

Create the memory unit selection GUI elements.

load() None[source]

Reload displayed memory and unit.

organize() None[source]

Pack GUI elements.

validate_memory() Callable[[str], bool][source]

Create a validator for the specified memory.

class autojob.coordinator.gui.job_submission.ParallelizationPanel(parent: JobSubmissionTab)[source]

Bases: Labelframe

Specify parallelization parameters for jobs of the SubmissionGroup.

Variables:
  • parent – The JobSubmissionTab in which the ParallelizationPanel is embedded.

  • frames – A list of tkinter.ttk.Frame s, containing GUI elements for node and core specificiations.

  • sbs – A list of tkinter.Spinbox es, for specifying nodes and cores.

  • vars – A list of tkinter.IntVar s, storing node and core specifications.

Initialize a ParallelizatioPanel.

Parameters:

parent – The JobSubmissionTab in which the ParallelizationPanel is embedded.

create() tuple[list[Frame], list[Spinbox], list[IntVar]][source]

Create Frame, Spinbox, and IntVar lists.

load() None[source]

Load displayed parameters from stored values.

organize() None[source]

Pack frames.

update_parallelization() None[source]

Update the parallelization parameters with the displayed values.

class autojob.coordinator.gui.job_submission.PartitionPanel(parent: JobSubmissionTab)[source]

Bases: Labelframe

Specify partitions for jobs of the SubmissionGroup.

Variables:
  • parent – The JobSubmissionTab in which the PartitionPanel is embedded.

  • partitions – The list of the selected partitions.

  • partition_cb – The tkinter.Combobox for selecting partitions to add.

  • button_frame – The tkinter.ttk.Frame containing buttons to add, clear and remove partitions.

  • listbox – The tkinter.Listbox for displaying the selected

  • yscroll – The tkinter.ttk.Scrollbar for manipulating the Listbox.

  • list_var – The tkinter.StringVar storing the contents of the Listbox.

Initialize a PartitionPanel.

Parameters:

parent – The JobSubmissionTab in which the PartitionPanel is embedded.

add_partitions() None[source]

Validates parameter values and adds new values.

Duplicates are removed and the entries in the Listbox are sorted.

clear_partitions() None[source]

Remove all partitions from the Listbox.

create_button_frame() Frame[source]

Creates and returns the button frame.

create_combobox() tuple[Combobox, StringVar][source]

Returns the selection Combobox and StringVar as a 2-tuple.

create_listbox() tuple[Listbox, StringVar][source]

Returns the Listbox and StringVar as a 2-tuple.

enforce_partition_limits() None[source]

Update partitions available for selection.

This method populates the list of partitions available for selection using the values of the submission parameters and the properties of the available partitions.

format_partitions(suitable_partitions: list[str]) None[source]

Format the selected partitions based on request suitability.

Suitable partitions are formatted in white text. Unsuitable partitions are formatted in red text.

Parameters:

suitable_partitions – The list of partitions that are suitable given the present resource request.

load() None[source]

Load the displayed partitions based on the SubmissionGroup.

load_partitions() list[Partition][source]

Returns the list of partitions from which to select.

organize() None[source]

Pack frames.

remove_partitions() None[source]

Removes selected partitions.

class autojob.coordinator.gui.job_submission.RunTimeDict[source]

Bases: TypedDict

Dictionary representing a time.

days: int
hours: int
minutes: int
class autojob.coordinator.gui.job_submission.RunTimePanel(parent: JobSubmissionTab, time_limit: int = 10080)[source]

Bases: Labelframe

Specify a time limit for jobs of the SubmissionGroup.

Variables:
  • parent – The JobSubmissionTab in which the RunTimePanel is embedded.

  • max_time_limit – The maximum time that can be specified. This will be used as a limit for the combo box.

  • frames – A list of tkinter.ttk.Frame s, containing GUI elements for day, hour, and minute specifications.

  • sbs – A list of tkinter.Spinbox es, for specifying days, hours, and minutes.

  • vars – A list of tkinter.StringVar s, storing day, hour, and minute specifications.

Initialize the RunTimePanel.

Parameters:
  • parent – The JobSubmissionTab in which the GroupSelectionCombobox is embedded.

  • time_limit – The maximum time that can be specified. This will be used as a limit for the combo box.

create() tuple[list[Frame], list[Spinbox], list[StringVar]][source]

Create Frame, Spinbox, and IntVar lists.

enforce_time_limit() None[source]

Validate run time specification subject to time limit.

load() None[source]

Reload displayed day, hour, and minute specificiations.

organize() None[source]

Pack frames.

autojob.coordinator.gui.parameter_selection module

Specify calculator parameters.

class autojob.coordinator.gui.parameter_selection.GroupSelectionCombobox(parent: ParameterSelectionTab)[source]

Bases: Combobox

Select a CalculatorParameterGroup.

Variables:
  • parent – The ParameterSelectionTab in which the GroupSelectionCombobox is embedded.

  • var – A tkinter.StringVar storing the name of the active CalculatorParameterGroup.

Note

The .load() function of the parent frame is called during the

validation function for the combobox.

Initialize a GroupSelectionCombobox.

Parameters:

parent – The parent ParameterSelectionTab in which the combobox resides.

load() None[source]

Populate the list of calculator parameters to display.

class autojob.coordinator.gui.parameter_selection.ParameterInputFrame(parent: ParameterInputSection, text: str)[source]

Bases: Frame

A frame containing the input widget for parameter specification.

Variables:
  • parent – The ParameterInputSection in which the ParameterInputFrame is embedded.

  • text – Descriptive text for the parameter.

  • finite_int_range – Whether the ParameterInputFrame is used to specify the value restricted to a finite range of integers.

  • label – The tkinter.ttk.Label for the ParameterInputFrame.

  • widg – The Tkinter widget used to input the value of the paramter.

  • var – A tkinter.StringVar storing the value of the parameter.

Initialize a ParameterInputFrame.

Parameters:
  • parent – The ParameterInputSection in which the

  • ``ParameterInputFrame`` is embedded.

  • text – Descriptive text for the parameter.

create_combobox() tuple[Combobox, StringVar][source]

Create a Combobox to select parameter values.

Returns a 2-tuple (cb, var) where cb is the Combobox and var is the associated StringVar.

create_entry() tuple[Entry, StringVar][source]

Create an Entry for specifying parameter values.

Returns a 2-tuple (entry, var) where entry is the Entry and var is the associated StringVar.

create_label() Label[source]

Create the label displaying the parameter help text.

create_spinbox() tuple[Spinbox, StringVar][source]

Create an Spinbox for specifying parameter values.

Returns a 2-tuple (sb, var) where sb is the Spinbox and var is the associated StringVar.

create_widg() tuple[Combobox | Entry | Spinbox, StringVar][source]

Create the widget used to input the parameter value.

class autojob.coordinator.gui.parameter_selection.ParameterInputSection(parent: ParameterPanel)[source]

Bases: Frame

A container frame for ParameterInputFrame s.

Variables:
  • parent – The ParameterPanel in which the ParameterInputSection is embedded.

  • input_frames – The ParameterInputFrame s for speciying parameter values.

Initialize a ParameterInputSection.

Parameters:
  • parent – The ParameterPanel in which the

  • ``ParameterInputSection`` is embedded.

create_input_frames() list[ParameterInputFrame][source]

Create the input frames for specifying parameter values.

The input frames created depends on the type of parameter.

frame_titles() list[str][source]

Determine the frame titles based on the parameter type.

Returns:

A list of strings representing frame titles.

”select”: present unless the parameter has no special values and

the only title present if the parameter is set by explicit values.

Possibilities: “select” only, all but “select”, all

place_input_sections() None[source]

Place the created ParameterInputSection s.

class autojob.coordinator.gui.parameter_selection.ParameterPanel(parent: ParameterSelectionTab, param: CalculationParameter)[source]

Bases: Labelframe

A Frame containing GUI elements for defining parameter values.

Variables:
  • parent – The ParameterSelectionTab to which this panel belongs.

  • param – The parameter whose parametrization is represented by the panel.

  • rbf – The ParameterRadiobuttonFrame used select the input method.

  • input_section – The LabelFrame used to enable entering parametrization values.

  • lbf – The ListboxFrame used to display the parameter values.

  • button_frame – The Frame in which the add/clear/delete buttons reside.

  • default_button – The Button used to reset the parameter value to its default value.

  • check_var – The variable storing the state of default_button.

Initialize a ParameterPanel.

Parameters:
  • parent – The ParameterSelectionTab in which the

  • ``ParameterInputSection`` is embedded.

  • param – The calculation parameter corresponding to the ParameterPanel.

add_parameter_values() None[source]

Validates parameter values and adds new values.

Duplicates are removed and the entries in the tkinter.Listbox are sorted.

clear_parameter_values() None[source]

Remove all parameter values.

configure_rbs() None[source]

Activate/deactivate Radiobutton s based on valid entry methods.

create_button_frame() Frame[source]

Create the frame in which the add/clear/delete buttons reside.

create_default_button() tuple[Checkbutton, IntVar][source]

Create the ‘Use default value’ Checkbutton and IntVar.

load() None[source]

Load the displayed parameter values.

organize() None[source]

Grid GUI elements.

remove_parameter_values() None[source]

Remove selected parameter values.

set_parameter_entry_method() None[source]

Determines the flags for each widget and calls self.set_states.

Raises:
  • ValueError – If string corresponding to active Radiobutton is

  • unexpected.

set_states(flags: list[int]) None[source]

Sets the states of the parameter entry widgets.

Parameters:
  • flags – The indices correspond to the widgets as

  • follows – 0: Widget with label “select” 1: Widget with label “enter” 2: Widget with label “start” 3: Widget with label “stop” 4: Widget with label “steps”

use_default() None[source]

Use the default value for the parameter.

class autojob.coordinator.gui.parameter_selection.ParameterRadiobuttonFrame(parent: ParameterSelectionTab)[source]

Bases: Labelframe

Select the parameter entry method.

Variables:
  • parent – The ParameterSelectionTab in which the ParameterRadiobuttonFrame is embedded.

  • rb_var

  • rbs

  • str_vars

Initialize a ParameterRadiobuttonFrame.

Parameters:

parent – The ParameterSelectionTab in which the ParameterRadiobuttonFrame is embedded.

create_radio_buttons() tuple[IntVar, list[Radiobutton], list[StringVar]][source]

Create the input method Radiobutton s.

Returns:

A 3-tuple (rb_var, rbs, str_vars) where rb_var is the tkinter.IntVar indicating which input method Radiobutton is selected, rbs is a list of the input method Radiobutton s, and str_vars is a list of the tkinter.StringVar s associated with the labels of each Radiobutton.

place_radio_buttons() None[source]

Grid the Radiobutton s.

class autojob.coordinator.gui.parameter_selection.ParameterSelectionCombobox(parent: ParameterSelectionTab)[source]

Bases: Combobox

A Combobox to slect a parameter whose values to display.

Parameters:
  • parent – The ParameterSelectionTab to which this Combobox belongs.

  • var – A tkinter.StringVar which stores the name of the parameter whose values are being displayed.

Initialize an ParameterSelectionCombobox.

Parameters:

parent – The ParameterSelectionTab to which this Combobox belongs.

change_parameter_panel() bool[source]

Display a new ParameterPanel for the parameter. Returns True.

load() None[source]

Populate the Combobox with parameter names.

class autojob.coordinator.gui.parameter_selection.ParameterSelectionTab(main_app: gui.GUI)[source]

Bases: Frame

A GUI element for defining parameter values.

Variables:
  • parent – The tkinter.ttk.Notebook in which the ParameterSelectionTab resides.

  • app – The running gui.GUI instance.

  • group_selection_cb – The GroupSelectionCombobox for selecting the active calculation parameter group.

  • param_panels – The ParameterPanel s for each calculation parameter.

  • panel_to_display – The ParameterPanel to display.

  • param_selection_cb – The tkinter.Combobox used to select the active parameter.

Initialize a ParameterSelectionTab.

Parameters:

main_app – The running gui.GUI instance.

property calc_params: dict[str, CalculationParameterGroup]

A map from parameter group names to the parameter group.

create_param_panels() list[ParameterPanel][source]

The ParameterPanel s of the ParameterSelectionTab.

load() None[source]

Load the GUI elements.

load_calc_params() dict[str, CalculationParameterGroup][source]

Updates or creates calculation parameters.

Returns:

A dictionary mapping the names of groups.CalculationParameterGroup s to the groups themselves.

load_panels() None[source]

Load the parameter panels.

load_parameter_list() list[CalculationParameter][source]

Return the parameter list based on the selected calculator.

organize() None[source]

Pack the GUI elements.

property params: list[CalculationParameter]

Return the calculation parameters.

autojob.coordinator.gui.structure_selection module

Select structures for structure groups.

class autojob.coordinator.gui.structure_selection.GroupButtonFrame(parent: StructureSelectionPanel)[source]

Bases: Frame

Define StructureGroups.

Variables:
  • parent – The StructureSelectionPanel in which the GroupButtonFrame resides.

  • create_group_entry – The tkinter.ttk.Entry for entering structure group names.

  • create_group_button – The tkinter.ttk.Entry for creating structure groups.

  • entry_var – The tkinter.StringVar storing the name of the structure group to create.

  • del_group_cb – The tkinter.Combobox for selecting which structure group to delete.

  • del_group_button – The tkinter.ttk.Entry for deleting structure groups.

  • cb_var1 – The tkinter.StringVar storing the name of the structure group to delete.

  • groups_cb – The tkinter.Combobox for selecting which structure group structures are to be added to.

  • add_to_group_button – The tkinter.ttk.Button for adding selected structures to structure groups.

  • cb_var2 – The tkinter.StringVar storing the name of the structure group to which selected structures will be added.

Initialize a StructureSelectionFrame.

Parameters:
add_structures_to_group() None[source]

Add selected structures to the selected structure group.

create_add_to_group() tuple[Combobox, Button, StringVar][source]

Create the GUI elements for updating structure groups.

create_create_group() tuple[Entry, Button, StringVar][source]

Create the GUI elements for creating structure groups.

create_del_group() tuple[Combobox, Button, StringVar][source]

Create the GUI elements for deleting structure groups.

create_group() None[source]

Create a structure group.

del_group() None[source]

Delete a structure group.

load() None[source]

Update the structures in each structure group.

organize() None[source]

Grid widgets.

reset_cbs() None[source]

Reset the values displayed by the Combobox es.

property structure_groups: dict[str, StructureGroup]

A mapping from structure group names to structure filenames.

class autojob.coordinator.gui.structure_selection.GroupViewFrame(parent)[source]

Bases: Frame

View the structures in each structure group.

Variables:
  • parent – The StructureSelectionPanel in which the GroupViewFrame resides.

  • lbf – The widgets.ListboxFrame listing structure filenames.

  • button_frame – A tkinter.ttk.Frame containing “remove” and “clear” buttons.

Initialize a GroupViewFrame.

Parameters:
clear_structures_from_group() None[source]

Remove all structures from the selected structure group.

create_button_frame() Frame[source]

Create “remove” and “clear” buttons.

load() None[source]

Reload the displayed structures in the selected structure group.

organize() None[source]

Pack frames.

remove_structures_from_group() None[source]

Remove selected structures from the selected structure group.

class autojob.coordinator.gui.structure_selection.StructureSelectionFrame(parent: StructureSelectionPanel)[source]

Bases: Frame

Select structures to use.

Variables:
  • parent – The StructureSelectionPanel in which the StructureSelectionFrame resides.

  • lbf – The widgets.ListboxFrame listing structure filenames.

  • button_frame – A tkinter.ttk.Frame containing “add”, “remove”, and “clear” buttons.

Initialize a StructureSelectionFrame.

Parameters:
add_structures() None[source]

Add structure filenames from a file dialog.

clear_structures() None[source]

Remove all structures from the Listbox.

create_button_frame() Frame[source]

Create “add”, “remove”, and “clear” buttons.

load() None[source]

Reload the structures displayed in the Listbox.

organize() None[source]

Pack frames.

remove_structures() None[source]

Remove selected structures from the Listbox.

property structures: list[str]

The list of structure filenames.

class autojob.coordinator.gui.structure_selection.StructureSelectionPanel(parent: StructureSelectionTab)[source]

Bases: Labelframe

A LabelFrame for selecting structures and creating structure groups.

Variables:
  • parent – The StructureSelectionTab in which the StructureSelectionPanel resides.

  • structure_selection_frame – The frame for selecting structures.

  • group_button_frame – The frame for creating and deleting structure groups.

  • group_view_frame – The frame for displaying the structures of the selected group.

Initialize a StructureSelectionPanel.

Parameters:
load() None[source]

Load frames.

organize() None[source]

Pack frames.

class autojob.coordinator.gui.structure_selection.StructureSelectionTab(main_app: gui.GUI)[source]

Bases: Frame

A tab for selecting structures and creating structure groups.

Variables:

Initialize a StructureSelectionTab.

Parameters:

main_app – The running gui.GUI instance.

load() None[source]

Load panel.

organize() None[source]

Pack panel.

autojob.coordinator.gui.study_configuration module

This module defines the GUI logic for study configuration.

Specifically, the module provides the StudyConfigurationTab which is the parent Frame for study configuration and the StudyPanel, CalculationPanel, and CalculatorPanel classes which permit selection of study, calculation, and calculator types, respectively.

class autojob.coordinator.gui.study_configuration.CalculationPanel(parent: Frame, columns: int)[source]

Bases: RadiobuttonPanel

A RadiobuttonPanel for selecting calculation type.

Initialize a CalculationPanel.

Parameters:
  • parent – The tkinter.ttk.Frame in which the CalculationPanel will reside.

  • columns – The number of columns to use to display study types.

class autojob.coordinator.gui.study_configuration.CalculatorPanel(parent: Frame, columns: int)[source]

Bases: RadiobuttonPanel

A RadiobuttonPanel for selecting calculator type.

Initialize a CalculatorPanel.

Parameters:
  • parent – The tkinter.ttk.Frame in which the CalculatorPanel will reside.

  • columns – The number of columns to use to display study types.

class autojob.coordinator.gui.study_configuration.StudyConfigurationTab(main_app: gui.GUI)[source]

Bases: Frame

A tkinter.ttk.Frame from configuring studies.

Variables:
  • parent – A ttk.Notebook in which the StudyConfigurationTab will reside.

  • app – The GUI instance for the GUI application.

  • study_panel – The RadiobuttonPanel for selecting the study type to use for the study group.

  • calculation_panel – The RadiobuttonPanel for selecting the calculation type to use for the study group.

  • calculator_panel – The RadiobuttonPanel for selecting the calculator to use for the study group.

Initialize a StudyConfigurationTab.

Parameters:

main_app – The GUI instance for the GUI application.

load() None[source]

Do nothing.

class autojob.coordinator.gui.study_configuration.StudyPanel(parent: Frame, columns: int)[source]

Bases: RadiobuttonPanel

A RadiobuttonPanel for selecting study type.

Initialize a StudyPanel.

Parameters:
  • parent – The tkinter.ttk.Frame in which the StudyPanel will reside.

  • columns – The number of columns to use to display study types.

autojob.coordinator.gui.submission_configuration module

GUI elements for the submission configuration panel.

Descriptions of exported classes:

  • GroupButtonFrame: a ttk.Frame subclass containing a button which handles the logic of creating submission parameter groups.

  • GroupSummary: tkinter.TopLevel subclass used to display a summary for a submission parameter group.

  • SelectionPanel: ttk.LabelFrame subclass used as base class for submission configuration panels (i.e., StructureSelectionPanel, ValueSelectionPanel).

  • SelectionFrame: ttk.Frame subclass used to display values to be selected.

  • SpecButton: ttk.Button subclass that adds selected values from SelectionFrame to ViewFrame.

  • ViewFrame: ttk.Frame subclass used to display selected values.

  • ButtonFrame: ttk.Frame subclass for adding and removing values from ViewFrame.

  • ParameterSelectionCombobox: ttk.Combobox subclass for adding specifications to submission parameter groups.

  • StructureSelectionPanel: SelectionPanel subclass for selecting structures for submission parameter group.

  • ValueSelectionPanel: SelectionPanel subclass for selecting parameter values for submission parameter group.

  • AddToGroupFrame: ttk.Frame subclass for adding new specifications to submission parameter groups.

  • SubmissionConfigurationTab: ttk.Frame subclass for configuring submission parameters.

class autojob.coordinator.gui.submission_configuration.AddToGroupFrame(parent: Any)[source]

Bases: Frame

A container ttk.Frame for adding the current spec to a SubmissionGroup.

Variables:
  • parent – The SubmissionConfigurationTab.

  • combo_box – The ttk.Combobox for selecting the SubmissionGroup.

  • button – The ttk.Button used to add the current spec to the group.

  • var – A tkinter.StringVar referencing the SubmissionGroup to which the spec will be added.

Initialize an AddToGroupFrame.

Parameters:

parent – The SubmissionConfigurationTab.

add_specs_to_group() None[source]

Add current spec to SubmissionGroup or update existing group.

This method uses the current spec to find all CalculatorParameterGroup instances that satisfy the spec (structure and values of calculator parameters) and add them to the SubmissionGroup.

create_add_group() tuple[Combobox, Button, StringVar][source]

Create the widgets for adding the current spec to a SubmissionGroup.

Returns:

A 3-tuple (combo_box, button, var). combo_box is a ttk.Combobox used to select the SubmissionGroup to which the spec will be added. button is the ttk.Button used to add the current spec to a SubmissionGroup. var is the tkinter.StringVar referencing the SubmissionGroup to which the current spec will be added.

load() None[source]

Update AddToGroupFrame.combo_box values.

organize() None[source]

Pack Combbox and Button.

class autojob.coordinator.gui.submission_configuration.ButtonFrame(parent: SelectionPanel)[source]

Bases: Frame

A ttk.Frame containing ttk.Button s for editing specs.

Parameters:
  • parent – The SelectionPanel containing the ButtonFrame.

  • listbox – The :class:tkinter.Listbox containing the values for the spec. This is None if the parent SelectionFrame has a widgets.TreeviewFrame.

  • treeview – The ttk.Treeview containing the values for the spec. This is No`ne if the parent SelectionFrame has a widgets.ListboxFrame.

  • buttons – A list of ttk.Button s. The first element is the “remove” button. The second element is the “clear” button.

Initialize a ButtonFrame.

Parameters:

parent – The SelectionPanel containing the ButtonFrame.

clear_items() None[source]

Remove all items from the Listbox/Treeview.

create_buttons() list[Button][source]

Create the “remove” and “clear” buttons.

Returns:

A list of ttk.Button s. The first element is the “remove” button. The second element is the “clear” button.

remove_items() None[source]

Remove items from the Listbox/Treeview.

class autojob.coordinator.gui.submission_configuration.GroupButtonFrame(parent: SubmissionConfigurationTab)[source]

Bases: Frame

A container frame for ttk.GroupButton s.

Variables:
  • parent – The SubmissionConfigurationTab in which the GroupButtonFrame resides.

  • create_group_entry – The ttk.Entry widget used to enter the group name.

  • create_group_button – The ttk.Button widget used to enter the group name.

  • entry_var – The tkinter.StringVar storing the group name.

  • del_group_cb – The ttk.Combobox used to select a group to delete.

  • del_group_button – The ttk.Button used to delete a group.

  • cb_var – The tkinter.StringVar referencing the group to delete.

  • view_group_button – The ttk.Button used to view all submission groups that have been created.

  • group_summary – A GroupSummary object used to view the groups that have been created.

Initialize a GroupButtonFrame.

Parameters:
create_create_group() tuple[Entry, Button, StringVar][source]

Create the widgets for creating submission parameter groups.

Returns:

A 3-tuple (entry, button, var). entry is the ttk.Entry widget in which one specifies the name of a new submission parameter group. button is a ttk.Button used to finalize submission parameter group creation. var is the tkinter.StringVar associated with entry.

create_del_group() tuple[Combobox, Button, StringVar][source]

Creates a group of widgets for deleting submission parameter groups.

Returns:

A 3-tuple (combo_box, button, var). combo_box is a ttk.Combobox used to select a submission parameter group to delete. button is a ttk.Button that when pressed, deletes a group. var is a tkinter.StringVar containing the name of the selected group.

create_group() None[source]

Create a submission parameter group.

The text in GroupButtonFrame.create_group_entry() is coloured red if a submission parameter group with the same name already exists.

create_view_group() tuple[Frame, Button][source]

Create a group of widgets for viewing submission parameter groups.

Returns:

A tuple (placeholder, button). placeholder is an empty ttk.Frame used for alignment. button is a ttk.Button used to view existing submission parameter groups.

del_group() None[source]

Delete a submission parameter group.

load() None[source]

Load the widgets in GroupButtonFrame with updated data.

organize() None[source]

Organize ttk.Entries and ttk.Buttons in 2x3 grid.

property submission_parameter_groups: dict[str, SubmissionParameterGroup]

A map from group names to submission parameter groups.

update_groups(group: str, new_group: dict[str, dict[str, list[str]]]) None[source]

Update the selected group with the new spec.

Parameters:
  • group – The name of the active submission parameter group.

  • new_group – A dictionary mapping structures to mappings from calculation parameter names to values.

view_groups() None[source]

View created submission parameter groups in a new window.

class autojob.coordinator.gui.submission_configuration.GroupSummary(controller: GroupButtonFrame)[source]

Bases: Toplevel

View a summary of all created submission parameter groups.

Variables:

Initialize a GroupSummary.

Parameters:
  • controller – The GroupButtonFrame responsible for launching

  • the `GroupSumma`ry`.

load() None[source]

Reload the displayed submission parameter groups.

on_close() None[source]

Delete GroupSummary.

populate() None[source]

Populate GroupSummary.tbf with each submission parameter group.

class autojob.coordinator.gui.submission_configuration.SelectionFrame(parent: StructureSelectionPanel, select_from: str)[source]

Bases: Frame

Create task filters.

Variables:
  • parent – The StructureSelectionPanel in which structures in the filter are selected.

  • select_from – A string indicating from where the values within the frame are to be populated. If "values", then the values are obtained from calculation parameter groups. If "structure", then the values are obtained from the structures.

  • tbf – A TreeviewFrame containing the values if SelectionFrame.select_from = "values", else None.

  • lbf – A ListboxFrame containing the values if SelectionFrame.select_from = "structure", else None.

Initialize a SelectionFrame.

Parameters:
  • parent – The StructureSelectionPanel in which structures in

  • the filter are selected.

  • select_from – A string indicating from where the values within the frame are to be populated. If "values", then the values are obtained from calculation parameter groups. If "structure", then the values are obtained from the structures.

property items: list[str] | dict[str, list[str]]

Displayed items (SelectionFrame.lbf or SelectionFrame.lbf).

Raises:

AttributeError – Invalid value of SelectionFrame.select_from.

Returns:

A list of strings representing structure paths (if SelectionFrame.select_from == "structures") or a dictionary mapping parameter names to their values (if SelectionFrame.select_from == "values")

load() None[source]

Reload displayed contents of Listbox or Treeview.

organize() None[source]

Pack ListboxFrame or TreeviewFrame.

property structures: list[str]

Returns the structures for which parameters have been specified.

Returns:

A list of strings representing the structures for which parameters have been specified.

property values: dict[str, list[str]]

A map from calculation parameter names to a list of their values.

class autojob.coordinator.gui.submission_configuration.SelectionPanel(parent: Any, text: str)[source]

Bases: Labelframe

Select and view items.

Variables:
  • parent – The SubmissionConfigurationTab to which the SelectionPanel belongs.

  • selection_frame – A SelectionFrame from which users select items.

  • view_frame – A ViewFrame displaying selected items.

  • button_frame – A ttk.Frame with ttk.Button s for item removing and clearing.

  • spec_button – A ttk.Button controlling spec addition.

Initialize a SelectionPanel.

Parameters:
  • parent – The SubmissionConfigurationTab to which the

  • :class:`SelectionPanel` belongs.

  • text – The text used to indicate what is being selected.

load() None[source]

Load the selection and view frames.

organize() None[source]

Organize buttons and frames into 1x4 grid.

class autojob.coordinator.gui.submission_configuration.SpecButton(parent: SelectionPanel)[source]

Bases: Button

ttk.Button that adds a spec.

Parameters:

Initialize SpecButton.

Parameters:

parent – The parent SelectionPanel.

add_children(top_level_item: str, children: list[str]) None[source]

Adds the contents of children items to a ttk.Treeview item.

Parameters:
  • top_level_item – The iid of the item under which the children will be added.

  • children – A list of iids corresponding to items whose values are to be added under top_level_item.

add_from_listbox() None[source]

Add spec items from a ttk.Listbox.

add_from_treeview() None[source]

Add spec items from a ttk.Treeview.

add_spec() None[source]

Add the current parameter specification to the group.

get_iid_in_dest(parent_text) str[source]

Get the iid of an item in the destination ttk.Treeview.

Parameters:

parent_text – A string representing the text of the item in the destination.

Returns:

The iid of the item in the destination ttk.Treeview.

class autojob.coordinator.gui.submission_configuration.StructureSelectionPanel(parent: SubmissionConfigurationTab)[source]

Bases: SelectionPanel

A SelectionPanel for creating specs by selecting structures.

Initialize a StructureSelectionPanel.

Parameters:
class autojob.coordinator.gui.submission_configuration.SubmissionConfigurationTab(main_app: gui.GUI)[source]

Bases: Frame

A ttk.Frame for configuring SubmissionGroups.

Variables:
  • parent – The ttk.Notebook to which the SubmissionConfigurationTab belongs.

  • app – The gui.GUI controlling the GUI.

  • button_frame – The GroupButtonFrame used to create, delete, and view SubmissionGroups.

  • panels – A list of SelectionPanel s used to create GroupFilter s.

  • add_to_group_frame – A AddToGroupFrame used to add a GroupFilter to a SubmissionGroup.

Initialize a SubmissionConfigurationTab.

Parameters:

main_app – The gui.GUI controlling the GUI.

create_panels() list[SelectionPanel][source]

Returns a list containing structure and value selection panels.

load() None[source]

Reload frames.

organize() None[source]

Pack frames.

class autojob.coordinator.gui.submission_configuration.ValueSelectionPanel(parent)[source]

Bases: SelectionPanel

A SelectionPanel for creating specs by selecting values.

Initialize a ValueSelectionPanel.

Parameters:
class autojob.coordinator.gui.submission_configuration.ViewFrame(parent: Any)[source]

Bases: Frame

A container ttk.Frame for viewing the values defining the spec.

Variables:

Initialize a ViewFrame.

Parameters:

parent – The SelectionPanel in which the ViewFrame resides.

load() None[source]

Update the ViewFrame to reflect changes to the allowed values.

This method updates the ViewFrame, removing those items that are no longer allowed due to updates to the items from which the spec was created.

organize() None[source]

Pack frames.

autojob.coordinator.gui.summary module

GUI elements for displaying study group summaries.

class autojob.coordinator.gui.summary.CalculationSummaryFrame(parent: Frame, app: GUI)[source]

Bases: SummaryFrame

Summarize the calculation type.

Initialize a CalculationSummaryFrame.

Parameters:
  • parent – The SummaryTab in which the CalculationSummaryFrame resides.

  • app – The running gui.GUI.

class autojob.coordinator.gui.summary.CalculatorSummaryFrame(parent: Frame, app: GUI)[source]

Bases: SummaryFrame

Summarize the calculator type.

Initialize a CalculatorSummaryFrame.

Parameters:
  • parent – The SummaryTab in which the CalculatorSummaryFrame resides.

  • app – The running gui.GUI.

class autojob.coordinator.gui.summary.CreateJobsFrame(parent: SummaryTab)[source]

Bases: Labelframe

Frame containing job creation button and compute canada format prompt.

Variables:
  • parent – The SummaryTab in which the frame resides.

  • var – An tkinter.IntVar indicating whether the user has opted for the jobs to be created in compute canada format.

  • checkb – A Checkbutton to select the job format.

  • button – A Button to initiate job creation.

Initialize a CreateJobsFrame.

Parameters:

parent – The SummaryTab in which the frame resides.

load() None[source]

Do nothing.

class autojob.coordinator.gui.summary.JobSummaryFrame(parent: SummaryTab)[source]

Bases: Labelframe

Summarize the jobs to be created.

Variables:
  • parent – The SummaryTab in which the JobSummaryFrame resides.

  • tbf – A widgets.TreeviewFrame describing the to-be-created jobs.

  • jobs – A dictionary mapping structures to calculation and submission parameter dictionaries. Each nested dictionary maps parameters to lists of values.

Initialize a JobSummaryFrame.

Parameters:
  • parent – The SummaryTab in which the JobSummaryFrame

  • resides.

add_calc_params(calc_params: dict[CalculationParameter, str], job_iid: str) None[source]

Add the calculation parameter values to the Treeview.

add_subm_params(subm_params: dict, job_iid: str) None[source]

Add the submission parameter values to the Treeview.

load() None[source]

Reload the displayed jobs in the Treeview.

populate() None[source]

Populate Treeview with calc/submission parameter values.

class autojob.coordinator.gui.summary.StudySummaryFrame(parent: Frame, app: GUI)[source]

Bases: SummaryFrame

Summarize the study type.

Initialize a StudySummaryFrame.

Parameters:
  • parent – The SummaryTab in which the StudySummaryFrame resides.

  • app – The running gui.GUI.

class autojob.coordinator.gui.summary.SummaryFrame(parent: SummaryTab, app: GUI, title: str)[source]

Bases: Labelframe

A Frame summarizing to-be-created jobs.

Variables:
  • parent – The SummaryTab in which the SummaryFrame resides.

  • study_configuration_tab – The StudyConfigurationTab.

  • label – The tkinter.ttk.Label for Frame.

Initialize a SummaryFrame.

Parameters:
  • parent – The SummaryTab in which the SummaryFrame resides.

  • app – The running gui.GUI.

  • title – The title for the SummaryFrame.

load() None[source]

Load the text for the label.

organize() None[source]

Pack the label.

class autojob.coordinator.gui.summary.SummaryFrames[source]

Bases: TypedDict

The subframes of a SummaryTab.

calculation_summary: CalculationSummaryFrame
calculator_summary: CalculatorSummaryFrame
completion: CreateJobsFrame
job_summary: JobSummaryFrame
study_summary: StudySummaryFrame
warnings: WarningsFrame
class autojob.coordinator.gui.summary.SummaryTab(main_app: GUI)[source]

Bases: Frame

A GUI element summarizing study group parameters.

Variables:
  • parent – The tkinter.ttk.Notebook in which the SummaryTab resides.

  • app – The running gui.GUI

  • container – The container frame for placing subframes.

  • summaries – A SummaryFrames typed dictionary containing the subframes of the SummaryTab.

Initialize a SummaryTab.

Parameters:

main_app – The running gui.GUI.

create() SummaryFrames[source]

Creates the subframes of the SummaryTab.

load() None[source]

Load frames.

organize() None[source]

Pack frames.

class autojob.coordinator.gui.summary.WarningsFrame(parent: SummaryTab)[source]

Bases: Labelframe

View automatically generated warnings.

Variables:

warnings – A list of tkinter.ttk.Label s containing warnings.

Initialize a WarningsFrame.

Parameters:

parent – The SummaryTab in which the JobSummaryFrame resides.

load() None[source]

Reload the displayed warnings.

new_parameter_warning() None[source]

Create a parameter warning.

new_structure_warning() None[source]

Create a structure warning.

autojob.coordinator.gui.widgets module

This module defines various specialized ttk.Frame s for convenience.

The RadiobuttonPanel class defines a :class`.ttk.LabelFrame` containing ttk.Radiobutton s.

The ListboxFrame class defines a ttk.Frame containing a tkinter.Listbox.

The TreeviewFrame class defines a ttk.Frame containing a ttk.Treeview.

class autojob.coordinator.gui.widgets.ListboxFrame(parent: Frame, *, x_stretch: bool = False)[source]

Bases: Frame

A ttk.Frame preconfigured with a tkinter.Listbox.

Variables:
  • parent – The ttk.Frame in which the ListboxFrame will reside.

  • x_stretch – Whether or not the ListboxFrame will expand horizontally to fill the frame.

  • listbox – The tkinter.Listbox within the ListboxFrame.

  • yscroll – The tkinter.ttk.Scrollbar controlling y-scrolling.

  • xscroll – The tkinter.ttk.Scrollbar controlling x-scrolling.

Initialize a ListboxFrame.

Parameters:
  • parent – The ttk.Frame in which the ListboxFrame will reside.

  • x_stretch – Whether or not the ListboxFrame will expand horizontally to fill the frame.. Defaults to False.

clear_listbox() None[source]

Clear the Listbox.

create_listbox() Listbox[source]

Creates a Listbox.

create_xscrollbar() Scrollbar[source]

Creates an x-Scrollbar.

create_yscrollbar() Scrollbar[source]

Creates a y-Scrollbar.

property items: tuple[float | int | str | None]

Return the elements of the Listbox as a list.

organize() None[source]

Organize the ListboxFrame elements.

class autojob.coordinator.gui.widgets.RadiobuttonPanel(parent: Frame, title: str, implementable_enum: ImplementableEnum, columns: int)[source]

Bases: Labelframe

A LabelFrame containing Radiobutton s.

This GUI element is designed to allow for the selection of a Radiobutton corresponding to an ImplementableEnum.

Variables:
  • parent – The Frame in which the RadiobuttonPanel resides.

  • frame – The Frame in which the ttk.Radiobutton s will reside.

  • implementable_enum – An ImplementableEnum.

  • columns – The number of columns used to display to selection options.

  • rb_var – A tkinter.IntVar recording the selected Radiobutton.

  • rbs – A dictionary mappping ImplementableEnum s to their representative Radiobutton s.

Initialize a RadiobuttonPanel.

Parameters:
  • parent – The Frame in which the RadiobuttonPanel resides.

  • title – The title for the RadiobuttonPanel.

  • implementable_enum – The classification.ImplementableEnum that will be enumerated by the Radiobutton s.

  • columns – The number of columns to be used to display the Radiobutton s.

creation() dict[ImplementableEnum, Radiobutton][source]

Create ttk.Radiobutton s for each ImplementableEnum.

Returns:

A dictionary mappping ImplementableEnum s to their representative Radiobutton s.

placement() None[source]

Organize RadiobuttonPanel ttk.Radiobutton s.

set_states() None[source]

Set states of ttk.Radiobutton s based on implementation.

class autojob.coordinator.gui.widgets.TreeviewFrame(parent: Frame)[source]

Bases: Frame

A ttk.Frame preconfigured with a ttk.Treeview.

Variables:
  • parent – The ttk.Frame in which the TreeviewFrame will reside.

  • treeview – The tkinter.ttk.Treeview within the TreeviewFrame.

  • yscroll – The tkinter.ttk.Scrollbar controlling y-scrolling.

  • xscroll – The tkinter.ttk.Scrollbar controlling x-scrolling.

Initialize a ListboxFrame.

Parameters:

parent – The ttk.Frame in which the ListboxFrame will reside.

clear_treeview() None[source]

Deletes all items in the treeview.

create_treeview() Treeview[source]

Creates a Treeview.

create_xscrollbar() Scrollbar[source]

Creates an x-Scrollbar.

create_yscrollbar() Scrollbar[source]

Creates a y-Scrollbar.

property items: dict[str, dict]

Return the elements of the Treeview as a nested dictionary.

organize() None[source]

Organize the TreeviewFrame elements.