|
2 | 2 | neuroscout |
3 | 3 |
|
4 | 4 | Usage: |
5 | | - neuroscout run <bundle_id> [-dn -o <out_dir> -i <install_dir> --n-cpus=<n> --work-dir=<dir> --dataset-name=<name>] |
6 | | - neuroscout install <bundle_id> [-dn -i <install_dir>] |
| 5 | + neuroscout run <outdir> <bundle_id>... [options] |
| 6 | + neuroscout install <bundle_id>... [-n -i <install_dir>] |
7 | 7 | neuroscout ls <bundle_id> |
8 | 8 | neuroscout -h | --help |
9 | 9 | neuroscout --version |
10 | 10 |
|
11 | 11 | Options: |
12 | 12 | -i <install_dir> Directory to download dataset and bundle [default: .] |
13 | | - -o <out_dir> Output directory [default: bundle_dir] |
14 | 13 | --work-dir=<dir> Working directory |
15 | 14 | --n-cpus=<n> Maximum number of threads across all processes [default: 1] |
16 | 15 | -n, --no-download Dont download dataset (if available locally) |
17 | 16 | --dataset-name=<name> Manually specify dataset name |
18 | 17 | -h --help Show this screen |
19 | 18 | -v, --version Show version |
20 | | - -d, --debug Debug mode |
21 | 19 |
|
22 | 20 | Commands: |
23 | 21 | run Runs a first level, group level, or full analysis. |
24 | 22 | install Installs a bundle and/or dataset. |
25 | 23 | ls Lists the available files in a bundle's dataset. |
26 | 24 |
|
27 | 25 | Examples: |
28 | | - neuroscout run 5xh -n |
| 26 | + neuroscout run 5xhaS /out -n |
| 27 | + neuroscout run 5xhaS 38fdx /out |
29 | 28 |
|
30 | 29 | Help: |
31 | 30 | For help using this tool, please open an issue on the Github |
|
36 | 35 |
|
37 | 36 | from docopt import docopt |
38 | 37 | from . import __version__ as VERSION |
39 | | -import logging |
40 | 38 | import sys |
41 | 39 |
|
42 | 40 | def main(): |
43 | 41 | # CLI entry point |
44 | 42 | import neuroscout_cli.commands |
45 | 43 | args = docopt(__doc__, version=VERSION) |
46 | 44 |
|
47 | | - if args.get('--debug'): |
48 | | - logging.basicConfig(level=logging.DEBUG) |
49 | | - |
50 | 45 | for (k, v) in args.items(): |
51 | 46 | if hasattr(neuroscout_cli.commands, k) and v: |
52 | 47 | k = k[0].upper() + k[1:] |
53 | 48 | command = getattr(neuroscout_cli.commands, k) |
54 | | - command(args).run() |
| 49 | + if k in ['Run', 'Install']: |
| 50 | + bundles = args.pop('<bundle_id>') |
| 51 | + # Loop over bundles |
| 52 | + for b in bundles: |
| 53 | + print("Running bundle {}".format(b)) |
| 54 | + args['<bundle_id>'] = b |
| 55 | + command(args).run() |
55 | 56 | sys.exit(0) |
0 commit comments