Labbench

Latest version: v0.37.0

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

Scan your dependencies

Page 4 of 7

0.23.2

Changed
- Corrected another calibrate bug in which calibrate_from_table was not initialized, this time in setting values

0.23.1

Changed
- A separate log of the Rack input parameters at the time of each new_row is now output in data loggers
- Corrected a calibration bug in which calibrate_from_table was not initialized

0.23

Added
- `lb.trait_info` function: returns a dictionary of all trait definitions in a `lb.Device` instance
- numeric trait types now have `calibrate_from_table` and `calibrate_from_expression` methods

Changed
- The cli is now packaged in the cli directory to skip some unecessary imports
- Many bugfixes in the cli
- Corrected an exception to the call signature of Rack methods
- All trait events are now logged
- Numerous small bugfixes
- Corrected misreporting 'min' and 'max' as None
- Device.resource is now defined with cache=True
- the CLI tool now drops to a pdb prompt on exceptions in `run` or `open`
- decode bytes to UTF-8 in metadata summary export, to avoid a json error
- exceptions are now raised after all parent `close` methods have been invoked in Rack or Device

0.22.2

Changed
- Fixed some bugs generating config files with `labbench` cli

0.22.1

Changed
- Fixed platform portability problems in installing `labbench` cli

0.22

**API incompatible with labbench<=0.20 after major refactor**

Added
- Unit tests for lb.concurrently and lb.sequentially in test_concurrently.py
- `lb.NonScalar` trait type
- `lb.hide_in_traceback` decorator scrubs the decorated function from tracebacks
- `lb.Rack`, which also replaces `lb.Testbed`
- `lb.Coordinate`, which defines methods for `Rack` as a sequence of other functions with mixed threading
- `lb.HDFLogger` for output to an HDF file
- `lb.ShellBackend` replaces `lb.CommandLineWrapper`, and is defined by settings annotations

Changed
- Default values of Device value traits can now be set by passing keyword arguments when subclassing
- Show warnings on trait assignment typos like `device.frequency = 5` instead of `device.state.frequency = 5`
- `state` or `settings` traits can be defined directly in a `labbench.Device` class. Settings are defined as annotations ('`:`') and states are defined with assignment ('`=`')
- Add first 40 lines of CommandLineWrapper output to debug logs
- Removed logger warnings when calls to CommandLineWrapper.kill() do not kill any process
- Tightened the message about a pending exception in lb.concurrently
- The arguments and return value of sequentially have been corrected to match those in concurrently
- Testbed objects now support entering contexts of specified types first, which are listed (in order) by the new enter_first class attribute
- concurrently and sequentially now raise an exception of two callables have the same name; specify a different name with a keyword argument instead to avoid naming conflicts
- text file outputs in relational databases are now encoded as utf-8
- Removed Trait parameters `command`, `default_value`, `read_only`, and `write_only`; replaced with Trait parameters `key`, `default`, `settable`, `gets`, `allow`
- Removed Device methods `__get_state__`, `__set_state__`; added methods `get_key`, `set_key`
- Replaced Device methods `connect` and `disconnect` with `open` and `close` to more closely match python convention
- Support for updating default values of settings in subclasses as annotations
- Reduced import time by waiting to import heavier packages pyvisa and pandas
- lb.notebook is no longer pulled in by default; importing it now injects wrappers around builtins.range and np.linspace
- `host_log.txt` is now in YAML
- `CommandLineWrapper` is now `ShellBackend`
- Renamed the `logger` attribute to `_console` in Rack and Device to reduce the confusing overuse of the word "logger"
- `lb.BoundedNumber` (and subclasses `lb.Int`, `lb.Float`) now support creating derived Traits that act as arithmetic transformations, calibration against `device.setting`, and calibration against lookup tables
- `feather-format` is now an explicit dependency, because it is no longer (always?) pulled in by `pyarrow`
- Logger messages are only emitted after exceptions on the first attempt now in `lb.retry` and `lb.until_timeout`
- Added support for language changes in python 3.8

Removed
- FilenameDict and ConcurrentRunner, which have been deprecated for a while
- `limit_exception_depth`, which is redundant with `hide_in_traceback`
- `lb.Testbed`
- `lb.CommandLineWrapper`, which replaces `lb.ShellBackend`
- `lb.range`, `lb.linspace`, `lb.progress_bar`, which are out of scope and provided by other modules (e.g., tqdm)

Page 4 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.