Skip to content

WaveBench v0.4.2

Choose a tag to compare

@Scaxlibur Scaxlibur released this 05 May 12:25
· 479 commits to master since this release

WaveBench v0.4.2 Release Notes / 发布说明

中文

WaveBench v0.4.2 是一个保守的小版本,重点是给已经接入的信号源、电源和 run plan 增加第一层软件安全上限,并改善 PyVISA 通信失败时的命令行错误呈现。

新增

  • 新增 [safety_limits] 配置区:
    • max_source_vpp:限制信号源 Vpp 写操作。
    • max_power_voltage_v:限制电源设定电压。
    • max_power_current_limit_a:限制电源限流值。
  • source set-vppsource arb-loadpower set 会在写仪器前检查安全上限。
  • run plan 会在创建 run 目录和连接仪器前静态检查 run plan 中的 source/power 超限步骤。
  • run checkrun verify 也会结合当前配置检查安全上限;通过时 run check 输出 safety_limits=ok / 安全上限=通过
  • source output onpower output on 会先读取当前设定值;如果当前幅度、电压或限流超出配置上限,则拒绝打开输出。

修复

  • PyVISA 的 query/write/binary query/*OPC? 失败现在会包装为 WaveBench 的用户可读错误,不再泄露 Python traceback。

验证

  • 本地测试:171 passed
  • GitHub CI:Python 3.11 / 3.12 均通过。
  • 保守验证:
    • 使用不存在的 VISA resource 验证超限路径先返回安全错误,没有进入连接仪器。
    • 使用实际 DG4202 CH2 验证:当当前 CH2 为 5 Vpp,而 max_source_vpp = 2.0 时,source output on 会在写输出前拒绝,并保持设备状态不变。
    • 验证低于安全上限时不会被误拦截;后续 I/O timeout 会被包装成 wavebench: 用户错误。

English

WaveBench v0.4.2 is a conservative patch release focused on adding first-layer software safety limits for the existing source, power, and run-plan paths, plus cleaner CLI errors for PyVISA communication failures.

Added

  • Added the [safety_limits] config table:
    • max_source_vpp: caps signal-generator Vpp write operations.
    • max_power_voltage_v: caps power-supply voltage setpoints.
    • max_power_current_limit_a: caps power-supply current-limit setpoints.
  • source set-vpp, source arb-load, and power set now check safety limits before instrument writes.
  • run plan now statically checks source/power limit violations before creating a run directory or connecting to instruments.
  • run check and run verify also apply the configured safety limits; successful run check prints safety_limits=ok / 安全上限=通过.
  • source output on and power output on read current setpoints first; if the current amplitude, voltage, or current limit exceeds the configured limits, WaveBench refuses to enable output.

Fixed

  • PyVISA query/write/binary-query/*OPC? failures are now wrapped as user-readable WaveBench errors instead of leaking Python tracebacks.

Validation

  • Local tests: 171 passed.
  • GitHub CI: Python 3.11 / 3.12 passed.
  • Conservative validation:
    • Verified with intentionally nonexistent VISA resources that over-limit paths return safety errors before instrument connection.
    • Verified against a real DG4202 CH2: with CH2 currently at 5 Vpp and max_source_vpp = 2.0, source output on is rejected before writing output state, leaving the instrument unchanged.
    • Verified that under-limit paths are not falsely blocked; subsequent I/O timeouts are wrapped as wavebench: user errors.