__main__#
Calling module for the SkySim package.
- class skysim.__main__.CustomArgumentParser(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, exit_on_error=True)[source]
Override of the default ArgumentParser to change the error message.
- error(message: string)[source]
Prints a usage message incorporating the message to stderr and exits.
If you override this in a subclass, it should not return – it should either exit or raise an exception.
Entrypoint#
- skysim.__main__.main(args=None)[source]#
Entrypoint for the SkySim package.
Calls the following functions directly:
- __main__
parse_args
- Parameters:
- Returns:
pathlib.PathPath object to the created file. Returned if
--debugflag is set.NoneReturned if
--debugflag is unset.
- Raises:
ValueError,ConnectionErrorRe-raised from their creation inside the SkySim code if and only if the –debug flag is set.
SystemExitSupercedes internal errors to produce a cleaner error message if the –debug flag is not set.
Additional Functions#
|
Parse command line arguments. |
|
Pre-validate the existence of a config file. |
|
Check if files will be overwritten and take action based on cli flags (--verbose and --overwrite). |
|
Check if SkySim will overwrite any existing files. |