2. GUI Module#

This module contains the GUI of BuckPy.

class buckpy.buckpy_gui.GUI(root)[source]#

Bases: object

BuckPy Graphical User Interface (GUI) class.

This class creates and manages the main window for user interaction, allowing users to select input files, enter pipeline and scenario IDs, choose options, and view scenario data in a table. It handles all user input validation and provides a structured interface for running BuckPy workflows.

close_app()[source]#

Validate user input and close the GUI if all inputs are valid.

Checks that required fields are filled and formatted correctly. If validation passes, stores user selections and closes the window. Otherwise, displays appropriate warning or error messages.

create_widgets()[source]#

Create and place all widgets in the GUI.

Adds labels, entry fields, buttons, comboboxes, and separators to the top frame for user input and configuration.

open_file()[source]#

Open a file dialog for the user to select an Excel input file.

Updates the displayed file name and triggers loading of scenario data into the table if a valid file is selected.

setup_treeview()[source]#

Set up and populate the Treeview widget with scenario data.

Reads the selected Excel file, configures the table columns and headings, and inserts scenario data rows for user review.