Models reference #

Every Litmus YAML file, on-the-wire API payload, parquet row, and event-log record is validated against a Pydantic model. This page enumerates those models grouped by source file, plus the shared enum vocabulary they reference.

The per-module field tables and the shared enums section are generated from source — src/litmus/models/*.py and src/litmus/data/models.py. To regenerate after touching the models, run:

uv run python scripts/generate_reference_docs.py models

The hand-written ERD below stays put; it changes only when relationships change shape, not on every field rename.

For conceptual framing of the capability-side models (InstrumentCapability, ProductCharacteristic, SpecBand, Signal, Condition, Control, Attribute, ChannelTopology), see concepts/capabilities. For the event log subclasses of EventBase, see event-types.md.

Shared enums (litmus.models.enums) #

These values are referenced from many of the per-module tables below.

Direction {#enum-direction} #

Direction of signal flow for a capability.

ValueDescription
'input'Signal/sense from DUT
'output'Source/drive to DUT
'bidir'Both (SMU, VNA)
'transform'Signal-path component (amplifier, filter, mixer)

MeasurementFunction {#enum-measurementfunction} #

Named signal measurement/stimulus functions.

ValueDescription
'dc_voltage'
'ac_voltage'
'dc_current'
'ac_current'
'resistance'
'resistance_4w'
'capacitance'
'inductance'
'impedance'
'frequency'
'period'
'temperature'
'waveform'
'dc_power'
'ac_power'
'rf_power'
'rf_cw'
'rf_am'Amplitude modulation of RF carrier
'rf_fm'Frequency modulation of RF carrier
'rf_pm'Phase modulation of RF carrier
'rf_sweep'RF frequency/power sweep
'rf_iq'IQ vector modulation
'rf_pulse'Pulse on/off modulation of RF carrier
's_parameters'
'spectrum'
'phase_noise'
'noise_figure'
'harmonics'
'digital_pattern'
'digital_io'
'serial_data'
'diode'
'continuity'
'dc_ratio'
'quality_factor'
'dissipation_factor'
'time_interval'
'pulse_width'
'duty_cycle'
'rise_time'
'fall_time'
'phase'
'power_quality'
'jitter'
'eye_diagram'
'thd'Total harmonic distortion (also THD+N)
'snr'Signal-to-noise ratio (also SINAD)
'gain'Signal transfer ratio (RF amps, lock-in, signal chain)
'return_loss'S11 magnitude — "return loss > 20 dB"
'insertion_loss'S21 magnitude — "insertion loss < 0.5 dB"
'vswr'Voltage standing wave ratio — "VSWR < 1.5:1"
'group_delay'Phase derivative — "group delay < 2 ns"
'optical_power'
'wavelength'
'humidity'Relative humidity measurement
'charge'Accumulated charge (fC to µC)
'magnetic_field'
'position'
'lock_in_detection'Phase-sensitive AC demodulation
'heater_power'Heater output for cryogenic/furnace controllers
'excitation_current'Precision current for bridge/RTD excitation
'pulse_generation'Precision delay/pulse generator output
'trigger'Trigger signal input/output
'reference_clock'10 MHz reference oscillator I/O
'conductance'DC conductance (G = 1/R, siemens)
'reactance'Reactive impedance component (Ω)
'susceptance'Imaginary admittance (siemens)
'dynamic_load'AC/transient electronic load mode

WaveformShape {#enum-waveformshape} #

Waveform shapes for function generator outputs.

ValueDescription
'sine'
'square'
'triangle'
'ramp'
'pulse'
'arbitrary'
'noise'
'dc'

TerminalRole {#enum-terminalrole} #

Physical terminal on an instrument channel (ATE/IVI standard names).

ValueDescription
'hi'High-side force terminal (positive)
'lo'Low-side / return terminal (negative/ground)
'sense_hi'Remote sense high (Kelvin connection)
'sense_lo'Remote sense low
'guard'Guard terminal (triax center)
'ground'Chassis / earth ground terminal
'signal'Single-ended signal (BNC center, probe tip)
'trigger'Trigger I/O
'hcur'High current (impedance analyzer)
'hpot'High potential (impedance analyzer)
'lcur'Low current (impedance analyzer)
'lpot'Low potential (impedance analyzer)

GroundTopology {#enum-groundtopology} #

How channel grounds relate to each other and earth.

ValueDescription
'floating'Channels isolated from each other (typical PSU)
'shared'All channels share common ground (typical scope, DMM)
'earth'Referenced to earth ground

ConnectorType {#enum-connectortype} #

Physical connector type on instrument.

ValueDescription
'binding_post'
'banana'
'bnc'
'terminal_block'
'probe'
'triax'
'sma'
'smb'
'spring'
'pxi'
'screw_terminal'
'dsub'
'vhdci'
'apc_3.5'
'type_n'
'k_2.4mm'
'v_1.85mm'
'phoenix'
'tekvpi'
'd_sub_9'
'd_sub_15'
'proprietary'

MatchDepth {#enum-matchdepth} #

How deep to check when matching capabilities.

ValueDescription
'function'
'direction'
'range'
'accuracy'
'resolution'

Comparator {#enum-comparator} #

Limit comparators per ATML/IEEE 1671.

ValueDescription
'EQ'
'NE'
'LT'
'LE'
'GT'
'GE'
'GELE'
'GELT'
'GTLE'
'GTLT'

InstrumentType {#enum-instrumenttype} #

Instrument classification vocabulary.

ValueDescription
'dmm'
'oscilloscope'
'function_generator'
'psu'
'ac_power_supply'
'switch'
'power_meter'
'spectrum_analyzer'
'rf_signal_generator'
'upconverter'
'downconverter'
'digitizer'
'counter'
'smu'
'electronic_load'
'daq'
'lcr_meter'
'vna'
'temperature_controller'
'electrometer'
'lock_in_amplifier'
'current_source'
'pulse_generator'
'gaussmeter'

Per-module field tables #

Project & station YAML — litmus.models.project #

ProfileConfig {#model-profileconfig} #

A named config set applied to a pytest session.

FieldTypeDefault
limitsdict[str, MeasurementLimitConfig]{}
sweepslist[SweepEntry][]
mockslist[MockEntry][]
characteristicslist[str][]
connectionslist[str] | dict[str, Any] | NoneNone
retryRetryConfig | NoneNone
promptsdict[str, PromptConfig]{}
runnerdict[str, Any]{}
testsdict[str, TestEntry]{}
descriptionstr | NoneNone
facetsdict[str, str]{}
extendsstr | NoneNone
station_typestr | NoneNone
fixturestr | NoneNone
verify_requires_limitbool | NoneNone

MultiSlotConfig {#model-multislotconfig} #

Multi-slot orchestration knobs.

FieldTypeDefault
child_grace_secondsfloat5.0

ProjectConfig {#model-projectconfig} #

Schema for litmus.yaml project config files — all fields at root.

FieldTypeDefault
namestrrequired
data_dirstr | NoneNone
default_stationstr | NoneNone
default_fixturestr | NoneNone
default_profilestr | NoneNone
mock_instrumentsboolFalse
profilesdict[str, ProfileConfig]{}
runnerdict[str, Any]{}
required_inputsdict[str, PromptConfig]{}
multi_slotMultiSlotConfigvia MultiSlotConfig()

Station — litmus.models.station #

StationInstrumentConfig {#model-stationinstrumentconfig} #

Single instrument entry in a station file.

FieldTypeDefault
typestrrequired
driverstr | NoneNone
resourcestr | NoneNone
catalog_refstr | NoneNone
mockboolFalse
channelsdict[str, str]{}
descriptionstr | NoneNone
mock_configdict[str, Any]{}

StationConfig {#model-stationconfig} #

Schema for stations/*.yaml files — all fields at root.

FieldTypeDefault
idstrrequired
namestrrequired
station_typestr | NoneNone
hostnamestr | NoneNone
locationstr | NoneNone
descriptionstr | NoneNone
instrumentsdict[str, StationInstrumentConfig]{}
supported_phaseslist[str][]

InstrumentConfig {#model-instrumentconfig} #

Configuration for a single instrument in a :class:StationType template.

FieldTypeDefault
typestrrequired
driverstrrequired
resourcestr | NoneNone
settingsdict{}

StationType {#model-stationtype} #

Abstract station-type template (stations/types/*.yaml).

FieldTypeDefault
idstrrequired
descriptionstrrequired
instrumentsdict[str, InstrumentConfig]required
capabilitieslist[str][]

Product — litmus.models.product #

Pin {#model-pin} #

Physical pin/pad on the DUT (ATML: Port).

FieldTypeDefault
namestrrequired
netstr | NoneNone
rolePinRolePinRole.SIGNAL
descriptionstr | NoneNone

BusSignal {#model-bussignal} #

A signal within a bus group.

FieldTypeDefault
pinstrrequired
rolestrrequired
indexint | NoneNone

SignalGroup {#model-signalgroup} #

Grouped signals forming a bus interface (ATML: Bus).

FieldTypeDefault
protocolstrrequired
signalslist[BusSignal][]
parametersdict[str, Any]{}
descriptionstr | NoneNone

ProductCharacteristic {#model-productcharacteristic} #

Product capability + physical interface + traceability (ATML: UUT Characteristic).

FieldTypeDefault
functionMeasurementFunctionrequired
directionDirectionrequired
signalsdict[str, Signal]{}
conditionsdict[str, Condition]{}
controlsdict[str, Control]{}
attributesdict[str, Attribute]{}
unitsstr | NoneNone
bandslist[SpecBand][]
pinstr | NoneNone
pinsstr | list[str][]
netstr | NoneNone
signal_groupstr | NoneNone
datasheet_refstr | NoneNone

Product {#model-product} #

Product definition (ATML: UUT Description).

FieldTypeDefault
idstrrequired
namestrrequired
part_numberstr | NoneNone
basestr | NoneNone
descriptionstr | NoneNone
revisionstr | NoneNone
datasheetstr | NoneNone
schematicstr | NoneNone
driverstr | NoneNone
pinsdict[str, Pin]{}
signal_groupsdict[str, SignalGroup]{}
characteristicsdict[str, ProductCharacteristic]{}

PinRole {#enum-pinrole} #

Role of a physical DUT pin in the test system.

ValueDescription
'signal'Measured/stimulated signal
'ground'Current return / reference
'power'Power input/output (VIN, VOUT)
'reference'Voltage reference, not driven

Product manifest — litmus.models.product_manifest #

FileReferences {#model-filereferences} #

References to files in the product folder.

FieldTypeDefault
datasheetstr | NoneNone
specstr | NoneNone
requirementsstr | NoneNone
station_selectionstr | NoneNone
testsstr | NoneNone

ProductManifest {#model-productmanifest} #

Manifest for a product folder.

FieldTypeDefault
product_idstrrequired
namestrrequired
descriptionstr | NoneNone
current_stepWorkflowStep | NoneNone
completed_stepslist[WorkflowStep][]
filesFileReferencesvia FileReferences()

WorkflowStep {#enum-workflowstep} #

Steps in the datasheet-to-test workflow.

ValueDescription
'parse_datasheet'
'review_spec'
'derive_requirements'
'select_station'
'generate_tests'
'execute_analyze'

Test config (sidecar, markers, limits, fixtures) — litmus.models.test_config #

SweepEntry {#model-sweepentry} #

One sweep level: {argname: argvalues, ...}.

FieldTypeDefault
rootdict[str, list[Any]]required

MockEntry {#model-mockentry} #

One per-test mock — a target plus arbitrary patch.object kwargs.

FieldTypeDefault
targetstrrequired

RetryConfig {#model-retryconfig} #

Runner-neutral retry config — translates to flaky under pytest.

FieldTypeDefault
max_retriesint0
delayfloat0.0
onlist[str] | NoneNone

TestEntry {#model-testentry} #

Recursive node in a sidecar / profile tests: tree.

FieldTypeDefault
limitsdict[str, MeasurementLimitConfig]{}
sweepslist[SweepEntry][]
mockslist[MockEntry][]
characteristicslist[str][]
connectionslist[str] | dict[str, Any] | NoneNone
retryRetryConfig | NoneNone
promptsdict[str, PromptConfig]{}
runnerdict[str, Any]{}
testsdict[str, TestEntry]{}

SidecarConfig {#model-sidecarconfig} #

Top-level shape of a test-module sidecar YAML.

FieldTypeDefault
limitsdict[str, MeasurementLimitConfig]{}
sweepslist[SweepEntry][]
mockslist[MockEntry][]
characteristicslist[str][]
connectionslist[str] | dict[str, Any] | NoneNone
retryRetryConfig | NoneNone
promptsdict[str, PromptConfig]{}
runnerdict[str, Any]{}
testsdict[str, TestEntry]{}

Limit {#model-limit} #

A test limit with units and optional spec reference.

FieldTypeDefault
lowfloat | NoneNone
highfloat | NoneNone
nominalfloat | NoneNone
unitsstrrequired
characteristic_idstr | NoneNone
spec_refstr | NoneNone
comparatorComparatorComparator.GELE

SwitchRoute {#model-switchroute} #

Switch routing for a fixture point.

FieldTypeDefault
switchstrrequired
channelslist[str]required
settling_msfloat0

FixtureConnection {#model-fixtureconnection} #

A named connection on a test fixture.

FieldTypeDefault
namestrrequired
instrumentstrrequired
instrument_channelstr | NoneNone
instrument_terminalstr | NoneNone
descriptionstr | NoneNone
dut_pinstr | NoneNone
netstr | NoneNone
functionMeasurementFunction | NoneNone
routeSwitchRoute | NoneNone

FixtureSlot {#model-fixtureslot} #

A DUT slot within a multi-DUT fixture.

FieldTypeDefault
connectionsdict[str, FixtureConnection]{}
dut_resourcestr | NoneNone
descriptionstr | NoneNone

FixtureConfig {#model-fixtureconfig} #

Test fixture definition (DUT interface).

FieldTypeDefault
idstrrequired
namestr | NoneNone
product_idstr | NoneNone
product_familystr | NoneNone
product_revisionstr | NoneNone
station_typeslist[str][]
dut_resourcestr | NoneNone
connectionsdict[str, FixtureConnection]{}
slotsdict[str, FixtureSlot]{}
descriptionstr | NoneNone

PromptConfig {#model-promptconfig} #

Configuration for operator prompts.

FieldTypeDefault
messagestrrequired
prompt_typeLiteral['confirm', 'choice', 'input']'confirm'
choiceslist[str] | NoneNone
timeout_secondsint | NoneNone

LimitLookupConfig {#model-limitlookupconfig} #

Configuration for lookup-table based limits.

FieldTypeDefault
keystrrequired
tabledict[str, Limit]required
unitsstr | NoneNone

LimitStepConfig {#model-limitstepconfig} #

Configuration for step-function limits.

FieldTypeDefault
paramstrrequired
rangeslist[dict[str, Any]]required

MeasurementLimitConfig {#model-measurementlimitconfig} #

Per-measurement limit policy — direct, characteristic-derived, or banded.

FieldTypeDefault
whendict[str, Any]{}
bandslist[MeasurementLimitConfig][]
lowfloat | NoneNone
highfloat | NoneNone
nominalfloat | NoneNone
unitsstr | NoneNone
characteristic_idstr | NoneNone
spec_refstr | NoneNone
characteristicstr | NoneNone
guardband_pctfloat | NoneNone
comparatorComparator | NoneNone
exprstr | NoneNone
tolerance_pctfloat | NoneNone
tolerance_absfloat | NoneNone
lookupLimitLookupConfig | NoneNone
stepsLimitStepConfig | NoneNone
callablestr | NoneNone

Capabilities (catalog signal/condition/control/attribute) — litmus.models.capability #

RangeSpec {#model-rangespec} #

Specification for measurement or output range.

FieldTypeDefault
minfloat | NoneNone
maxfloat | NoneNone
unitsstr''

PointSpec {#model-pointspec} #

A single numeric value with optional units.

FieldTypeDefault
valuefloatrequired
unitsstr''

ListSpec {#model-listspec} #

A discrete set of allowed values with optional units.

FieldTypeDefault
valueslist[str | float | bool]required
unitsstr''

AccuracySpec {#model-accuracyspec} #

Specification for measurement accuracy.

FieldTypeDefault
pct_readingfloat | NoneNone
pct_rangefloat | NoneNone
absolutefloat | NoneNone
unitsstr | NoneNone

ResolutionSpec {#model-resolutionspec} #

Specification for measurement resolution.

FieldTypeDefault
bitsint | NoneNone
digitsfloat | NoneNone
valuefloat | NoneNone
unitsstr | NoneNone

ChannelTopology {#model-channeltopology} #

Physical topology of a single instrument channel.

FieldTypeDefault
labelstr | NoneNone
terminalslist[TerminalRole][]
connectorConnectorType | NoneNone
connector_pindict[str, int | str] | NoneNone
groundGroundTopologyGroundTopology.SHARED
optionalboolFalse

SpecBand {#model-specband} #

Condition-dependent specification override for a parameter.

FieldTypeDefault
whendict[str, RangeSpec | PointSpec | ListSpec | str | float | bool | list[str | float | bool]]{}
rangeRangeSpec | NoneNone
valuefloat | str | NoneNone
unitsstr | NoneNone
accuracyAccuracySpec | NoneNone
resolutionResolutionSpec | NoneNone
qualifierSpecQualifier | NoneNone

Signal {#model-signal} #

A measurable/sourceable parameter — the primary signal dimension.

FieldTypeDefault
rangeRangeSpec | NoneNone
accuracyAccuracySpec | NoneNone
resolutionResolutionSpec | NoneNone
valuefloat | NoneNone
unitsstr | NoneNone
bandslist[SpecBand] | NoneNone
qualifierSpecQualifier | NoneNone

Condition {#model-condition} #

An operating condition that affects accuracy of other parameters.

FieldTypeDefault
rangeRangeSpec | NoneNone
optionslist[float | str | bool] | NoneNone
unitsstr | NoneNone
defaultfloat | str | bool | NoneNone
bandslist[SpecBand] | NoneNone

Control {#model-control} #

A user-configurable knob or setting.

FieldTypeDefault
rangeRangeSpec | NoneNone
optionslist[float | str | bool] | NoneNone
unitsstr | NoneNone
defaultfloat | str | bool | NoneNone
resolutionResolutionSpec | NoneNone
bandslist[SpecBand] | NoneNone

Attribute {#model-attribute} #

A fixed hardware fact or performance characteristic.

FieldTypeDefault
valuefloat | str | bool | NoneNone
rangeRangeSpec | NoneNone
optionslist[float | str | bool] | NoneNone
unitsstr | NoneNone
bandslist[SpecBand] | NoneNone
qualifierSpecQualifier | NoneNone

Capability {#model-capability} #

What a signal endpoint can do — shared by products and instruments.

FieldTypeDefault
functionMeasurementFunctionrequired
directionDirectionrequired
signalsdict[str, Signal]{}
conditionsdict[str, Condition]{}
controlsdict[str, Control]{}
attributesdict[str, Attribute]{}
unitsstr | NoneNone
bandslist[SpecBand][]

InstrumentCapability {#model-instrumentcapability} #

Instrument capability + channels + operational metadata.

FieldTypeDefault
functionMeasurementFunctionrequired
directionDirectionrequired
signalsdict[str, Signal]{}
conditionsdict[str, Condition]{}
controlsdict[str, Control]{}
attributesdict[str, Attribute]{}
unitsstr | NoneNone
bandslist[SpecBand][]
channelsstr | list[str][]
readbackboolFalse

SpecQualifier {#enum-specqualifier} #

Qualification level for a specification value.

ValueDescription
'guaranteed'
'typical'
'nominal'
'supplemental'

ConditionKey {#enum-conditionkey} #

Canonical keys for the conditions dict on a Capability.

ValueDescription
'frequency'AC measurement frequency band
'temperature'Ambient/operating temperature
'humidity'Relative humidity (specs valid at < 80% RH)
'calibration_interval'Time since last cal (days)
'nplc'Integration time in power line cycles
'auto_zero'Auto-zero ON/OFF state
'coupling'AC/DC coupling mode
'impedance'Input impedance (50Ω vs 1MΩ)
'sense_mode'Local (2-wire) vs remote (4-wire) sense
'sample_rate'Digitizing sample rate
'bandwidth'Measurement bandwidth limit
'filter'Digital filter type/order (affects noise/accuracy)
'gate_time'Counter/integrator gate period
'acquisition_mode'Normal/average/peak-detect/hi-res
'time_constant'Lock-in amplifier tau, controller response
'signal_level'Signal amplitude relative to range
'crest_factor'AC waveform peak-to-RMS ratio
'load'Output load current
'input_voltage'Input/line voltage
'voltage'Operating voltage (derating)
'current'Operating current (derating)
'duty_cycle'Pulsed operation duty cycle
'slew_rate'Programmable rise/fall rate
'settling_time'Transient recovery time
'sensor'Sensor type (RTD/TC/diode, Si/InGaAs detector)
'wavelength'Optical wavelength (accuracy varies by λ)
'offset'Offset frequency (phase noise)

Catalog entry — litmus.models.catalog #

InstrumentCatalogEntry {#model-instrumentcatalogentry} #

Structured capability data for a specific instrument make/model.

FieldTypeDefault
idstrrequired
manufacturerstrrequired
modelstrrequired
namestr | NoneNone
descriptionstr | NoneNone
typestrrequired
basestr | NoneNone
scaffoldboolFalse
driverstr | NoneNone
interfaceslist[str][]
form_factorstr | NoneNone
channelsdict[str, ChannelTopology]{}
attributesdict[str, Attribute]{}
capabilitieslist[InstrumentCapability][]

Instrument record — litmus.models.instrument #

InstrumentInfo {#model-instrumentinfo} #

Instrument identity queried from device.

FieldTypeDefault
manufacturerstr | NoneNone
modelstr | NoneNone
serialstr | NoneNone
firmwarestr | NoneNone

CalibrationInfo {#model-calibrationinfo} #

Calibration status from configuration.

FieldTypeDefault
due_datedate | NoneNone
last_caldate | NoneNone
certificatestr | NoneNone
labstr | NoneNone

InstrumentRecord {#model-instrumentrecord} #

Complete instrument record combining identity and calibration.

FieldTypeDefault
rolestrrequired
instrument_idstrrequired
resourcestrrequired
protocolstr'visa'
infoInstrumentInfovia InstrumentInfo()
calibrationCalibrationInfovia CalibrationInfo()
driverstr | NoneNone
catalog_refstr | NoneNone
mockedboolFalse

ChannelKind {#enum-channelkind} #

Classification for instrument channels/attributes.

ValueDescription
'read'
'set'
'control'
'configure'

Instrument asset — litmus.models.instrument_asset #

InstrumentAssetFile {#model-instrumentassetfile} #

Schema for instruments/*.yaml asset files (per-device identity + calibration).

FieldTypeDefault
idstrrequired
protocolstr'visa'
driverstr | NoneNone
resourcestr | NoneNone
catalog_refstr | NoneNone
infoInstrumentInfovia InstrumentInfo()
calibrationCalibrationInfovia CalibrationInfo()

Runtime data (events, runs, steps, measurements) — litmus.data.models #

StimulusRecord {#model-stimulusrecord} #

Record of a stimulus applied during test execution.

FieldTypeDefault
paramstrrequired
valuefloat | NoneNone
unitsstr | NoneNone
instrumentstr | NoneNone
resourcestr | NoneNone
channelstr | NoneNone
dut_pinstr | NoneNone
fixture_connectionstr | NoneNone

Measurement {#model-measurement} #

A single measurement with optional limit checking.

FieldTypeDefault
namestrrequired
step_pathstr''
valuefloat | Nonerequired
unitsstr | NoneNone
limit_lowfloat | NoneNone
limit_highfloat | NoneNone
limit_nominalfloat | NoneNone
outcomeOutcome | NoneNone
characteristic_idstr | NoneNone
spec_refstr | NoneNone
limit_comparatorstr | NoneNone
timestampdatetimevia _utcnow()
dut_pinstr | NoneNone
instrument_namestr | NoneNone
instrument_resourcestr | NoneNone
instrument_channelstr | NoneNone
fixture_connectionstr | NoneNone

TestVector {#model-testvector} #

A test vector execution with its input parameters and observations.

FieldTypeDefault
idUUIDvia uuid4()
test_step_idUUID | NoneNone
indexint0
paramsdict[str, Any]{}
observationsdict[str, Any]{}
stimuluslist[StimulusRecord][]
retryint0
max_retriesint0
outcomeOutcome | NoneNone
measurementslist[Measurement][]
started_atdatetimevia _utcnow()
ended_atdatetime | NoneNone
error_messagestr | NoneNone

TestStep {#model-teststep} #

A test step containing test vectors.

FieldTypeDefault
idUUIDvia uuid4()
namestrrequired
step_pathstr''
parent_pathstr''
descriptionstr | NoneNone
node_idstr | NoneNone
filestr | NoneNone
modulestr | NoneNone
class_namestr | NoneNone
functionstr | NoneNone
markersstr | NoneNone
started_atdatetimevia _utcnow()
ended_atdatetime | NoneNone
outcomeOutcome | NoneNone
vectorslist[TestVector][]
error_messagestr | NoneNone
instrument_arraysdict[str, list] | NoneNone

CollectedItem {#model-collecteditem} #

A pytest item collected for execution (before any run).

FieldTypeDefault
node_idstrrequired
filestr | NoneNone
modulestr | NoneNone
class_namestr | NoneNone
functionstr | NoneNone
markersstr | NoneNone
step_pathstr''
parent_pathstr''
step_indexint0
vector_indexint0
vector_count_plannedint1

DUT {#model-dut} #

Device under test identification.

FieldTypeDefault
serialstrrequired
part_numberstr | NoneNone
revisionstr | NoneNone
lot_numberstr | NoneNone

RunSummary {#model-runsummary} #

Lightweight run header read from parquet index (no steps/measurements).

FieldTypeDefault
test_run_idstrrequired
session_idstr | NoneNone
slot_idstr | NoneNone
started_atdatetime | NoneNone
ended_atdatetime | NoneNone
dut_serialstr | NoneNone
dut_part_numberstr | NoneNone
product_idstr | NoneNone
station_idstr | NoneNone
station_namestr | NoneNone
station_typestr | NoneNone
station_hostnamestr | NoneNone
fixture_idstr | NoneNone
test_phasestr | NoneNone
operatorstr | NoneNone
outcomestr | NoneNone
total_measurementsint0
total_stepsint0
project_namestr | NoneNone
file_pathstr | NoneNone

TestRun {#model-testrun} #

A complete test run with steps and measurements.

FieldTypeDefault
idUUIDvia uuid4()
session_idUUIDvia uuid4()
started_atdatetimevia _utcnow()
ended_atdatetime | NoneNone
dutDUTrequired
product_idstr | NoneNone
product_namestr | NoneNone
product_revisionstr | NoneNone
station_idstr | NoneNone
station_namestr | NoneNone
station_typestr | NoneNone
station_locationstr | NoneNone
station_hostnamestr | NoneNone
fixture_idstr | NoneNone
test_phasestr | NoneNone
profilestr | NoneNone
profile_facetsdict[str, str]{}
session_inputsdict[str, str]{}
operator_idstr | NoneNone
operator_namestr | NoneNone
git_commitstr | NoneNone
git_branchstr | NoneNone
git_remotestr | NoneNone
project_namestr | NoneNone
outcomeOutcome | NoneNone
stepslist[TestStep][]
collected_itemslist[CollectedItem][]
custom_metadatadict[str, Any]{}
environment_jsonstr | NoneNone

Waveform {#model-waveform} #

Time-series waveform data with metadata.

FieldTypeDefault
t0float0.0
dtfloatrequired
Ylist[float]required
attrsdict[str, Any]{}

Outcome {#enum-outcome} #

Canonical terminal outcome of a measurement / step / run.

ValueDescription
'passed'
'failed'
'skipped'
'errored'
'terminated'
'aborted'
'done'

Channel store records — litmus.data.channels.models #

ChannelDescriptor {#model-channeldescriptor} #

Metadata for a single channel, written once when first seen.

FieldTypeDefault
channel_idstrrequired
data_typestr'scalar'
instrument_rolestr''
resourcestr''
unitsstr | NoneNone
propertiesdict[str, Any]{}
first_seendatetimevia _utcnow()

ChannelSample {#model-channelsample} #

A single channel data point delivered to subscribers.

FieldTypeDefault
channel_idstrrequired
timestampdatetimerequired
valueAnyrequired
unitsstr | NoneNone
sample_intervalfloat | NoneNone
source_methodstr''

HTTP API request shapes — litmus.api.models #

LaunchRequest {#model-launchrequest} #

Request to launch a test run.

FieldTypeDefault
product_idstr | NoneNone
dut_serialstrrequired
station_idstrrequired
test_pathstr'tests'
operatorstr | NoneNone
mock_instrumentsboolFalse

RunStatus {#model-runstatus} #

Status of a test run.

FieldTypeDefault
run_idstrrequired
statusLiteral['pending', 'running', 'completed', 'failed']required
progress_pctint0
current_stepstr | NoneNone

ActiveRun {#model-activerun} #

Public summary of one currently-tracked run.

FieldTypeDefault
run_idstrrequired
statusLiteral['pending', 'running', 'completed', 'failed']required
progress_pctint0
current_stepstr | NoneNone
dut_serialstrrequired
station_idstrrequired

DialogCreate {#model-dialogcreate} #

Request body for creating a dialog.

FieldTypeDefault
typeLiteral['confirm', 'choice', 'input']'confirm'
titlestrrequired
messagestrrequired
run_idstr | NoneNone
step_namestr | NoneNone
timeout_secondsfloat | NoneNone
choiceslist[str] | NoneNone
allow_multipleboolFalse
placeholderstr''
default_valuestr''
confirm_labelstr'Confirm'
cancel_labelstr'Cancel'

DialogRespondRequest {#model-dialogrespondrequest} #

Request body for responding to a dialog.

FieldTypeDefault
confirmedboolFalse
choiceint | NoneNone
choiceslist[int] | NoneNone
valuestr | NoneNone
cancelledboolFalse

SaveRequest {#model-saverequest} #

Request body for saving an entity via the unified save endpoint.

FieldTypeDefault
contentdict[str, Any]required
projectstr | NoneNone

HTTP API response shapes — litmus.api.responses #

RunsListResponse {#model-runslistresponse} #

GET /runs — list of recent runs (denormalized run-level summaries).

FieldTypeDefault
runslist[RunRow]required

MeasurementsListResponse {#model-measurementslistresponse} #

GET /runs/{run_id}/measurements — flat measurement rows.

FieldTypeDefault
measurementslist[dict[str, Any]]required

StepsListResponse {#model-stepslistresponse} #

GET /runs/{run_id}/steps — ordered step rows.

FieldTypeDefault
stepslist[StepRow]required

StepsTreeResponse {#model-stepstreeresponse} #

GET /runs/{run_id}/steps/tree — hierarchical step tree.

FieldTypeDefault
treelist[StepNode]required

RunLaunchResponse {#model-runlaunchresponse} #

POST /runs — kick-off acknowledgement.

FieldTypeDefault
run_idstrrequired
statusLiteral['running']required

ActiveRunsResponse {#model-activerunsresponse} #

GET /active — currently-tracked runs.

FieldTypeDefault
active_runslist[dict[str, Any]]required
countintrequired

DialogsListResponse {#model-dialogslistresponse} #

GET /dialogs — pending operator dialogs.

FieldTypeDefault
dialogslist[dict[str, Any]]required

DialogCreateResponse {#model-dialogcreateresponse} #

POST /dialogs — registration acknowledgement.

FieldTypeDefault
dialog_idstrrequired
statusLiteral['pending']required

DialogRespondAck {#model-dialogrespondack} #

POST /dialogs/{dialog_id}/respond — response acknowledgement.

FieldTypeDefault
statusLiteral['ok']required

ProductsListResponse {#model-productslistresponse} #

GET /products — product summaries (id + label-only fields).

FieldTypeDefault
productslist[dict[str, Any]]required

ProductRequirementsResponse {#model-productrequirementsresponse} #

GET /products/{product_id}/requirements — required capabilities.

FieldTypeDefault
product_idstrrequired
requirementslist[RequirementSummary]required

StationsListResponse {#model-stationslistresponse} #

GET /stations — station summaries.

FieldTypeDefault
stationslist[dict[str, Any]]required

StationCapabilitiesResponse {#model-stationcapabilitiesresponse} #

GET /stations/{station_id}/capabilities — what the station provides.

FieldTypeDefault
station_idstrrequired
capabilitieslist[CapabilitySummary]required

MatchSingleResponse {#model-matchsingleresponse} #

GET /match?product_id=X&station_id=Y — one-station match check.

FieldTypeDefault
product_idstrrequired
station_idstrrequired
compatibleboolrequired

MatchAllResponse {#model-matchallresponse} #

GET /match?product_id=X — all-stations match result.

FieldTypeDefault
product_idstrrequired
stationslist[dict[str, Any]]required

InstrumentTypesResponse {#model-instrumenttypesresponse} #

GET /instruments/types — distinct catalog instrument types.

FieldTypeDefault
instrument_typeslist[str]required

InstrumentAssetsResponse {#model-instrumentassetsresponse} #

GET /instruments/assets — physical-device asset files.

FieldTypeDefault
assetslist[dict[str, Any]]required
countintrequired

MetricsResponse {#model-metricsresponse} #

Shared shape for GET /metrics/* endpoints.

FieldTypeDefault
datalist[dict[str, Any]][]

GenericObjectResponse {#model-genericobjectresponse} #

Permissive passthrough for endpoints that return ad-hoc objects.

(no fields)

Query API row records — litmus.analysis.runs_query #

RunRow {#model-runrow} #

One row from the runs table — denormalized run-level summary.

FieldTypeDefault
file_pathstr | NoneNone
run_idstr | NoneNone
session_idstr | NoneNone
slot_idstr | NoneNone
dut_serialstr | NoneNone
dut_part_numberstr | NoneNone
dut_lot_numberstr | NoneNone
station_idstr | NoneNone
station_namestr | NoneNone
station_hostnamestr | NoneNone
fixture_idstr | NoneNone
outcomestr | NoneNone
started_atdatetime | NoneNone
ended_atdatetime | NoneNone
num_measurementsint | NoneNone
num_stepsint | NoneNone
test_phasestr | NoneNone
product_idstr | NoneNone
operator_idstr | NoneNone
project_namestr | NoneNone

Query API row records (steps) — litmus.analysis.steps_query #

StepRow {#model-steprow} #

One row from the steps table — full denormalized run + step context.

FieldTypeDefault
file_pathstr | NoneNone
run_idstr | NoneNone
session_idstr | NoneNone
slot_idstr | NoneNone
step_indexint | NoneNone
step_namestr | NoneNone
step_pathstr | NoneNone
parent_pathstr | NoneNone
vector_indexint | NoneNone
outcomestr | NoneNone
started_atdatetime | NoneNone
ended_atdatetime | NoneNone
duration_sfloat | NoneNone
has_measurementsbool | NoneNone
measurement_countint | NoneNone
vector_countint | NoneNone
retry_countint | NoneNone
markersstr | NoneNone
dut_serialstr | NoneNone
station_idstr | NoneNone
inputsdict[str, Any]{}
outputsdict[str, Any]{}

StepNode {#model-stepnode} #

One node in a hierarchical step tree, built from step_path.

FieldTypeDefault
stepStepRowrequired
childrenlist[StepNode][]

Query API facets & filters — litmus.analysis.measurement_facets #

FacetSpec {#model-facetspec} #

Self-describing definition of one filter facet.

FieldTypeDefault
columnstrrequired
kindFacetKindrequired
enum_classtype[StrEnum] | NoneNone
labelstrrequired
descriptionstr''

FacetOption {#model-facetoption} #

One pickable value within a facet, with the row count it covers.

FieldTypeDefault
valuestrrequired
countintrequired

SummaryCounts {#model-summarycounts} #

Cardinality stats for the cardinality badge — single query result.

FieldTypeDefault
total_rowsintrequired
distinct_runsintrequired
distinct_measurementsintrequired
distinct_productsintrequired

ParametricRow {#model-parametricrow} #

One long-format row from a scatter / line / bar parametric query.

FieldTypeDefault
xfloat | str | datetime | date | NoneNone
yfloatrequired
groupstr''

HistogramRow {#model-histogramrow} #

One bin in a histogram result. x is the bin midpoint.

FieldTypeDefault
binintrequired
xfloatrequired
yintrequired
groupstr''

FilterSet {#model-filterset} #

Current filter state — URL-shareable, validated against MEASUREMENT_FACETS.

FieldTypeDefault
string_filtersdict[str, list[str]]{}
enum_filtersdict[str, list[str]]{}
sincedate | NoneNone
untildate | NoneNone

FacetKind {#enum-facetkind} #

How a facet's options are sourced and displayed in the UI.

ValueDescription
'enum'
'string'
'date'

Entity-relationship diagram #

erDiagram
    %% ============================================
    %% CAPABILITIES MODULE (Shared Enums & Types)
    %% ============================================
 
    Direction {
        INPUT string
        OUTPUT string
        BIDIR string
        TRANSFORM string
    }
 
    MeasurementFunction {
        dc_voltage string
        ac_voltage string
        dc_current string
        ac_current string
        resistance string
        resistance_4w string
        frequency string
        waveform string
        dc_power string
        temperature string
        rf_power string
        rf_cw string
        digital_io string
        optical_power string
        etc string
    }
 
    Comparator {
        EQ string
        NE string
        LT_LE_GT_GE string
        GELE_etc string
    }
 
    MatchDepth {
        function string
        direction string
        range string
        accuracy string
        resolution string
    }
 
    SpecBand {
        when dict
        range RangeSpec
        value float_or_str
        units string
        accuracy AccuracySpec
        resolution ResolutionSpec
        qualifier SpecQualifier
    }
 
    Signal {
        range RangeSpec
        accuracy AccuracySpec
        resolution ResolutionSpec
        value float
        units string
        bands list
        qualifier SpecQualifier
    }
 
    Condition {
        range RangeSpec
    }
 
    Control {
        range RangeSpec
        options list
        units string
        default string
    }
 
    Attribute {
        value string
        units string
    }
 
    InstrumentCapability {
        function MeasurementFunction
        direction Direction
        signals dict
        conditions dict
        controls dict
        attributes dict
        channels list
        readback bool
    }
 
    InstrumentCatalogEntry {
        id string
        manufacturer string
        model string
        name string
        type string
        channels dict
        capabilities list
    }
 
    ChannelTopology {
        label string
        terminals list
        connector string
        ground string
    }
 
    %% ============================================
    %% PRODUCTS MODULE
    %% ============================================
 
    Product {
        id string PK
        name string
        part_number string
        base string
        description string
        revision string
        datasheet string
    }
 
    Pin {
        name string PK
        net string
        role PinRole
        description string
    }
 
    PinRole {
        signal string
        ground string
        power string
        reference string
    }
 
    SignalGroup {
        protocol string
        signals list
        parameters dict
    }
 
    ProductCharacteristic {
        function MeasurementFunction
        direction Direction
        units string
        pin string
        net string
        signal_group string
        datasheet_ref string
        signals dict
        conditions dict
        controls dict
        attributes dict
        bands list FK
    }
 
    %% ============================================
    %% CONFIG MODULE — Station & Instruments
    %% ============================================
 
    StationConfig {
        id string PK
        name string
        station_type string FK
        location string
        station_hostname string
        instruments dict
        supported_phases list
    }
 
    StationType {
        id string PK
        description string
        instruments dict
        capabilities list
    }
 
    StationInstrumentConfig {
        type string
        driver string
        resource string
        catalog_ref string
        mock bool
        channels dict
        description string
        mock_config dict
    }
 
    %% ============================================
    %% CONFIG MODULE — Fixtures
    %% ============================================
 
    FixtureConfig {
        id string PK
        name string
        product_id string FK
        product_family string
        product_revision string
    }
 
    FixtureConnection {
        name string PK
        dut_pin string FK
        net string
        instrument string FK
        instrument_channel string
        instrument_terminal string
    }
 
    %% ============================================
    %% TEST CONFIGURATION — sidecar YAML next to test files
    %% ============================================
    %% Tests are code-driven (pytest classes/functions in tests/test_*.py).
    %% A sidecar YAML co-located with each test file carries vectors,
    %% limits, mocks, retry, prompts as a recursive tests: tree.
 
    SidecarConfig {
        limits dict
        sweeps list
        mocks list
        characteristics list
        connections any
        retry RetryConfig
        prompts dict
        runner opaque
        tests dict
    }
 
    TestEntry {
        limits dict
        sweeps list
        mocks list
        characteristics list
        connections any
        retry RetryConfig
        prompts dict
        runner opaque
        tests dict
    }
 
    SweepEntry {
        params dict
    }
 
    MockEntry {
        target string
        return_value any
    }
 
    RetryConfig {
        max_retries int
        delay float
        on list
    }
 
    PromptConfig {
        id string PK
        message string
        prompt_type string
        choices list
        timeout_seconds int
    }
 
    Limit {
        low float
        high float
        nominal float
        units string
        spec_ref string FK
        comparator Comparator
    }
 
    %% ============================================
    %% DATA MODULE — Test Results
    %% ============================================
 
    TestRun {
        id uuid PK
        session_id uuid
        started_at datetime
        ended_at datetime
        dut DUT
        product_id string
        station_id string FK
        station_hostname string
        fixture_id string
        test_phase string
        profile string
        outcome Outcome
        steps list
    }
 
    DUT {
        serial string PK
        part_number string
        revision string
        lot_number string
    }
 
    TestStep {
        id uuid PK
        name string
        step_path string
        parent_path string
        outcome Outcome
        vectors list
    }
 
    TestVector {
        id uuid PK
        index int
        params dict
        observations dict
        stimulus list
        retry int
        outcome Outcome
        measurements list
    }
 
    StimulusRecord {
        param string
        value float
        units string
        instrument string
        resource string
        channel string
        dut_pin string
        fixture_connection string
    }
 
    Measurement {
        name string
        value float
        units string
        limit_low float
        limit_high float
        limit_nominal float
        limit_comparator string
        outcome Outcome
        dut_pin string
        instrument_name string
        instrument_resource string
        instrument_channel string
        fixture_connection string
    }
 
    Outcome {
        passed string
        failed string
        skipped string
        errored string
        aborted string
        terminated string
        done string
    }
 
    %% ============================================
    %% RELATIONSHIPS
    %% ============================================
 
    %% Product structure
    Product ||--o{ Pin : "has"
    Product ||--o{ SignalGroup : "has"
    Product ||--o{ ProductCharacteristic : "has"
    ProductCharacteristic ||--o{ SpecBand : "has specs"
    ProductCharacteristic }o--o{ Pin : "applies to"
 
    %% Capability relationships
    InstrumentCapability }o--|| Direction : "has"
    InstrumentCapability }o--|| MeasurementFunction : "has"
    Signal ||--o{ SpecBand : "bands"
    InstrumentCapability ||--o{ Signal : "has"
    InstrumentCapability ||--o{ Condition : "has"
    InstrumentCapability ||--o{ Control : "has"
    InstrumentCapability ||--o{ Attribute : "has"
    InstrumentCatalogEntry ||--o{ InstrumentCapability : "provides"
    InstrumentCatalogEntry ||--o{ ChannelTopology : "has channels"
    ProductCharacteristic }o--|| Direction : "has"
    ProductCharacteristic }o--|| MeasurementFunction : "has"
 
    %% Station structure
    StationType ||--o{ StationInstrumentConfig : "requires"
    StationConfig }o--|| StationType : "based on"
    StationConfig ||--o{ StationInstrumentConfig : "has"
    StationInstrumentConfig ||--o{ InstrumentCapability : "provides"
 
    %% Fixture structure
    FixtureConfig }o--o| Product : "for"
    FixtureConfig ||--o{ FixtureConnection : "has"
    FixtureConnection }o--o| Pin : "connects"
    FixtureConnection }o--|| StationInstrumentConfig : "routes to"
 
    %% Test configuration (sidecar YAML)
    SidecarConfig ||--o{ TestEntry : "tests:"
    SidecarConfig ||--o{ SweepEntry : "sweeps:"
    SidecarConfig ||--o{ MockEntry : "mocks:"
    SidecarConfig ||--o{ Limit : "limits:"
    SidecarConfig ||--o{ PromptConfig : "prompts:"
    SidecarConfig }o--o| RetryConfig : "retry:"
    Limit }o--o| ProductCharacteristic : "from"
 
    %% Test execution results
    TestRun ||--|| DUT : "tests"
    TestRun }o--|| StationConfig : "on"
    TestRun ||--o{ TestStep : "contains"
    TestStep ||--o{ TestVector : "contains"
    TestVector ||--o{ StimulusRecord : "has inputs"
    TestVector ||--o{ Measurement : "measurements"
    Measurement }o--|| Outcome : "has"
    TestVector }o--|| Outcome : "has"
    TestStep }o--|| Outcome : "has"
    TestRun }o--|| Outcome : "has"

Capability matching at a glance #

# Product defines what it needs tested
product.characteristics["output_voltage"]
    → function: dc_voltage
    → direction: OUTPUT   # DUT provides voltage
 
# Station instruments provide capabilities
station.instruments["dmm_main"]
    → capabilities: [
        InstrumentCapability(function=dc_voltage, direction=INPUT,
            signals={voltage: Signal(range=RangeSpec(min=0, max=1000))})
      ]
 
# Match: function ✓, direction pair (OUTPUT↔INPUT) ✓, range contains 3.3V ✓

See concepts/capabilities for the full matching story.

See also #