Labbench

Latest version: v0.37.0

Safety actively analyzes 628989 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 7

0.33.0

This is a significant API change.

Added
- `labbench.Win32ComDevice.concurrency` (bool value), which controls whether to allow multi-threaded access to the COM library

Changed
- The various types of descriptors supported by Device objects are now known as parameter attributes.
Before, they were called traits. They are encapsulated within the `labbench.paramattr` module.
The definition syntax for existing is otherwise similar:

python
import labbench as lb
from labbench import paramattr as attr

class MyDevice(lb.Device):
frequency: float = attr.value.float(5e9, min=10e6, max=6e9)


Note that the annotation is now required in order to set the parameter on instantiation

- Two new types of `paramattr` descriptors are now available: `method` and `kwarg`. Methods
correspond with callable methods in the owning class. Like `labbench.paramattr.property`
descriptors, `method` descriptors support keyed auto-generation using the `key` argument.
- Fix an exception handling bug in `lb.sequentially`
- Dependency on `coloredlogs` has been removed
- Documentation text and layout improvements
- Tests are now implemented with `pytest` instead of `unittest`, and include coverage analysis.
A runner is available through `pdm tests`, and a badge is linked to in `README.md`.
- `labbench.VISADevice` now supports shortcut connection specifications in addition to standard VISA resource names:
1. Serial number strings
2. Empty resource strings for subclasses that specify `make` and `model`
- python 3.12 installation is now enabled
- `paramattr.method` and `paramattr.property` now support a new keyword argument, `get_on_set`, which triggers
a get operation in the owner device immediately after each set
- `paramattr` descriptors now support a new keyword argument, `notify`, which allows notifications to be disabled

Removed
- `labbench.Device.concurrency`, which was only used by `labbench.Win32ComDevice` (and where it has been added)

0.32

Changed
- Device properties ("private properties") with leading underscore names are no longer automatically
included in output tables. They can still be logged by manually specifying them for logging, for example
`.observe(always=["_property_name"])`.
- `VISADevice.query` now supports a `remap` argument to apply the return value remap as specified by `property.visa_keying`
- Add a boolean `recheck` argument for property declarations that triggers an immediate `get` after each `set`.
This accommodates instruments which perform adjustments of values on the fly.
- Fixes for uncommon multithreading import bugs related to lazy loading

0.31

Changed
- By default, the string mapping for `labbench.VISADevice` boolean properties is now "ON" and "OFF" based on the majority of cases in `ssmdevices`

0.30

Added

Changed
- The instrument drivers in the documentation guide are now self-contained by use of `pyvisa-sim`` backends
- `VISABackend._rm` is now a simple class attribute rather than a trait, so that changes to it propagate to subclasses
- `pyvisa-sim` is now a dependency for development (but not a requirement when installing labbench as a package)
- Cleanups in `VISABackend` and trait debug messages
- Corrected a bug where context entry into a Rack objects missed entry Device objects that had the same name in different Rack children
- Corrected a bug where Rack the full ownership wasn't being properly indicated in log messages
- Removed "options" from `VISABackend`, leaving it to be implemented per-instrument
- Removed unecessary extra writes to output table in `CSVLogger`
- Switched to lazy loading for expensive imports (instead of imports within function namespaces)

Removed
- `SimulatedVISABackend` - instead, use `VISABackend` after calling `visa_default_resource_manager('my-file.ymlsim')`
- `ConfigStore` - this never found traction after 3 years

0.29

Added
- new `adjusted` decorator for changing trait definitions in specialized subclassed Device instances

Changed
- overhaul documentation

0.28.1

Changed
- corrected an import bug

Page 2 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.