Command line interface module¶
This module contains all classes and functions required to run the scaffold from the command line.
- class bsb.cli.ReplState[source]¶
Stores the REPL state and executes each step of the REPL.
- close_hdf5()[source]¶
Closes the currently open HDF5 file.
- Raises
ParseError – Raised if there’s no open HDF5 file.
- Return type
None
- open_hdf5(args)[source]¶
Callback function that handles the
open hdf5
command.- Parameters
args (Namespace) – Result of ArgumentParser.parse_args()
- Return type
None
- open_morphology_repository(args)[source]¶
Callback function that handles the
open mr
command.- Parameters
args (Namespace) – Result of ArgumentParser.parse_args()
- Return type
None
- set_next_state(state)[source]¶
Set the next REPL state.
- Parameters
state (string) – The next state. For each state there should be a set_parser_``state``_state function (e.g.
set_parser_base_state()
).- Return type
None
- set_parser_base_hdf5_state()[source]¶
Adds the HDF5 state subparsers and arguments to the REPL parser.
- set_parser_base_mr_state()[source]¶
Adds the morphology repository state subparsers and arguments to the REPL parser.
- bsb.cli.check_positive_factory(name)[source]¶
Return a function to report whether a certain value is a positive integer. If it isn’t, raise an ArgumentTypeError.
- bsb.cli.repl_plot_morphology(morphology_repository, args)[source]¶
Callback function that handles
plot
command in the base_mr state.
- bsb.cli.repl_view_hdf5(handle, args)[source]¶
Callback function that handles
view
command in the base_hdf5 state.
- bsb.cli.repl_voxelize(morphology_repository, args)[source]¶
Callback function that handles
voxelize
command in the base_mr state.