Contrib drivers#
Drivers Nominal accepts on contributor verification rather than direct testing
instro-contrib is a separate package containing drivers that have passed code review but were verified on real hardware by the contributor, not by Nominal. They typically come from one of two sources:
Community contributions: drivers submitted by users who own the hardware and tested locally.
Staff drops: drivers Nominal has written for a device it doesn’t have on hand.
If a driver is in instro-contrib, that means: it type-checks, it has a unit test against a mocked transport, and a Nominal reviewer has read it. It does not mean Nominal has personally run it on the device.
Install#
instro-contrib is published on PyPI and installed via the contrib extra:
$ uv add "instro[contrib]"
or with pip:
(.venv) $ pip install "instro[contrib]"
It’s also included in the all extra. See Installation for the full list of extras.
Import path#
Contrib drivers live under instro.contrib.<category>.drivers.<driver_module>:
from instro.contrib.psu.drivers import SomeVendorPSU
from instro.psu import InstroPSU
psu = InstroPSU(
name="myPSU",
driver=SomeVendorPSU(visa_resource="USB0::..."),
num_channels=1,
)
The category-level class (InstroPSU, InstroDMM, etc.) is always imported from core instro. Only the concrete driver lives in instro.contrib.
Stability expectations#
API may change between releases. A contrib driver’s constructor or behavior may be revised based on user feedback or graduation. Pin to a specific commit if you need a frozen target.
No regression verification by Nominal. A core dependency change (e.g. a
VisaDriverrefactor) might break a contrib driver between releases. The smoke test catches import-level breaks. Behavioral breaks may not surface until you run it.Bugs are accepted as PRs. If you hit a problem with a contrib driver, the fastest path to a fix is usually contributing one: the original author may not be reachable.
Available drivers#
This is the complete set of instro-contrib drivers as of the current release.
Matrix WPS300S-series PSU#
Class: MatrixWPS300S
Import: from instro.contrib.psu.drivers import MatrixWPS300S
Tested against: WPS300S-150-5 (0–150 V, 0–5 A, 300 W)
Protocol: SCPI over RS-232, 9600 baud 8-N-1
Drivers should be added to this list as part of the merge which brings them into the main branch. For pre-release drivers browse packages/instro-contrib/instro/contrib/ or this file in the source GitHub repository.
Graduation to core#
When Nominal acquires the hardware and can verify the driver directly, it moves into core instro. The import path drops .contrib:
# Before (contrib)
from instro.contrib.psu.drivers import SomeVendorPSU
# After graduation (core)
from instro.psu.drivers import SomeVendorPSU
Graduations are noted in CHANGELOG.md. The old instro.contrib import path is a hard cutover. There is no compatibility shim: old code stays broken until the import is updated.
For one release after the graduation, a stub at the old path raises an ImportError that names the destination:
from instro.contrib.psu.drivers import SomeVendorPSU
# ImportError: SomeVendorPSU graduated to core in v1.2. Import it from instro.psu.drivers.
The stub is deleted in the following release, after which the old import fails with a plain ImportError.
Contributing a driver#
See the Contrib Package section of CONTRIBUTING.md for the contribution bar and review process.