Skip to content

Python API

The generated reference below documents the checker exports in ReproReady 0.2.0.

check_path

Inspect one regular file without executing it.

Parameters:

Name Type Description Default
source str | PathLike[str]

Path to the file to inspect.

required

Returns:

Type Description
CheckReport

A typed report for the completed or represented inspection outcome.

CheckReport

Findings, review items, unsupported content, partial coverage, source

CheckReport

mutation, and represented worker failures still return a report.

Raises:

Type Description
CheckInputError

If top-level input admission rejects the path. See CheckInputError.code for the stable reason.

Unexpected internal exceptions propagate.

CheckReport

A typed view of one schema-shaped checker report.

Attributes:

Name Type Description
schema_version str

Version of the machine-readable report contract.

tool_version str

ReproReady version that created the report.

ruleset_version str

Version of the checker ruleset.

artifact Mapping[str, object]

Saved artifact identity and snapshot record.

runtime Mapping[str, object]

Saved operating-system, Python, and parser versions.

limits Mapping[str, object]

Effective and reached inspection limits.

inventory_status str

Overall saved inventory status.

members tuple[CheckMember, ...]

Inventory members in deterministic report order.

inventory_issues tuple[Mapping[str, object], ...]

Saved inventory-level issue records.

source_index tuple[Mapping[str, object], ...]

Saved source records in deterministic report order.

rule_results tuple[Mapping[str, object], ...]

Ordered result record for every rule.

to_dict

to_dict() -> dict[str, object]

Return the retained report dictionary without copying it.

The checker does not reread or reinspect the input. The returned dictionary and its nested records are borrowed from this report and must be treated as read-only.

CheckMember

One inventory member from a completed checker document.

Attributes:

Name Type Description
container_id str

Stable identifier for the containing ZIP.

member_id str

Stable identifier for this inventory member.

parent_member_id str | None

Identifier of the parent member for nested content.

name str

Decoded member name retained in the report.

duplicate_ordinal int

One-based occurrence among entries with this name.

kind str

Recorded member kind.

compressed_size int | None

Compressed byte size when available.

expanded_size int | None

Expanded byte size when available.

read_status str

Recorded member read outcome.

integrity_status str

Recorded member integrity outcome.

issues tuple[Mapping[str, object], ...]

Saved issue records for this member.

CheckInputError

Bases: Exception

A top-level checker input rejected with a stable, sanitized reason.

code is one of source_not_found, source_not_accessible, top_level_link, not_regular_file, or unsupported_system. message never includes a host path or raw operating-system exception.

Attributes:

Name Type Description
code

Stable machine-readable rejection reason.

message

Sanitized explanation suitable for display.