bout_runners.database.database_utils

Module containing database utils.

Functions

get_file_modification(project_path, …)

Return the file modification info.

get_git_sha(path)

Return the git hash.

get_system_info()

Return the system information.

get_system_info_as_sql_type()

Return the SQL types of the system information.

bout_runners.database.database_utils.get_file_modification(project_path: pathlib.Path, makefile_path: pathlib.Path, exec_name: str) → Dict[str, str][source]

Return the file modification info.

Parameters
project_pathPath

Path to the project

makefile_pathPath

Path to the project makefile

exec_namestr

Name of the executable

Returns
file_modificationdict

The file modification on the form

>>> {'project_makefile_modified': str,
...  'project_executable_modified': str,
...  'project_git_sha': str,
...  'bout_lib_modified': str,
...  'bout_git_sha': str,}
bout_runners.database.database_utils.get_git_sha(path: pathlib.Path) → str[source]

Return the git hash.

Parameters
pathPath

Path to query the git hash

Returns
git_shastr

The git hash

bout_runners.database.database_utils.get_system_info() → Dict[str, str][source]

Return the system information.

Returns
attributesdict

Dictionary with the attributes of the system

bout_runners.database.database_utils.get_system_info_as_sql_type() → Dict[str, str][source]

Return the SQL types of the system information.

Returns
sys_info_dictdict

Dictionary with the attributes of the system as keys and the type as values