Skip to main content

review.coding.rebuild_page

review.coding.rebuild_page(spec, directory, stage)

The bytes of the page of stage, rebuilt from the files; nothing is written.

A page file is the page that the files give exactly if its bytes equal the result. The first page reads the run directories only. The second page reads the proposals and the own answers, so it can be rebuilt only once the own answers are committed and the proposals pass check: own answer first, as page demands. As page does, it refuses a directory that was started with another version, with the text of page.

Parameters

Name Type Description Default
spec RegenSpec The loaded records of the project. required
directory Path | str The review directory. required
stage str own or final. required

Returns

Name Type Description
bytes bytes The page as page writes it.

Raises

Name Type Description
ConfigurationError If stage is not a stage of a coding, the directory was started with another version, a run changed, a proposal fails (the reason is the problems joined by ;), the own answers are not taken in or not committed, or no run has a proposal.

Examples

from babregen.review.coding import rebuild_page

print(rebuild_page.__name__)
rebuild_page