cumulusci.cli package

Submodules

class cumulusci.cli.cci.ConnectServiceCommand(name=None, invoke_without_command=False, no_args_is_help=None, subcommand_metavar=None, chain=False, result_callback=None, **attrs)[source]

Bases: click.core.MultiCommand

get_command(ctx, name)[source]

Given a context and a command name, this returns a Command object if it exists or returns None.

list_commands(ctx)[source]

list the services that can be configured

cumulusci.cli.cci.calculate_org_days(info)[source]

Returns the difference in days between created_date (ISO 8601), and expiration_date (%Y-%m-%d)

cumulusci.cli.cci.check_latest_version()[source]

checks for the latest version of cumulusci from pypi, max once per hour

cumulusci.cli.cci.connection_error_message()[source]
cumulusci.cli.cci.get_context_info()[source]
cumulusci.cli.cci.get_latest_final_version()[source]

return the latest version of cumulusci in pypi, be defensive

cumulusci.cli.cci.handle_exception(error, is_error_cmd)[source]

Displays error of appropriate message back to user, prompts user to investigate further with cci error commands, and writes the traceback to the latest logfile.

cumulusci.cli.cci.is_final_release(version: str) → bool[source]

Returns bool whether version string should be considered a final release.

cumulusci versions are considered final if they contain only digits and periods. e.g. 1.0.1 is final but 2.0b1 and 2.0.dev0 are not.

cumulusci.cli.cci.lines_from_traceback(log_content, num_lines)[source]

Returns the the last max_lines of the logfile, or the whole traceback, whichever is shorter. If no stacktrace is found in the logfile, the user is notified.

cumulusci.cli.cci.main(args=None)[source]

Main CumulusCI CLI entry point.

This runs as the first step in processing any CLI command.

This wraps the click library in order to do some initialization and centralized error handling.

cumulusci.cli.cci.pass_runtime(func=None, require_project=True, require_keychain=False)[source]

Decorator which passes the CCI runtime object as the first arg to a click command.

cumulusci.cli.cci.render_recursive(data, indent=None)[source]
cumulusci.cli.cci.show_debug_info()[source]

Displays the traceback and opens pdb

cumulusci.cli.cci.timestamp_file()[source]

Opens a file for tracking the time of the last version check

cumulusci.cli.cci.validate_project_name(value)[source]

CLI logger

cumulusci.cli.logger.get_gist_logger()[source]

Determines the appropriate filepath for logfile and name for the logger. Returns a logger with RotatingFileHandler attached.

cumulusci.cli.logger.get_rot_file_logger(name, path)[source]

Returns a logger with a rotating file handler

cumulusci.cli.logger.init_logger(log_requests=False)[source]

Initialize the logger

cumulusci.cli.runtime.CliConfig

alias of cumulusci.cli.runtime.CliRuntime

class cumulusci.cli.runtime.CliRuntime(*args, **kwargs)[source]

Bases: cumulusci.core.runtime.BaseCumulusCI

alert(message='We need your attention!')[source]
check_cumulusci_version()[source]
check_org_expired(org_name, org_config)[source]
check_org_overwrite(org_name)[source]
get_keychain_class()[source]
get_keychain_key()[source]
get_org(org_name=None, fail_if_missing=True)[source]
cumulusci.cli.runtime.get_installed_version()[source]

returns the version name (e.g. 2.0.0b58) that is installed

Format and display CLI output.

Classes:
CliTable: Pretty prints tabular data to stdout, via click.echo.
class cumulusci.cli.ui.CliTable(data, title=None, wrap_cols=None, bool_cols=None, dim_rows=None)[source]

Bases: object

Format and print data to the command line in tabular form. Attributes:

  • INNER_BORDER: Boolean passed to terminaltables.inner_row_border. Defaults to True.
  • PICTOGRAM_TRUE: True boolean values are replaced with this string.
  • PICTOGRAM_FALSE = False boolean values are replaced with this string.

Methods: * echo: Print the table data to stdout using click.echo() * pretty_table: Table drawn using Unicode drawing characters. * ascii_table: Table drawn using Ascii characters.

INNER_BORDER = True
PICTOGRAM_FALSE = ' '
PICTOGRAM_TRUE = '\x1b[32m✔\x1b[0m'
ascii_table()[source]

Fallback for dumb terminals.

echo(plain=False)[source]

Print this table’s data using click.echo().

Automatically falls back to AsciiTable if there’s an encoding error.

pretty_table()[source]

Pretty prints a table.

stringify_boolean_col(col_name=None, true_str=None, false_str=None)[source]

Replace booleans in the given column name with a string. Args:

  • col_name: str indicating which columns should be stringifed.
  • true_str: True values will be replaced with this string on posix systems.
  • false_str: False values will be replaced with this string on posix systems.

Module contents