-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move parsing into
parse
subcommand (introduce argparse) (#25)
* Split logic from entrypoint * Break calculation into separate statement * Isolate calculation from serialization * Rename produce_errors_report->parse_errors_report "Parse" is a better reflection of what this function does. * Require "parse" subcommand when calling We intend to add more functionality to this tool, so it no longer makes sense to have the error parsing functionality at the top level when calling the script. This change introduces (and requires) a new "parse" subcommand, under which the existing parsing function is moved. Because we're using argparse to do this, we also get a new "--help" flag on the command. * Use better typing for command handlers Co-authored-by: Jeppe Fihl-Pearson <[email protected]> * Update docstring The summary returned is no longer JSON. Co-authored-by: Jeppe Fihl-Pearson <[email protected]> * Let argparse source the CLI arguments There's no point in passing in the defaults. Co-authored-by: Jeppe Fihl-Pearson <[email protected]> * Add --indentation to vary spacing in JSON report Some environments may want control over this to make working with existing style-guides easier. Co-authored-by: Jeppe Fihl-Pearson <[email protected]> --------- Co-authored-by: Jeppe Fihl-Pearson <[email protected]>
- Loading branch information
Showing
5 changed files
with
62 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters