Report Export¶
reliably.report.render.to_html(report, path=None)
¶
Render a reliability report to HTML using Jinja2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
report
|
Report
|
The report to render. |
required |
path
|
str | Path | None
|
If given, write the HTML to this file. |
None
|
Returns:
| Type | Description |
|---|---|
str
|
HTML string. |
Examples:
>>> from reliably._core.results import Report
>>> r = Report(task="binary", metrics={}, n=100, meta={})
>>> html = to_html(r)
>>> "<html" in html
True
Source code in src/reliably/report/render.py
reliably.report.render.to_markdown(report)
¶
Render a reliability report to a Markdown table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
report
|
Report
|
The report to render. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Markdown string. |
Examples:
>>> from reliably._core.results import Report
>>> r = Report(task="binary", metrics={}, n=100, meta={})
>>> md = to_markdown(r)
>>> "| Metric" in md
True