buildtest.cli
buildtest cli: include functions to build, get test configurations, and interact with a global configuration for buildtest.
Submodules
buildtest.cli.build
buildtest.cli.buildspec
buildtest.cli.cd
buildtest.cli.cdash
buildtest.cli.clean
buildtest.cli.commands
buildtest.cli.compilers
buildtest.cli.config
buildtest.cli.debugreport
buildtest.cli.helpcolor
buildtest.cli.history
buildtest.cli.info
buildtest.cli.inspect
buildtest.cli.path
buildtest.cli.report
buildtest.cli.schema
buildtest.cli.show
buildtest.cli.stats
Package Contents
Classes
This class implements the buildtest command line interface. This class |
Functions
|
This method is used as validate argument type for |
|
This method is used as type field in --filter argument in |
|
Checks if input is positive number and returns value as an int type. |
|
Checks if input is a supported color and returns value as an Color type. |
|
Checks if input is valid time and returns value as a str type. |
This method is used to simply return the parser for sphinx-argparse. |
Attributes
- buildtest.cli.BUILDTEST_COPYRIGHT = 'Copyright (c) 2021-2024, The Regents of the University of California, through Lawrence Berkeley...'
- buildtest.cli.BUILDTEST_VERSION
- buildtest.cli.console
- buildtest.cli.schema_table
- buildtest.cli.build_filters_format(val)[source]
This method is used as validate argument type for
buildtest build --filter
. This method returns a dict of key, value pairs where input is in the format key1=val1,val2;key2=val3. The semicolon is used to separate the keys and multiple values can be specified via comma
- buildtest.cli.handle_kv_string(val)[source]
This method is used as type field in –filter argument in
buildtest buildspec find
. This method returns a dict of key,value pair where input is in format key1=val1,key2=val2,key3=val3
- buildtest.cli.positive_number(value)[source]
Checks if input is positive number and returns value as an int type.
- Parameters:
- Returns:
Return value as int type
- Return type:
- Raises:
argparse.ArgumentTypeError will be raised if input is not positive number or input is not str or int type –
>>> positive_number("1") 1
>>> positive_number(2) 2
- buildtest.cli.supported_color(input_color)[source]
Checks if input is a supported color and returns value as an Color type.
- Parameters:
input_color (str) – Specify an input color
- Returns:
Return value as rich.color.Color type
- Return type:
- Raises:
argparse.ArgumentTypeError will be raised if input is not a supported color input or is not str type –
>>> supported_color("red") red
- buildtest.cli.valid_time(value)[source]
Checks if input is valid time and returns value as a str type.
- Parameters:
value (str) – Specify an input date in yyyy-mm-dd format
- Returns:
Return value as str type in correct format
- Return type:
- Raises:
argparse.ArgumentTypeError will be raised if input is not str or input is not in desired format –
>>> valid_time("2022-01-01") "2022-01-01"
>>> valid_time("2022-01-13") "2022-01-13"
- buildtest.cli.get_parser()[source]
This method is used to simply return the parser for sphinx-argparse.
- class buildtest.cli.BuildTestParser[source]
This class implements the buildtest command line interface. This class implements the following methods:
get_parser()
: This method builds the command line interface for buildtestparse()
: This method parses arguments passed to buildtest command line interface
- _github = 'https://github.com/buildtesters/buildtest'
- _docs = 'https://buildtest.readthedocs.io/en/latest/index.html'
- _slack = 'http://hpcbuildtest.slack.com/'
- _issues = 'https://github.com/buildtesters/buildtest/issues'
- _progname = 'buildtest'
- _description = 'buildtest is a HPC testing framework for building and running tests.'
- epilog_str
- _buildtest_show_commands = ['bd', 'build', 'bc', 'buildspec', 'cdash', 'cg', 'config', 'hy', 'history', 'it', 'inspect',...
- retrieve_main_options()[source]
This method retrieves all options for buildtest command line interface. This is invoked by
buildtest --listopts
command and useful when user wants to see all options.
- get_subcommands()[source]
Return a list of buildtest commands. This is useful for
buildtest commands
command to show a list of buildtest commands
Build the command line menu for some miscellaneous commands
This method will create command options for
buildtest stylecheck
This method builds the command line menu for
buildtest unittests
command
This method builds the command line menu for
buildtest path
command
This method builds the command line menu for
buildtest history
command
This method implements command line menu for
buildtest build
command.
This method implements
buildtest buildspec
command
This method adds argparse argument for
buildtest config
This method implements the
buildtest report
command options
This method builds argument for
buildtest inspect
command
This method builds menu for
buildtest schema
This method builds arguments for
buildtest cdash
command.