Generating a custom report with the Juice Reporting Engine

I’ve been trying out the Juice reporting engine to generate a standardized report, and wanted to share what I learned, as well as what the reporting-engine files may look like for more complex report than the example Juice ships with out of the box. As a test case I chose to report on (mock) coherence times, since that’s something we’re actively tracking in the lab right now.

The reporting engine itself is a part of Juice (orangeqs.juice.reporting) and is used to turn whatever data you point it at into a reproducible, shareable report via the make_report() command, a templating engine, and a download link, so you don’t have to build the rendering/generation machinery yourself. It’s deliberately generic and can be pointed at any of the underlying data rather than being tied to one specific source.

The data I’m using sits in the InfluxDB database, and originates from coherence times measured on a mock device via the superconducting-qubit-tools simulator.

Getting the initial example report running was straightforward — following the reporting engine tutorial, it’s just a couple of lines in a Python console:


from orangeqs.juice.reporting import make_report

make_report()

The one non-obvious part was the best way to view it. I initially went straight to the file browser in jupyterlab to try to preview, however in the end I found it better to use the download button/link which appears right in the terminal where you ran make_report(). Download it, unzip it, then open the .html file inside in your browser. Not sure if there is a better way to view the report? The reports folder can also get quite large if more and more reports are made, but that seems an issue for the future.

From there, extending the example templates into something more complex (coherence-time reporting) was also easy. The initial templates provided, along with Copilot’s help writing the data aggregation and formatting logic, led to a quick custom report. Below is a snip of the final result.

I have attached a zip with my reports folder (so one can view the whole thing), along with the custom template and data-processing files I used.


reports.zip (65.3 KB)

1 Like