nirs4all.pipeline.config.recipe_source module
Versioned, in-memory original-source envelopes for isolated preparation.
No source file IO, imports of operator references, generator expansion, storage or scientific execution occurs here. This is the restrictive interim profile.
- class nirs4all.pipeline.config.recipe_source.ConstructorProjection(source: SourceEnvelope, recipe: RecipeEncoding)[source]
Bases:
objectExplicit owner-supplied parameter snapshot and separate projection.
- recipe: RecipeEncoding
- source: SourceEnvelope
- class nirs4all.pipeline.config.recipe_source.SourceEnvelope(payload: bytes, digest: str)[source]
Bases:
objectImmutable bytes; each accessor verifies and returns fresh containers.
- nirs4all.pipeline.config.recipe_source.capture_json_source(original: bytes, *, max_bytes: int = 1048576) SourceEnvelope[source]
Preserve exact supplied UTF-8 JSON bytes, including whitespace/order.
- nirs4all.pipeline.config.recipe_source.capture_source(document: Any, *, max_bytes: int = 1048576) SourceEnvelope[source]
Snapshot parsed/Python containers before serializer tuple/key loss.
- nirs4all.pipeline.config.recipe_source.project_constructor(parameters: Any, projector: Callable[[Any], Any]) ConstructorProjection[source]
Precheck exposed raw parameters before invoking an explicit projector.
The caller supplies the owner projection; this helper does not introspect, resolve references, import classes or promise that arbitrary callbacks are safe.
- nirs4all.pipeline.config.recipe_source.read_source(payload: bytes, digest: str) SourceEnvelope[source]
Verify content and conversion provenance without constructing objects.