options
Command line options for eb
Authors:
- Stijn De Weirdt (Ghent University)
- Dries Verdegem (Ghent University)
- Kenneth Hoste (Ghent University)
- Pieter De Baets (Ghent University)
- Jens Timmerman (Ghent University)
- Toon Willems (Ghent University)
- Ward Poelmans (Ghent University)
- Damian Alvarez (Forschungszentrum Juelich GmbH)
- Maxime Boissonneault (Compute Canada)
EasyBuildOptions
¶
Bases: GeneralOption
Easybuild generaloption class
__init__(*args, **kwargs)
¶
Constructor.
avail_list(name, items)
¶
Show list of available values passed by argument.
avail_repositories()
¶
Show list of known repository types.
basic_options()
¶
basic runtime options
get_cfg_opt_abs_path(opt_name, path)
¶
Get path value of configuration option as absolute path.
github_options()
¶
GitHub integration configuration options.
job_options()
¶
Option related to --job.
postprocess()
¶
Do some postprocessing, in particular print stuff
regtest_options()
¶
Regression test configuration options.
show_config()
¶
Show specified EasyBuild configuration, relative to default EasyBuild configuration.
show_default_configfiles()
¶
Show list of default config files.
show_default_moduleclasses()
¶
Show list of default moduleclasses and description.
show_system_info()
¶
Show system information.
validate()
¶
Additional validation of options
check_options(options)
¶
Check configuration options, some combinations are not allowed.
check_root_usage(allow_use_as_root=False)
¶
Check whether we are running as root, and act accordingly
PARAMETER | DESCRIPTION |
---|---|
allow_use_as_root |
allow use of EasyBuild as root (but do print a warning when doing so)
DEFAULT:
|
cleanup_and_exit(tmpdir)
¶
Clean up temporary directory and exit.
PARAMETER | DESCRIPTION |
---|---|
tmpdir |
path to temporary directory to clean up
|
handle_include_easyblocks_from(options, log)
¶
Handle --include-easyblocks-from-pr and --include-easyblocks-from-commit
opts_dict_to_eb_opts(args_dict)
¶
Convert a dictionary with configuration option values to command-line options for the 'eb' command. Can by used to convert e.g. easyconfig-specific options from an easystack file to a list of strings that can be fed into the EasyBuild option parser
PARAMETER | DESCRIPTION |
---|---|
args_dict |
dictionary with configuration option values
|
RETURNS | DESCRIPTION |
---|---|
a list of strings representing command-line options for the 'eb' command |
parse_external_modules_metadata(cfgs)
¶
Parse metadata for external modules.
PARAMETER | DESCRIPTION |
---|---|
cfgs |
list of (glob patterns for) paths to config files providing metadata for external modules
|
RETURNS | DESCRIPTION |
---|---|
parsed metadata for external modules |
parse_options(args=None, with_include=True)
¶
wrapper function for option parsing
pretty_print_opts(opts_dict)
¶
Pretty print options dict.
PARAMETER | DESCRIPTION |
---|---|
opts_dict |
dictionary with option names as keys, and (value, location) tuples as values
|
process_software_build_specs(options)
¶
Create a dictionary with specified software build options. The options arguments should be a parsed option list (as delivered by parse_options(args).options)
set_tmpdir(tmpdir=None, raise_error=False)
¶
Set temporary directory to be used by tempfile and others.
set_up_configuration(args=None, logfile=None, testing=False, silent=False, reconfigure=False)
¶
Set up EasyBuild configuration, by parsing configuration settings & initialising build options.
PARAMETER | DESCRIPTION |
---|---|
args |
command line arguments to take into account when parsing the EasyBuild configuration settings
DEFAULT:
|
logfile |
log file to use
DEFAULT:
|
testing |
enable testing mode
DEFAULT:
|
silent |
stay silent (no printing)
DEFAULT:
|
reconfigure |
reconfigure singletons that hold configuration dictionaries. Use with care: normally, configuration shouldn't be changed during a run. Exceptions are when looping over items in EasyStack files
DEFAULT:
|
use_color(colorize, stream=sys.stdout)
¶
Return True
or False
depending on whether ANSI color
escapes are to be used when printing to stream
.
The colorize
argument can take the three values
fancylogger.Colorize.AUTO
/.ALWAYS
/.NEVER
,
see the --color
option for their meaning.