Skip to main content

review.coding.intake

review.coding.intake(root, directory, file)

Take the downloaded answers of the next stage in, byte for byte.

The file is checked first: its stage is the next one, its format and vocabularies, its page_sha256 equals a rebuild of the page from the inputs, the order of the times, the required reasons and, for the final answers, its previous_sha256 is the hash of answers-own.toml, which must be committed and unchanged. The own answers are taken in without reading any proposal. The file is then copied to answers-own.toml or answers-final.toml.

Parameters

Name Type Description Default
root Path The project root. required
directory Path | str The review directory. required
file Path | str The downloaded coding-<stage>-<hash8>.toml. required

Returns

Name Type Description
tuple[list[Problem], Taken | None] tuple[list[Problem], Taken | None]: The problems and None, or no problems and what was taken in. After the final stage Taken.summary is the table of both answers with the derived values.

Raises

Name Type Description
ConfigurationError If the file of that stage exists already (a stage is taken in once), the stage is out of order, the own answers are not committed, no run has a proposal, or file cannot be read.

Examples

from babregen.review.coding import intake

print(callable(intake))
True