:py:mod:`buildtest.cli.history` =============================== .. py:module:: buildtest.cli.history Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: buildtest.cli.history.build_history buildtest.cli.history.sorted_alphanumeric buildtest.cli.history.query_builds buildtest.cli.history.list_build_history buildtest.cli.history.process_history_data Attributes ~~~~~~~~~~ .. autoapisummary:: buildtest.cli.history.logger .. py:data:: logger .. py:function:: build_history(args) This is the entry point for command ``buildtest history`` command which reports :param args: Parsed arguments from `ArgumentParser.parse_args `_ :type args: dict .. py:function:: sorted_alphanumeric(data) This method is used for alphanumeric sorting of files. :param data: A list of history files to sort alpha numerically :returns: sorted list of history files alphanumerically :rtype: list .. py:function:: query_builds(build_id, log_option=None, output=None, pager=None) This method is called when user runs `buildtest history query` which will report the build.json and logfile. :param build_id: Build Identifier which is used for querying history file. The indentifier is an integer starting from 0 :type build_id: int :param log_option: Option to control whether log file is opened in editor. This is specified via ``buildtest history query -l `` :type log_option: bool, optional :param output: Display output.txt file which contains output of ``buildtest build`` command. This is passed via ``buildtest history query -o`` :type output: bool, optional :param pager: Print output in paging format :type pager: bool, optional .. py:function:: list_build_history(no_header=None, terse=None, pager=None, color=None, row_count=None) This method is entry point for ``buildtest history list`` which prints all previous builds stored in **BUILD_HISTORY_DIR**. Each directory has a ``build.json`` file that stores content of each build that was run by ``buildtest build``. :param no_header: Control whether header columns are displayed with terse format :type no_header: bool, optional :param terse: Print output in terse format :type terse: bool, optional :param pager: Print output in paging format :type pager: bool, optional :param color: Select desired color when displaying results :type color: bool, optional :param row_count: Print row count of all previous builds :type row_count: bool, optional .. py:function:: process_history_data(history_files) This method processes history files and extracts data from each build.json file and returns a list of data for each build. :param history_files: A list of history files to process :type history_files: list :returns: A list containing build history data :rtype: list