From 9f19817514bda21d716b88ca2bebf1052482f5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20C=C3=B4t=C3=A9?= Date: Mon, 6 Jul 2026 21:56:32 -0400 Subject: [PATCH] Document power-meter capability mixins and cooperative init in CHANGELOG Record under [Unreleased] the two API-affecting changes merged in #105: the new powermeters/capabilities.py mixins (WavelengthCalibratable, AutoScalable, ScaleAdjustable) with PowerMeterDevice.capabilities()/hasCapability(), and PhysicalDevice becoming a cooperative init base so capability mixin __init__s run. Both note that no existing device changes behavior. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21ddca7..374b4ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,31 @@ API changes can land even when the minor version is unchanged. ## [Unreleased] +### Added +- Power-meter capability mixins (`powermeters/capabilities.py`), mirroring the + laser-source `Capability` structure: `WavelengthCalibratable` + (`getCalibrationWavelength` / `setCalibrationWavelength`), `AutoScalable` + (`autoScaleIsOn` / `turnAutoScaleOn` / `turnAutoScaleOff`), and + `ScaleAdjustable` (`getScale` / `setScale` / `availableScales`), each + delegating to `do*` hooks the driver implements. `PowerMeterDevice` gains + `capabilities()` and `hasCapability(capabilityClass)` for introspection. + +### Changed +- The wavelength-calibration hooks (`doGetCalibrationWavelength`, + `doSetCalibrationWavelength`) and their public methods move off + `PowerMeterDevice` into the new `WavelengthCalibratable` mixin. The base now + requires only `doGetAbsolutePower`. `IntegraDevice` and `FieldMasterDevice` + declare `WavelengthCalibratable`, so their public API is unchanged; a new + power meter that calibrates by wavelength must now mix in + `WavelengthCalibratable` to expose those methods. +- `PhysicalDevice.__init__` is now a cooperative base: it calls + `super().__init__()` after consuming the device-identity arguments, so a + capability mixin combined with a device (e.g. + `IntegraDevice(PowerMeterDevice, WavelengthCalibratable)`) has its `__init__` + run instead of being skipped by the MRO. A mixin `__init__` must therefore + take no required arguments and call `super().__init__()` itself. No existing + device changes behavior. + ## [1.3.0] - 2026-07-06 ### Added