femic.tsr_catalog

BC TSR document indexing helpers.

Functions

build_tsr_overlay_report(*, overlay_path)

Summarize one reviewed overlay against its canonical candidate summary.

extract_tsr_candidate_facts(*, ...[, ...])

Extract reviewable TSR candidate facts from cached PDFs.

fetch_tsr_pdfs(*, documents_path, ...[, ...])

Fetch/cache TSR PDFs referenced by the canonical TSA documents inventory.

init_tsr_overlay(*, instance_root, ...[, ...])

Create a reviewed/adopted TSR overlay skeleton for one TSA instance.

index_tsr_tsa_surfaces(*[, landing_url, ...])

Crawl BC TSR TSA surfaces into canonical registry and document metadata.

load_tsr_document_inventory(path)

Load the canonical TSR TSA documents inventory JSON.

load_tsr_overlay(path)

Load one reviewed/adopted TSR overlay YAML file.

write_tsr_index(result, output_root)

Write canonical TSR registry and document inventory JSON outputs.

Classes

TsrCandidateFact(tsa_id, tsa_code, tsa_name, ...)

One extracted TSR candidate fact with lightweight provenance.

TsaRegistryRecord(tsa_id, tsa_code, ...)

Canonical metadata for one TSA folder in the TSR corpus.

TsrCacheError

Raised when TSR document inventory or PDF fetch/cache work fails.

TsrCacheFailure(tsa_id, source_url, ...)

One failed TSR PDF fetch attempt.

TsrCatalogError

Raised when TSR pages cannot be crawled or parsed.

TsrCycleRecord(cycle_label, cycle_year, url, ...)

One TSA TSR cycle directory.

TsrDownloadedPdf(tsa_id, tsa_code, tsa_name, ...)

One fetched or cache-hit TSR PDF with provenance details.

TsrDocumentRecord(tsa_id, tsa_code, ...)

One discovered TSR document file under a TSA cycle.

TsrExtractError

Raised when cached TSR PDFs cannot be parsed into candidate facts.

TsrExtractResult(generated_utc, ...)

Result payload for one TSR candidate-fact extraction run.

TsrExtractionFailure(tsa_id, ...)

One failed candidate-fact extraction attempt.

TsrFetchResult(generated_utc, ...)

Result payload for a TSR PDF fetch/cache run.

TsrInventoryDocument(tsa_id, tsa_code, ...)

One document record loaded from the canonical TSA documents inventory.

TsrIndexResult(generated_utc, landing_url, ...)

Canonical TSR crawl result for TSA surfaces.

TsrLandingResource(title, url, document_type)

One general TSR landing-page resource.

TsrOverlayCanonicalSummary(...)

Canonical candidate-fact summary surfaced into the reviewed overlay.

TsrOverlayError

Raised when TSR overlay initialization or reporting fails.

TsrOverlayInitResult(overlay_path, tsa, ...)

Result payload for TSR overlay initialization.

TsrOverlayRecord(schema_version, tsa, ...)

Reviewed/adopted per-instance TSR overlay payload.

TsrOverlayReport(overlay_path, tsa, ...)

Comparison of canonical candidate facts vs adopted instance overlay state.

TsrOverlayTsaRecord(tsa_id, tsa_code, tsa_name)

Canonical TSA identity used by instance-local TSR overlays.

TsrWrittenIndex(output_root, registry_path, ...)

Paths written by the canonical TSR index exporter.