Save script execution summary

Open
#97 0 comments 0 reactions 1 assignee View on GitHub

@jmgate is already working on this.

Since Sep 10, 2024.

Assessment

This issue has not been assessed yet.

Description

Type: Feature

I can imagine some situations where a script designer might not want to print the script execution summary at the end of the script (e.g., perhaps it's just far too long), but it would still be beneficial to have that information on hand after the script completes. I think it'd be worthwhile, therefore, to allow for that summary to be saved to disk somehow.

Possible Implementation

We could create a save_script_execution_summary() that perhaps calls print_script_execution_summary() under the hood, but with a different rich.console.Console, and then save that console's text to a file. Or maybe we want to extend the behavior of the print_ method to allow it to also save to a file if a flag is provided. Then maybe we're talking about adding flags to the parser to specify that the summary is going to the console, a file, or both.

Possible Extension

As I'm thinking about it, I could also see the benefit of printing an abbreviated summary to the terminal, but then saving a comprehensive summary to disk. Not sure how might be best to implement that separation, though.

Dominant language
Python
Stars
23
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sandialabs/staged-script

All issues in sandialabs/staged-script

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.