From b6972a542a8c7f07e1370278b74fa7f89eaef9b0 Mon Sep 17 00:00:00 2001 From: "Jason M. Gates" Date: Wed, 6 Mar 2024 09:17:47 -0700 Subject: [PATCH] docs: DEBUGGING --- shell_logger/html_utilities.py | 45 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/shell_logger/html_utilities.py b/shell_logger/html_utilities.py index 0e0670b..0fc41b0 100644 --- a/shell_logger/html_utilities.py +++ b/shell_logger/html_utilities.py @@ -164,18 +164,18 @@ def parent_logger_card_html( Generate the HTML for a parent logger card. Generate the HTML for the card corresponding to the parent - :class:`ShellLogger`. The HTML elements are yielded one at a time - to avoid loading *all* the data from the :class:`ShellLogger` into - memory at once. + :class:`shell_logger.ShellLogger`. The HTML elements are yielded + one at a time to avoid loading *all* the data from the + :class:`shell_logger.ShellLogger` into memory at once. Parameters: - name: The name of the :class:`ShellLogger`. + name: The name of the :class:`shell_logger.ShellLogger`. *args: A list of generators to lazily yield string HTML elements for the contents of the parent card. Yields: The header, followed by all the contents of the - :class:`ShellLogger`, and then the footer. + :class:`shell_logger.ShellLogger`, and then the footer. """ header, indent, footer = split_template( parent_logger_template, "parent_body", name=name @@ -191,11 +191,11 @@ def child_logger_card(log) -> Iterator[str]: Generate a child logger card. Create a card to go in the HTML log file containing everything - pertaining to a child :class:`ShellLogger`. + pertaining to a child :class:`shell_logger.ShellLogger`. Parameters: - log (ShellLogger): The child :class:`ShellLogger` for which to - generate the card. + log (ShellLogger): The child :class:`shell_logger.ShellLogger` + for which to generate the card. Returns: A generator that will lazily yield the elements of the HTML for @@ -219,19 +219,20 @@ def child_logger_card_html( Generate the HTML for a child logger card. Generate the HTML for a card corresponding to the child - :class:`ShellLogger`. The HTML elements are yielded one at a time - to avoid loading *all* the data from the :class:`ShellLogger` into - memory at once. + :class:`shell_logger.ShellLogger`. The HTML elements are yielded + one at a time to avoid loading *all* the data from the + :class:`shell_logger.ShellLogger` into memory at once. Parameters: - name: The name of the child :class:`ShellLogger`. - duration: The duration of the child :class:`ShellLogger`. + name: The name of the child :class:`shell_logger.ShellLogger`. + duration: The duration of the child + :class:`shell_logger.ShellLogger`. *args: A generator (or list of generators) to lazily yield string HTML elements for the contents of the child card. Yields: The header, followed by all the contents of the child - :class:`ShellLogger`, and then the footer. + :class:`shell_logger.ShellLogger`, and then the footer. Todo: * Should we replace the ``for`` loop with the one found in @@ -261,8 +262,8 @@ def command_card_html( *all* the data into memory at once. Parameters: - log: An entry from the :class:`ShellLogger` 's log book - corresponding to a command that was run. + log: An entry from the :class:`shell_logger.ShellLogger` 's + log book corresponding to a command that was run. *args: A generator that will yield all the elements to be included in the command card one at a time. @@ -298,8 +299,8 @@ def html_message_card(log: dict) -> Iterator[str]: well). Parameters: - log: An entry from the :class:`ShellLogger` 's log book - corresponding to a message. + log: An entry from the :class:`shell_logger.ShellLogger` 's + log book corresponding to a message. Yields: The header, followed by the contents of the message card, and @@ -333,8 +334,8 @@ def message_card(log: dict) -> Iterator[str]: printed to ``stdout`` and included in the HTML log file. Parameters: - log: An entry from the :class:`ShellLogger` 's log book - corresponding to a message. + log: An entry from the :class:`shell_logger.ShellLogger` 's + log book corresponding to a message. Yields: The header, followed by the contents of the message card, and @@ -412,8 +413,8 @@ def command_card(log: dict, stream_dir: Path) -> Iterator[str]: information, trace output, memory/CPU/disk statistics, etc.). Parameters: - log: An entry from the :class:`ShellLogger` 's log book - corresponding to a command that was run. + log: An entry from the :class:`shell_logger.ShellLogger` 's + log book corresponding to a command that was run. stream_dir: The stream directory containing the ``stdout``, ``stderr``, and ``trace`` output from the command.