Skip to content

output

Tools for controlling output to terminal produced by EasyBuild.

Authors:

  • Kenneth Hoste (Ghent University)
  • Jørgen Nordmoen (University of Oslo)

DummyRich

Bases: object

Dummy shim for Rich classes. Used in case Rich is not available, or when EasyBuild is not configured to use rich output style.

colorize(txt, color)

Colorize given text, with specified color.

download_all_progress_bar()

Get progress bar to show progress on downloading of all source files.

download_one_progress_bar()

Get progress bar to show progress for downloading a file of known size.

download_one_progress_bar_unknown_size()

Get progress bar to show progress for downloading a file of unknown size.

easyconfig_progress_bar()

Get progress bar to display progress for installing a single easyconfig file.

extensions_progress_bar()

Get progress bar to show progress for installing extensions.

get_progress_bar(bar_type, ignore_cache=False, size=None)

Get progress bar of given type.

print_checks(checks_data)

Print overview of checks that were made.

progress_bar_cache(func)

Function decorator to cache created progress bars for easy retrieval.

rich_live_cm()

Return Live instance to use as context manager.

show_progress_bars()

Return whether or not to show progress bars.

start_progress_bar(bar_type, size, label=None)

Start progress bar of given type.

PARAMETER DESCRIPTION
label

label for progress bar

DEFAULT: None

size

total target size of progress bar

status_bar()

Get progress bar to display overall progress.

stop_progress_bar(bar_type, visible=False)

Stop progress bar of given type.

update_progress_bar(bar_type, label=None, progress_size=1, total=None)

Update progress bar of given type (if it was started), add progress of given size.

PARAMETER DESCRIPTION
bar_type

type of progress bar

label

label for progress bar

DEFAULT: None

progress_size

amount of progress made

DEFAULT: 1

use_rich()

Return whether or not to use Rich to produce rich output.