Skip to content

hertzforge.service.reports

reports

Reports on the connection's project: the report, built from a starter template bound to the project's objects, shown as the page the core writes, and saved as a file (report.*).

The page is the core's own (report.render_html): one HTML document with its stylesheet, data and viewers inline and nothing loaded from a network, so the shell shows it in a sandboxed frame exactly as a reader of the exported file sees it.

Functions:

Name Description
generate

report.generate: a report built from template, bound by type to

run_template

The template of the test the project's run record is a run of;

render

The report name as the HTML page the core writes, in theme and

page_views

The report name as the shell's own page draws it

export_checks

What is asked about before a report leaves the project: with

export

report.export: the page written to path (.html added when it

edit_page

report.editor: the report's edit page and its pane

operate

report.operate: one of the editor's operations, then the edit

print_page

report.print: the reader's page, light, as it is printed: drawn at

issue

report.issue, in three steps around the print the shell makes.

Functions:

generate

generate(project: Any, params: Mapping[str, Any]) -> str

report.generate: a report built from template, bound by type to the project's objects (Project.generate_report); its name.

run_template

run_template(project: Any) -> str

The template of the test the project's run record is a run of; refused when the project holds no run record, or records of runs of different tests, or a test with no template of its own.

render

render(project: Any, params: Mapping[str, Any], method: str = 'report.render', units: Any = None) -> str

The report name as the HTML page the core writes, in theme and the unit system units (the core's default when None).

page_views

page_views(project: Any, params: Mapping[str, Any], units: Any = None) -> dict[str, Any]

The report name as the shell's own page draws it (report.views.page_blocks): its title and marking, and each drawn block as text, an unbound slot, or a figure's protocol views, in the unit system units.

export_checks

export_checks(project: Any, name: str) -> dict[str, Any]

What is asked about before a report leaves the project: with skeleton sections on, the sections (a flash report's parts) the report still owes; with the data index on, every indexed file hashed again and those that do not match the checksum indexed, each with what the check found. {'owed': [...], 'index': [{'name', 'status'}]}, both empty when nothing is asked.

export

export(project: Any, params: Mapping[str, Any], units: Any = None) -> dict[str, Any]

report.export: the page written to path (.html added when it has another suffix); {'path'}, the path written. Written beside the target and renamed over it, so a failed write leaves an earlier file whole. First the checks (export_checks): a report that still owes sections or whose indexed files do not all match is not written unless anyway; the answer then carries owed and index and no path, for the shell to ask "Export anyway?". The page is the one printed and issued, and refused when the report was issued and has changed since. Written, the answer's note says what the page leaves out and what the check found (_written_note).

edit_page

edit_page(project: Any, params: Mapping[str, Any], units: Any = None) -> dict[str, Any]

report.editor: the report's edit page and its pane (report_editor.editor).

operate

operate(project: Any, params: Mapping[str, Any], units: Any = None) -> dict[str, Any]

report.operate: one of the editor's operations, then the edit page and pane again with the block it leaves selected.

print_page

print_page(project: Any, params: Mapping[str, Any], units: Any = None) -> dict[str, Any]

report.print: the reader's page, light, as it is printed: drawn at print resolution and asking for the print dialog once its figures are drawn, where the reader saves a PDF. Its print stylesheet carries the margins the identity rides in (report.identity.MARGINS). {'html', 'owed', 'index'}. First the checks an export makes (export_checks): unless anyway, a report that owes sections or whose indexed files do not all match answers with them and html null, for the shell to ask. With browser true the page is also opened in the default browser, which prints it, and its path is opened (_in_browser). Refused when the report was issued and has changed since.

issue

issue(project: Any, params: Mapping[str, Any], units: Any = None) -> dict[str, Any]

report.issue, in three steps around the print the shell makes. begin checks the report can be issued (issue_ready) and gives the page to print, which says issued, opened in the browser as well with browser true; the report itself is unchanged. record reads the PDF printed from it at path, records the issue with the SHA-256 of the PDF and of the page (record_issue), which is what makes the report issued, and gives the record's entry. cancel forgets the page.