Project Structure¶
Each action is governed by three primary functions: 1. populate_parser(parser) 2. main()
topicexplorer.__main__
This file defines the master script for the Topic Explorer CLI. The general usage pattern is to create subcommands through new modules in the same package - such as topicexplorer.init, topicexplorer.prep, topicexplorer.train, etc.
Each submodule defines a populate_parser() function which adds command arguments to an argparse.ArgumentParser instance. The instance is then added to the master ArgumentParser and a func keyword is used to switch between the functionality defined by each module’s main() method.
In addition, topicexplorer.__main__ defines the benchmark commands for execution time and profiling.
-
exception
topicexplorer.__main__.
ArgumentParserError
¶ Skeleton class for use in try blocks.
-
class
topicexplorer.__main__.
ThrowingArgumentParser
(prog=None, usage=None, description=None, epilog=None, parents=[], formatter_class=<class 'argparse.HelpFormatter'>, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True, allow_abbrev=True)¶ Skeleton subclass of argparse.ArgumentParser to raise exceptions.
-
topicexplorer.__main__.
main
()¶ The primary CLI function for the Topic Explorer.