Skip to content

Log: v0.4.1 — Test Coverage Expansion & Multi-Python CI

Issues closed: #93, #94, #97

Overview

A quality and reliability release filling the last unit test gaps across the driver layer and expanding CI to validate across all supported Python versions. No new features — just making sure what's already there is proven to work.

Unit Tests: Rohde & Schwarz Drivers (tests/test_rs.py)

Closes #94RohdeSchwarzSG and RohdeSchwarzSA now have comprehensive unit test coverage (21 tests).

RohdeSchwarzSG

  • preset() sends *RST, enables display-off in automation-optimized mode, and skips it when not
  • set_frequency() and set_amplitude() produce correct SCPI command strings via format_frequency and format_power
  • set_output() sends :OUTP ON / :OUTP OFF
  • set_mod_state() correctly dispatches AM, FM, PULSE, and the PULM alias
  • start_sweep() sends all four SCPI parameters plus :FREQ:MODE SWE
  • configure_list_sweep() serializes frequency and power lists and sets :FREQ:MODE LIST

RohdeSchwarzSA

  • preset() sends *RST
  • set_center_freq(), set_span(), set_rbw(), set_vbw() format values correctly through the base helpers
  • peak_search() sends :CALC:MARK1:MAX
  • get_marker_amplitude() parses the query response into a MeasurementResult with dBm unit
  • get_trace_data() configures :FORM REAL,32, disables continuous sweep, and returns a MeasurementResult

Unit Tests: Prologix GPIB-USB Bridge (tests/test_prologix.py)

Closes #93PrologixDriver now has 11 unit tests covering the full bridge initialization and command protocol.

  • connect() sends all four initialization commands in order: ++mode 1, ++auto 0, ++eoi 1, ++addr {n} — verified as raw strings without SCPI newline appended (Prologix ++ commands are exempt from the newline rule in write())
  • set_gpib_address() updates the attribute and sends ++addr {n}
  • query() appends ++read eoi after the SCPI command and strips whitespace from the response
  • write() appends \n to SCPI commands, does not double-append if already present, and leaves ++ commands untouched

Multi-Python CI Matrix

Closes #97.github/workflows/main.yml now uses a strategy.matrix across Python ["3.9", "3.10", "3.11", "3.12"].

  • Single-version Set up Python 3.10 step replaced with Set up Python ${{ matrix.python-version }}
  • All four versions run the full lint + test pipeline in parallel on every push and PR to main

Test Count

Total: 188 tests passing across all Python versions (up from 156 before this release).