call_report.fca.layout.parse_layout#
- call_report.fca.layout.parse_layout(*, path: Path) FCALayout[source]#
Parse a
D_<ROOT>.TXTlayout file into an FCALayout.Handles the quirks that appear in FCA’s published releases: windows-1252 encoding, a literal tab before a field, a lowercase
"numeric"keyword, and a trailing** NOTE ...block describing the multi-occurrence columns.- Parameters:
- pathpathlib.Path
Path to the
D_<ROOT>.TXTfile.
- Returns:
- FCALayout
The parsed layout.
- Raises:
- LayoutParseError
If the file’s multi-occurrence-column pattern does not match one of the three known scenarios.
Examples
>>> from call_report.core import ReportingPeriod >>> from call_report.fca.transport import PackagedArchiveTransport >>> transport = PackagedArchiveTransport() >>> release_dir = transport.resolve( ... period=ReportingPeriod.from_period_end(value="2026-03-31") ... ) >>> layout = parse_layout(path=release_dir / "D_RCB.TXT") >>> layout.scenario 'single_multiple'