Module i2pp.main
Main routine of img2physiprop.
Functions
def main() ‑> None
-
Expand source code
def main() -> None: """Call img2physiprop runner with config. Raises: RuntimeError: If provided config is not a valid file. """ logging.basicConfig(level=logging.DEBUG) parser = argparse.ArgumentParser(description="Process some integers.") parser.add_argument( "config", help="Path to config file.", type=str, ) args = parser.parse_args() if not os.path.isfile(args.config): raise RuntimeError( "Config file not found! img2physiprop can not be executed!" ) # load config and convert to simple namespace for easier access with open(args.config, "r") as file: config = munchify(yaml.safe_load(file)) # execute i2pp run_i2pp(config)
Call img2physiprop runner with config.
Raises
RuntimeError
- If provided config is not a valid file.