write_default_config
[#19]read_config
[#40]write_config_value
[#64]get_brainglobe_dir
[#88]cli_modify_config
[#100]_print_config
[#117]
Check the source code
online
def write_default_config(path=CONFIG_PATH,
template=TEMPLATE_CONF_DICT):
docstring:
Write configuration file at first repo usage. In this way,
we don't need to keep a confusing template config file in the repo.
Parameters
----------
path : Path object
Path of the config file (optional).
template : dict
Template of the config file to be written (optional).
Check the source code
online
def read_config(path=CONFIG_PATH):
docstring:
Read BrainGlobe config.
Parameters
----------
path : Path object
Path of the config file (optional).
Returns
-------
ConfigParser object
brainglobe configuration
Check the source code
online
def write_config_value(key, val, path=CONFIG_PATH):
docstring:
Write a new value in the config file. To make things simple, ignore
sections and look directly for matching parameters names.
Parameters
----------
key : str
Name of the parameter to configure.
val :
New value.
path : Path object
Path of the config file (optional).
Check the source code
online
def get_brainglobe_dir():
docstring:
Return brainglobe default directory.
Returns
-------
Path object
default BrainGlobe directory with atlases
Check the source code
online
def cli_modify_config(key=0, value=0, show=False):
docstring:
no docstring
Check the source code
online
def _print_config():
docstring:
Print configuration.