Skip to content

hertzforge.io.seeds

seeds

Seeds: an analysis object in the open project fills part of a test's setup.

A seed is a conversion (io.setup_convert) from an object the project holds to the part of a test's configuration that object describes, with where it came from. It fills a draft and nothing else: the shell applies its sets to the draft's configuration (each path a dotted member of the configure request, its value put there whole), shows the operator every member that changes before the draft takes it, and the draft then goes through the same configure checks as one typed in.

A protective number (an abort band, a ceiling) taken from an object is never among the sets: it is listed under protective, and the shell fills it only when the operator has typed it. A seed whose module needs a file stored on the control service first (a TWR reference) names the request under imports; the control service checks what it stores as it checks a file the operator picks.

Each seed's origin names the object and its SHA-256 (checksum), and what it filled, so a saved setup says which version of which object it took and the Arm line says so.

The seeds, in the order a person meets them:

======================== ================================== ===================== module object fills ======================== ================================== ===================== random Specification (autospectra) the profile sine SineSweepSpecification (one tone) the profile and test srs ShockSpecification the target and bands classical_shock TransientSpecification or the pulse TimeHistory that is a classical pulse twr TimeHistory or the reference TransientSpecification mimo_random Specification with cross terms the reference and its (through reference_convert) control bands mixed Specification (a floor, with its the parts narrowbands), and the tones a SineSweepSpecification beside it in an object group holds ======================== ================================== =====================

Classes:

Name Description
SeedRefused

An object that cannot seed a module, with the reason.

Functions:

Name Description
checksum

The object's SHA-256: of everything saving it writes, in a fixed

offers

What the open project offers module as seeds: each object of a

seed

The part of module's configuration the object name fills.

apply

config with each of sets put in, in order: a dotted path

fingerprint_matches

Whether the object a seed's origin names is still in project

Classes

SeedRefused

Bases: ValueError

An object that cannot seed a module, with the reason.

Functions:

checksum

checksum(obj: Any) -> str

The object's SHA-256: of everything saving it writes, in a fixed order, so the same object gives the same digest in any session.

offers

offers(project: Any, module: str) -> list[dict[str, Any]]

What the open project offers module as seeds: each object of a kind the module takes, with its kind, what it would fill, the channels (or records) it could be read at, and, for Mixed Mode, the tones beside it. Whether it converts is decided when it is chosen.

seed

seed(project: Any, name: str, module: str, *, channel: str | None = None, record: int = 0, units: str | None = None, tones: str | None = None) -> dict[str, Any]

The part of module's configuration the object name fills.

Parameters:

Name Type Description Default
project Project

The open project.

required
name str

The object.

required
module str

The test module, as a run's manifest names it.

required
channel str

The channel to read a specification at, where its channels differ (Random, SRS, Mixed Mode).

None
record int

The record of a time history (Classical Shock, TWR).

0
units str

The TWR control channel's unit; 'g' when not given.

None
tones str

A Mixed Mode floor's tones, a sine specification in the project.

None

Returns:

Type Description
dict

module; sets, each {path, value} to put into the draft's configuration in order; protective, each {path, value, words} filled only once the operator types it; imports, each {method, params, set} (a request to the control service whose stored reference is then put at set); notes; and origin, {kind: 'seed', object, checksum, fills} (with also naming a second object a Mixed Mode seed read).

Raises:

Type Description
SeedRefused

For a module no seed fills, an object the module does not take, or one it cannot control to, with the reason.

apply

apply(config: Mapping[str, Any], sets: list[Mapping[str, Any]]) -> dict[str, Any]

config with each of sets put in, in order: a dotted path walks objects by member and lists by index, making an object where a member is missing, and its value replaces what was there whole. The shell does the same to its draft (setupFiles/seed.ts).

fingerprint_matches

fingerprint_matches(project: Any, origin: Mapping[str, Any]) -> bool

Whether the object a seed's origin names is still in project with the same SHA-256.