Skip to main content

GUI software for rendering arguments of CLI Python scripts and scheduling runs.

Project description

ScriptRunner

ScriptRunner_Logo


GUI software for rendering arguments of CLI Python scripts and scheduling runs


Motivation

In synchrotron facilities where Linux OS is the main platform, running data acquisition, data processing, or beamline operation is often done through Python command-line interfaces. This can be a hassle for users who are not familiar with Linux or command-line interfaces.

The idea of this GUI is to render the arguments of CLI scripts, making it easier for users to run Python scripts through a graphical user interface. Beyond that, ScriptRunner allows scheduling script runs in a flexible way, enabling users to run a group of scripts with ease. For example, a list of data acquisition or data processing scripts can be scheduled to run different acquisition modes or different data-processing pipelines in order.

To make it even more convenient for users, ScriptRunner allows modifying and changing Python scripts without the need for another script editor like VS Code, Gedit, or Vim.

Features

  • Automatic GUI generation for CLI Python scripts:

    ScriptRunner parses arguments from ArgParse-based CLI scripts and automatically renders them as user-friendly GUI input fields.

    Fig1

  • Run individual scripts or schedule multi-script workflows:

    Execute a single script on demand, or create a scheduled sequence of multiple scripts. This enables automated data acquisition, processing pipelines, or batch operations without manual intervention.

    Fig2

  • Built-in script editor with side-by-side comparison:

    Edit Python scripts directly inside the application, no need for external editors like VS Code or Vim. Compare two scripts side-by-side to track modifications or validate parameter changes.

    Fig3

  • Console logging and export:

    View real-time console output for each script and save logs to a file for debugging, documentation, or reproducibility.

    Fig3

Installation

Install Miniconda, Anaconda or Miniforge, then open a Linux terminal or the Miniconda/Anaconda PowerShell prompt and use the following commands for installation.

Using pip:

pip install scriptrunner-gui

Using conda:

conda install -c algotom scriptrunner-gui

Once installed, launching ScriptRunner with

scriptrunner

Using -h for option usage

scriptrunner -h

Installing from source:

  • If using a single file:
    • Copy the file scriptrunner.py. Install python.
    • Run:
      python scriptrunner.py
      
  • If using setup.py
    • Create conda environment
      conda create -n scriptrunner python=3.11
      conda activate scriptrunner
      
    • Clone the source (git needs to be installed)
      git clone https://github.com/algotom/scriptrunner.git
      
    • Navigate to the cloned directory (having setup.py file)
      pip install .
      

Usage

  • Select a base folder containing Python scripts.

  • Clicking a script will show the arguments of that script in the right panel.

  • Double-clicking a script will open the Editor panel window.

  • Clicking "Run Now" will run the current script.

  • Select a script and use "Add to schedule" to schedule multiple scripts. There is an option to add sleep time between scripts.

  • Enable/disable saving console output to a file using the checkbox.

  • By default, ScriptRunner picks and displays ArgParse-based scripts. However, users can choose to display all Python scripts by running:

    scriptrunner -t "all"
    

    or tick the box "Show all .py"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scriptrunner_gui-1.1.0.tar.gz (61.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scriptrunner_gui-1.1.0-py3-none-any.whl (58.7 kB view details)

Uploaded Python 3

File details

Details for the file scriptrunner_gui-1.1.0.tar.gz.

File metadata

  • Download URL: scriptrunner_gui-1.1.0.tar.gz
  • Upload date:
  • Size: 61.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for scriptrunner_gui-1.1.0.tar.gz
Algorithm Hash digest
SHA256 078b7c6fae0ae37efaa6342f78faf4b401bfd2facce14a25b63fcf6a937db33e
MD5 9a9b8fec8aa23efc37e35c982f92105b
BLAKE2b-256 c07fec80212e048df7d16bcb09a87f83063145aa22f252174f1061ab0e5a64e3

See more details on using hashes here.

File details

Details for the file scriptrunner_gui-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for scriptrunner_gui-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 528d4552ce14f1054470a8c504118e70b7b49e6c955154c6631b82c51b798480
MD5 26c4458b99f351240f8d493eff0752cd
BLAKE2b-256 8ab32e682f35312a9998956f153c3d8c98e90493c42f2e7b8d3c9c121e31bd9f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page