hertzforge.report.flash¶
flash
¶
The flash report: the one preliminary page a customer leaves the test
with (report feature flash_report).
The full report takes days, because the data are reviewed before it is written; the program cannot wait that long to know where it stands. With the feature on, the report is drawn as one page built from what the project already holds, in the order its reader asks:
- PRELIMINARY across the top, with the sentence that the results are subject to data review and that the test report supersedes the page;
- the identification (
report.identity), its status Preliminary on the page and in every printed margin, with the people authorizing it and a blank line for each signature; - the headline: each requirement read against its run so far
(
report.requirement.read), one line per run, with how many of its criteria were met against which document and the criteria not met and not judged, by name. With the featurerun_sectionson, each line is labeled by its run's axis, run and level (report.runs) and the lines follow the order the runs were run. The lines are results as read on the day, never a statement of conformity, and the page says so; - as run against the plan: the deviations of the findings register
(
report.findings) by number, or "No deviations." where the author set them to None; - what is open: the anomalies and nonconformances by number, each with its status, its fact and its disposition (who owns it), then the condition of the article on release;
- the opinions given at the console, each marked as an opinion and attributed;
- what happens next, with the date the test report is due.
With a run log brought into the project (Project.attach_run_log),
the page gains a short part of its own, From the Run Log, before what
happens next, kept to what the page does not already say: for each
extract, which log, test and entry it holds (with its badge when the
log has newer entries), the runs so far with how each ended, the holds
open, the anomalies open that the findings register does not hold,
with their owners, the opinions given at the console that the page
does not record in the same words, and the checklists with lines still
owed. A long list stops at LISTED and says how many more the log
holds. Each is read from the extract as it was taken (only the badge
looks at the live file), and a kind the log holds none of is said to be
held none of by the log at its entry, never to have been none. The
page's own parts stay the author's: the opinions the page records, the
condition on release and what happens next are still typed, and still
owed until they are. So a day with a run log still prints on one
sheet, the part is set small and the page a little tighter while it is
on it (LOG_CSS); a page without a run log keeps its own style.
Nothing on the page is invented. The condition on release, the
opinions, what happens next and the report's date are typed by the
author (enter) and kept with the report's identity, so a report
template, which carries only the laboratory's fields, never passes one
test's page to the next. Anything the project does not hold is drawn as
owed (NOT YET WRITTEN, with what belongs there) and listed by check,
which the export asks about and which stands in the way of issuing the
page. The decision to send it stays the author's.
The feature needs Requirement and results, Identity and issue and the Findings register; the register lives in the skeleton's deviations section, so the skeleton is on too, but its sections are not drawn: the flash report is the page.
Functions:
| Name | Description |
|---|---|
held |
What the author has typed for the page: each of |
enter |
Type the parts of the flash report only the author can write. |
headline |
The headline's lines, plain text: one per requirement of the |
check |
What the flash report still owes before it is issued, one line |
log_lines |
What a run log extract adds to |
log_html |
The run log's part of |
page_blocks |
The flash report as the page's blocks, each a text block already |
Functions:¶
held
¶
What the author has typed for the page: each of TYPED that is
entered, 'opinions' (a list of {'by', 'text'}) and 'opinions_none'
(True when the author said none were given).
enter
¶
enter(report: Any, *, condition: str | None = None, next_steps: str | None = None, report_date: str | None = None, opinions: Sequence[Any] | None = None, opinions_none: bool | None = None) -> None
Type the parts of the flash report only the author can write.
condition is the article's condition on release, next_steps what
happens next, and report_date the date the test report is due,
each a str ('' clears it). opinions replaces the opinions given at
the console, each (by, text) or a mapping of by and text; an
opinion is recorded with who gave it. opinions_none True says no
opinion was given, False takes that back. A part left as None is
not changed.
Refused before anything changes: the feature off; a value of the wrong type; an opinion without its words or without who gave it; and opinions entered together with None said of them.
Raises:
| Type | Description |
|---|---|
ValueError
|
For a refusal; the message names the part and the reason. |
TypeError
|
When a value is of the wrong type. |
headline
¶
headline(report: Any, objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> list[str]
The headline's lines, plain text: one per requirement of the
report read against its run, in the order the runs were run with
the feature run_sections on (each labeled by its run identity),
else in the report's order (each labeled by the record it reads).
A requirement whose specification or run is not in the project is
left out, as the page leaves out a block that does not resolve; one
that cannot be read says nothing was judged, and why. Empty when no
requirement is read.
check
¶
check(report: Any, objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> list[str]
What the flash report still owes before it is issued, one line each, in the page's order: the identification's fields not entered, the headline when no requirement is read, each kind of finding neither entered nor set to None, each finding's fact and its approval or disposition not written, the typed parts not written, and the opinions neither recorded nor set to None. Empty when the page owes nothing.
Raises ValueError when the feature is off: there is then no flash
report to check, and an empty list would read as one complete.
log_lines
¶
What a run log extract adds to report's flash page, kept to what
the page does not say already: ([(title, lines)], [kinds held none
of]).
The parts are the runs so far with how each ended, the holds open
(by what each asks), the anomalies open that the findings register
does not hold under their number, with their owners, the opinions
given at the console that the page does not record in the same
words, and the checklists with lines still owed, each with how many.
A part with more than LISTED lines lists that many and says how
many more the log holds. A part the log holds none of is not drawn;
its kind is named in the second list, so the page says the log
holds none by its last entry, never that there was none.
log_html
¶
The run log's part of report's flash page, drawn as HTML: for
each run log extract in objects, a line citing its log, test and
entry (with the extract's badge when the log has newer entries),
then a line for each part of log_lines and one for what the log
holds none of. '' when objects holds no extract, so the page is
as it was.
page_blocks
¶
page_blocks(report: Any, objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> list[dict[str, Any]]
The flash report as the page's blocks, each a text block already
drawn as HTML (joined with no white space between tags, since the
page keeps a text block's white space): the PRELIMINARY line across
the top, the identification, the headline, the deviations, what is
open, the opinions, what the run log holds (log_html, only with a
run log extract in the project), and what happens next closed by the
end mark.