Source-specific parser skeletons should be introduced only after parser contracts and source discovery boundaries are clear.
This document defines the boundary for future source-specific parser skeletons before any source-specific parser implementation is added.
A source-specific parser skeleton may name a source family and demonstrate parser wiring, but it should not introduce real parsing behavior unless a later task explicitly scopes that work.
A future source-specific parser skeleton may:
- Accept source-agnostic parser inputs or pre-supplied artificial records.
- Return
ParserResult. - Attach
ParserIssuewarnings or errors. - Document source-family identity.
- Remain deterministic in tests.
- Use artificial fixtures only until real parsing is explicitly scoped.
A source-specific parser skeleton must not add by default:
- Real file parsing.
- Real DEFRA/DESNZ format assumptions.
- Real factor values.
- Source-owner data validation.
- Normalization.
- Persistence.
- Scheduler or retry behavior.
- Downloading or remote access.
- Compliance, legal, or correctness determination.
ExampleInMemoryParser is source-agnostic and artificial. It accepts caller-supplied records and returns ParserResult without reading files or interpreting source-specific formats.
A future source-specific parser skeleton may introduce source-family naming, but it should still avoid real format logic unless that behavior is explicitly scoped in a later task.
ExampleSourceSpecificParser is the current artificial source-specific parser skeleton. It labels parser output with caller-provided source-family metadata and accepts only caller-supplied artificial records.
See examples/example_source_specific_parser_usage.py for a deterministic usage example built from caller-supplied artificial records.
See DEFRA/DESNZ Parser Skeleton Boundaries before adding any DEFRA/DESNZ parser skeleton.
DefraDesnzParser is a DEFRA/DESNZ-labelled artificial parser skeleton and should remain within that boundary until real parsing is explicitly scoped.
See examples/defra_desnz_parser_usage_example.py for the corresponding artificial DEFRA/DESNZ parser usage example.
No DEFRA/DESNZ parser exists yet.
Current DEFRA/DESNZ work is limited to local fixture discovery and artificial fixture manifest metadata. Real parsing requires separate explicit tasks.
Future source-specific parser skeleton PRs should confirm:
- No file reads are added unless explicitly scoped.
- No real source data is added.
- No format assumptions are added.
- No normalization or persistence behavior is introduced.
- The local public safety script passes.
- Tests are deterministic.
- Parser output remains
ParserResult.
Conservative sequencing should be:
- Artificial source-specific parser skeleton.
- Source-specific parser usage example.
- Fixture-only parser input model.
- Real format parser boundary documentation.
- Real parser implementation only after explicit scope.
Each step should stay separate from downloading, persistence, scheduling, retry behavior, and runtime orchestration.
flowchart LR
contract["ParserContract"]
example["ExampleInMemoryParser"]
skeleton["FutureSourceSpecificParserSkeleton"]
real_parser["FutureRealParserImplementation"]
contract --> example
example --> skeleton
skeleton --> real_parser