run#

ams.main.run(filename: str | List[str], input_path: str = '', verbose: int = 20, mp_verbose: int = 30, ncpu: int = 2, pool: bool = False, cli: bool = False, shell: bool = False, **kwargs) System | List[System | None] | bool | int | None[source]#

Entry point to run AMS routines.

Parameters:
filenamestr

file name (or pattern)

input_pathstr, optional

input search path

verboseint, 10 (DEBUG), 20 (INFO), 30 (WARNING), 40 (ERROR), 50 (CRITICAL)

Verbosity level. If config_logger is called prior to run, this option will be ignored.

mp_verboseint

Verbosity level for multiprocessing tasks

ncpuint, optional

Number of cpu cores to use in parallel

pool: bool, optional

Use Pool for multiprocessing to return a list of created Systems.

kwargs

Other supported keyword arguments

clibool, optional

If is running from command-line. If True, returns exit code instead of System

shellbool, optional

If True, enter IPython shell after routine.

Returns:
System, list of Systems, bool, int, or None

When cli is True, returns an exit code (int). Otherwise: a single System for a one-case run, a list of System (or None for cases that failed to parse) when pool is True, and True as a sentinel from the Process-based multi-case path.

Notes

Copied from the ANDES project: CURENT/andes

Original author: Hantao Cui

License: GNU General Public License v3.0 (GPL-3.0)