Skip to content

Commit

Permalink
docs: DEBUGGING
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgate committed Mar 6, 2024
1 parent 159a449 commit b6972a5
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions shell_logger/html_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit b6972a5

Please sign in to comment.