2.1.21.5. cli.helpers.misc

Miscellaneous helper functions.

Module Attributes

DISABLE_LOGGING_FOR_MODULES

Modules where logging should be disabled

Functions

create_pre_commit_file()

Adds a pre-commit file in the .git/hooks directory

file_name_from_current_time()

Current ISO timestamp in a file system friendly format.

get_multiple_files_hash_str(files[, buffer_size])

Returns the string representation of a SHA256 hash for multiple files

get_project_root([path])

helper function to find the repository root

get_sha256_file_hash(file_path[, ...])

Calculate the SHA256 hash of a file

get_sha256_file_hash_str(file_path[, ...])

Returns the string representation of a SHA256 hash of a file

ignore_third_party_logging()

Disable logging for third party tool, except for errors

initialize_path_variable_for_foxbms()

Add paths that foxBMS expects to exist to the PATH environment variable.

set_logging_level([verbosity, _format, datefmt])

sets the module logging level

set_other_environment_variables_for_foxbms()

Sets environment variables accordingly to foxBMS specifications

terminal_link_print(link)

Prints a clickable link to the terminal :param link: hyperlink that should be clickable