cli_tools
PROCESS I/O CLI
help_opt = click.help_option('-h', '--help')
module-attribute
scan_opt = click.option('--scan', type=int, help='Scan to select')
module-attribute
mfile_arg = click.argument('mfiles', nargs=(-1), type=(click.Path(exists=True, path_type=Path)))
module-attribute
LazyGroup
Bases: Group
Lazily load click command groups to reduce cli load times
We dont import all things unless required
Source code in process/core/io/cli_tools.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
lazy_subcommands = lazy_subcommands or {}
instance-attribute
list_commands(ctx)
List available commands
Source code in process/core/io/cli_tools.py
65 66 67 68 69 | |
get_command(ctx, cmd_name)
Get available commands
Source code in process/core/io/cli_tools.py
71 72 73 74 75 | |
mfile_opt(exists=False)
Click option for an mfile filepath
Source code in process/core/io/cli_tools.py
15 16 17 18 19 20 21 22 23 24 | |
indat_opt(default='IN.DAT', exists=True)
Click option for an indat filepath
Source code in process/core/io/cli_tools.py
27 28 29 30 31 32 33 34 35 36 | |
save(help_)
Click save option
Source code in process/core/io/cli_tools.py
39 40 41 | |
split_callback(ctx, param, value)
Callback to split a string on spaces and colons
Source code in process/core/io/cli_tools.py
44 45 46 | |