Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

brainprep.reporting.rst_reporting.trace_module_calls

brainprep.reporting.rst_reporting.trace_module_calls(root_module_names=('workflow', 'interfaces'))[source]

Return the trace of function calls from the specified module and its submodules.

This function walks through the current call stack and filters out frames whose module name starts with the given root module names.

Parameters:
root_module_namestuple[str]

The root module name to filter by (e.g., ‘interfaces’). All submodules like ‘brainprep.interfaces.submodule’ will be included. Default (‘workflow’, ‘interfaces’).

Returns:
trace: str

A string representing the chain of function calls from the specified modules, joined by ‘->’.

Notes

This uses the module name from the frame’s global context, which is more reliable than filenames when working with packages.