Table of Contents
Fetching ...

EZInput: A Cross-Environment Python Library for Easy UI Generation in Scientific Computing

Bruno M. Saraiva, Iván Hidalgo-Cenalmor, António D. Brito, Damián Martínez, Tayla Shakespeare, Guillaume Jacquemet, Ricardo Henriques

TL;DR

EZInput tackles the barrier of algorithm usability in scientific computing by providing a cross-runtime, declarative UI generation library. It automatically renders consistent parameter interfaces across Jupyter notebooks and terminal environments, while persisting user configurations in YAML to enhance reproducibility. The approach combines environment-aware backends (ipywidgets and prompt_toolkit) with a three-layer architecture and per-parameter persistence controls, enabling rapid iteration from notebook exploration to HPC deployment. By integrating with projects like NanoPyx and ColabFold and releasing under MIT, EZInput aims to democratize access to sophisticated computational tools without sacrificing flexibility or reproducibility.

Abstract

Researchers face a persistent barrier when applying computational algorithms with parameter configuration typically demanding programming skills, interfaces differing across environments, and settings rarely persisting between sessions. This fragmentation forces repetitive input, slows iterative exploration, and undermines reproducibility because parameter choices are difficult to record, share, and reuse. We present EZInput, a cross-runtime environment Python library enabling algorithm developers to automatically generate graphical user interfaces that make their computational tools accessible to end-users without programming expertise. EZInput employs a declarative specification system where developers define input requirements and validation constraints once; the library then handles environment detection, interface rendering, parameter validation, and session persistence across Jupyter notebooks, Google Colab, and terminal environments. This "write once, run anywhere" architecture enables researchers to prototype in notebooks and deploy identical parameter configurations for batch execution on remote systems without code changes or manual transcription. Parameter persistence, inspired by ImageJ/FIJI and adapted to Python workflows, saves and restores user configurations via lightweight YAML files, eliminating redundant input and producing shareable records that enhance reproducibility. EZInput supports diverse input types essential for scientific computing and it also includes built-in validation that ensures data integrity and clear feedback that reduces user friction.

EZInput: A Cross-Environment Python Library for Easy UI Generation in Scientific Computing

TL;DR

EZInput tackles the barrier of algorithm usability in scientific computing by providing a cross-runtime, declarative UI generation library. It automatically renders consistent parameter interfaces across Jupyter notebooks and terminal environments, while persisting user configurations in YAML to enhance reproducibility. The approach combines environment-aware backends (ipywidgets and prompt_toolkit) with a three-layer architecture and per-parameter persistence controls, enabling rapid iteration from notebook exploration to HPC deployment. By integrating with projects like NanoPyx and ColabFold and releasing under MIT, EZInput aims to democratize access to sophisticated computational tools without sacrificing flexibility or reproducibility.

Abstract

Researchers face a persistent barrier when applying computational algorithms with parameter configuration typically demanding programming skills, interfaces differing across environments, and settings rarely persisting between sessions. This fragmentation forces repetitive input, slows iterative exploration, and undermines reproducibility because parameter choices are difficult to record, share, and reuse. We present EZInput, a cross-runtime environment Python library enabling algorithm developers to automatically generate graphical user interfaces that make their computational tools accessible to end-users without programming expertise. EZInput employs a declarative specification system where developers define input requirements and validation constraints once; the library then handles environment detection, interface rendering, parameter validation, and session persistence across Jupyter notebooks, Google Colab, and terminal environments. This "write once, run anywhere" architecture enables researchers to prototype in notebooks and deploy identical parameter configurations for batch execution on remote systems without code changes or manual transcription. Parameter persistence, inspired by ImageJ/FIJI and adapted to Python workflows, saves and restores user configurations via lightweight YAML files, eliminating redundant input and producing shareable records that enhance reproducibility. EZInput supports diverse input types essential for scientific computing and it also includes built-in validation that ensures data integrity and clear feedback that reduces user friction.
Paper Structure (7 sections, 3 figures, 1 table)

This paper contains 7 sections, 3 figures, 1 table.

Figures (3)

  • Figure 1: EZInput framework architecture and workflow integration. The EZInput library implements a declarative parameter specification system that automatically generates graphical user interfaces across multiple computational environments, both Jupyter notebooks and terminal environments, without additional interface development. Parameter persistence mechanism inspired by ImageJ/FIJI imagejschindelin2012fiji, where user configurations are automatically saved to lightweight configuration files, enabling rapid iteration and reproducible analysis across sessions.
  • Figure 2: EZInput enables seamless cross-application user interfaces through unified declarative specifications. The framework demonstrates consistent interface generation across computational environments without requiring environment-specific code modifications. Underlying Python code demonstrating the declarative specification system that generates both interfaces. A single parameter definition block specifies labels and inputs, with EZInput automatically handling environment detection and appropriate interface rendering. This "write once, run anywhere" approach eliminates the need for parallel development of multiple interfaces whilst maintaining full feature parity across environments. Parameter persistence functionality ensures that user configurations remain consistent between Jupyter and terminal environments, enabling seamless transitions between interactive exploration and production workflows.
  • Figure 3: Integration of EZInput within NanoPyx enables accessible, reproducible microscopy image analysis. In NanoPyx, EZInput’s declarative parameter specification automatically produces Jupyter notebook interfaces for complex image processing routines (image registration, denoising, super-resolution reconstruction and image quality assessment). Parameters (numeric ranges, paths, algorithm modes) persist across sessions via lightweight YAML memory, accelerating iterative tuning and ensuring identical settings can be reapplied or shared. This integration lowers the barrier for non-programming users while preserving full algorithmic flexibility, supporting seamless transition from interactive exploration to scripted or HPC execution using the same saved configurations.