build_qx_registry#

qx_registry_build.build_qx_registry(*, core_python_root: Optional[Union[str, pathlib.Path]] = None, core_registry_yaml: Optional[Union[str, pathlib.Path]] = None, build_core: bool = True, build_extensions: bool = True, extensions: Optional[str] = None, extension_registry_filename: str = 'qx_commands.yaml', extension_python_subdir: str = 'python', extension_matlab_subdir: str = 'matlab', extension_bash_subdir: str = 'bash') → Tuple[qx_registry.Registry, List[Tuple[str, pathlib.Path]]]#

build_qx_registry()

Build core registry at $QUNEXPATH/qx_commands.yaml (python + matlab + bash for core), and build each extension registry at <ext_root>/qx_commands.yaml (python + matlab + bash if present).

An extension is found under $QUNEXPATH/qx_extensions, under $TOOLS/qx_extensions, or under a folder named in $QUNEXEXTENSIONSFOLDERS. Its registry is written beside its code and is what makes its commands visible to QuNex, so an extension has to be built once before it can be used.

Parameters

--core_python_root (str, default ''):

The folder to index the core python commands from. Defaults to $QUNEXPATH/python.

--core_registry_yaml (str, default ''):

The file to write the core registry to. Defaults to $QUNEXPATH/qx_commands.yaml.

--build_core (str, default 'yes'):

Whether to build the core registry. Set to 'no' to leave the core registry alone and build only the extensions, which is what an extension author wants and what a read-only installation requires.

--build_extensions (str, default 'yes'):

Whether to build the registry of every extension found. Set to 'no' to build only core.

--extensions (str, default ''):

Which extensions to build, as a comma separated list of names given with or without the qx_ prefix. 'all', or leaving it out, builds every extension found. A name matching no extension is an error naming the extensions that were found.

--extension_registry_filename (str, default 'qx_commands.yaml'):

The name of the registry file written inside each extension.

--extension_python_subdir (str, default 'python'):

The folder inside an extension holding its python commands.

--extension_matlab_subdir (str, default 'matlab'):

The folder inside an extension holding its MATLAB commands.

--extension_bash_subdir (str, default 'bash'):

The folder inside an extension holding its bash commands.

Returns

--registry (tuple):

A tuple with elements: (core_registry, built_extensions) where built_extensions = [(extension_id, registry_yaml_path), ...]