Main entry point for the AGVis CLI.#
main.py serves as the main entry point for the AGVis Command Line Interface (CLI). It provides functionality for running the AGVis application,
configuring logging, managing output files, displaying license information, running miscellaneous commands, performing self-tests, demonstrating
features, and retrieving version information.
Entry Point#
- run(filename='', input_path='', verbose=20, host='localhost', port=8810, dev=False, socket_path=None, static=None, **kwargs)
Entry point to run AGVis.
filename (str, optional) : File name (or pattern).
input_path (str, optional) : Input search path.
verbose (int, optional) : Verbosity level.
host (str, optional) : Host IP address or hostname.
port (int, optional) : Port number.
dev (bool, optional) : Flag indicating if it's in development mode.
socket_path (str, optional) : Path to the socket.
static (str, optional) : Path to static files.
**kwargs : Other supported keyword arguments.
Configuration#
- config_logger(stream_level=logging.INFO, stream=True, file=True, log_file='agvis.log', log_path=None, file_level=logging.DEBUG)
Configure an AGVis logger with a FileHandler and a StreamHandler.
stream_level (int, optional) : Stream handler verbosity level.
stream (bool, optional) : Flag to create a StreamHandler.
file (bool, optional) : Flag to log to a file.
log_file (str, optional) : Log file name.
log_path (str, optional) : Path to store the log file.
file_level (int, optional) : File handler verbosity level.
Logging#
- logger
logging.Logger Logger instance for AGVis.
Miscellaneous#
- print_license()
Print out AGVis license to stdout.
- remove_output(recursive=False)
Remove the outputs generated by AGVis.
- misc(show_license=False, clean=True, recursive=False, version=False, **kwargs)
Miscellaneous commands.
- selftest(**kwargs)
Run unit tests (TODO).
- demo(**kwargs)
Show demonstrations (TODO).
- versioninfo()
Print version info for AGVis and dependencies.
Utility Functions#
- set_logger_level(lg, type_to_set, level)
Set logging level for the given type of handler.
- get_log_dir()
Get the directory for log file.
- find_log_path(lg)
Find the file paths of the FileHandlers.
- _find_cases(filename, path)
Find valid cases using the provided names and path.