Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
SBL.gui_json_schema Namespace Reference

Packages

Schema definition, dataclasses, and parsing utilities for the SBL GUI JSON specification.

This module formalizes the JSON interface used to describe auto-generated GUI layouts.
It provides:

  • A JSON Schema that fully specifies the expected structure and allowed fields.
  • Python dataclasses that serve as a typed in-memory representation of the specification.
  • Validation utilities (JSON Schema–based) to ensure correctness and reproducibility.
  • Parsing helpers to construct typed Python objects from validated JSON dictionaries.

This machinery ensures that GUI definitions produced by the UI-to-Spec generator
remain portable, machine-verifiable, and version-stable across GUI backends
(PyQt6, Tkinter, Panel).

Typical usage:

    from gui_json_schema import ParseGUI

    # Validate on disk
    ParseGUI.validate_gui_spec("gui_spec.json")

    # Load and parse in memory
    import json
    with open("gui_spec.json") as f:
        data = json.load(f)
    gui = ParseGUI.parse_gui(data)
    print(gui.window.title)

The JSON schema enforced here is part of the end-to-end, reproducible GUI
generation pipeline supporting the SBL Plugin Manager ecosystem.

Class Documentation

◆ SBL::gui_json_schema::GUI

class SBL::gui_json_schema::GUI
In-memory representation of a validated GUI specification.

Attributes:
    window: The root window object.
    metadata: Auxiliary integration metadata.

◆ SBL::gui_json_schema::Metadata

class SBL::gui_json_schema::Metadata
Execution-time metadata describing how the GUI integrates with a CLI program.

exe_name   : CLI executable invoked when the GUI launches computations.
post_script: Optional Python post-analysis module for result visualization.

This block provides the binding between a declarative GUI layout and its
execution pipeline in the Plugin Manager workflow.