Annotations
@report

@report

Report Decorator

Summary:

The report decorator supports Python cell reporting functions on the Morph platform. Using this decorator, strings returned from the function are interpreted as Markdown format and displayed as formatted text on the dashboard.

Functions:

  • Processes the string returned by the function as Markdown and renders it on the dashboard.
  • Ensures that the output of the function is a string, and raises an error if it is not.

Return value:

  • str: a string in Markdown format. This string is rendered on the dashboard and displayed as a report.

Usage example:

from morphdb_utils.annotations import report
 
@report
def main(data: Dict[str, pd.DataFrame]):
    return generate_report(
        refs=[ref("python60096")],
        prompt="" # fill in prompt for report,
        language="en"
    )

report