Labbench

Latest version: v0.37.0

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

Scan your dependencies

Page 1 of 7

0.37.0

Changed
- `labbench.VISADevice.overlap_and_add` now supports an additional argument to use
an alternative query for the end of an overlap-and-add block
- Fixed a type hinting bug specific to python 3.10

Removed
- `labbench.notebook` module, which was bitrotten and unsupported

0.36.0

Changed
- Replaced `GitPython` dependency with pure-python `dulwich` to simplify packaging and avoid a
separate (and undocumented) `git` installation requirement
- Corrected another remapping bug

0.35.3

Changed
- Fix a bug where visa_adapter with remap={True...} could insert the remapped value for True when given numeric values of 1

0.35.2

Changed
- Corrected a bug that could leave `sets=True` and `gets=True` in property and method
paramattr descriptors in cases where getter and setter (respectively) were unimplemented

0.35.1

Added
- Paramattr now supports a new boolean keyword argument, `inherit`, which takes
defaults for the other paramattr keyword arguments from the paramattr in the parent
of the owning class. This is meant to replace the role of `labbench.paramattr.adjusted`,
which did not update the type hints properly for default values of Device constructors.
- `lb.shell_options_from_keyed_values` has been separated from its private implementation in
`lb.ShellBackend`, and given options to better generalize its applicability. It generates
lists of command line option strings based on descriptors defined with `key`.

Changed
- Corrected bugs in the simplified display of tracebacks
- Fixed a bug in network address string validation
- Reduced module import time through better use of lazy loading
- Fixed an argument passing bug in `labbench.VISADevice.query_ascii_values`
- The default VISA resource manager is now 'ivi' if an underlying library is available
- `labbench.ShellBackend` no longer supports dict arguments. Instead, use `lb.shell_options_from_keyed_values`
to generate a list of strings.
- `labbench.ShellBackend` no longer has a `binary_path` configuration value. Users of `labbench.ShellBackend` should
now explicitly pass the binary name (either path or object in the system PATH) to `labbench.ShellBackend.run()`.
- The existence of the `resource` value descriptor has been removed from `labbench.Device`, and is now only
included explicitly in subclasses that require connection information
- All `labbench.paramattr.value` descriptors now support the `kw_only` argument. For descriptors that are annotated
in owning classes for use as constructor argument, this determines whether the argument should be treated as
keyword-only (as opposed to "keyword or positional" that allows positional arguments).
- multiple inheritance is now supported for paramattr descriptors in `labbench.Device` and `labbench.paramattr.HasParamAttrs`

Deprecated
- `labbench.paramattr.adjusted`, due to type hinting bugs

Removed
- `labbench.HDFLogger`, which was not used and which was unable to pass tests or store metadata in a portable way
- `labbench.util.LabbenchDeprecationWarning`, an unused stub

0.34.0

Changed
- In order to better align `labbench.paramattr.property` and `labbench.paramattr.method` with each other and the rest of the ecosystem,
decorator implementation for these attributes now follows [python's built-in syntax for properties](https://docs.python.org/3/library/functions.html#property). For example, to implement getters and setters for a property named `number` or a method named `flag`:
python
import labbench as lb
from labbench import paramattr as attr

class MyDevice(lb.Device):
attr.property.float(min=0)
def number(self) -> float:
...

number.setter
def _(self, new_value: float):
...

attr.method.bool()
def flag(self):
...

flag.setter
def _(self, new_value: bool):
...

- Fixed bounds-checking bugs in calibration-corrected parameter attributes
- Because notifications are required to properly implement calibration corrections, the `notify` constructor argument of paramattr has been replaced with `log`. The scope of that behavior now limited to (and implemented by) the loggers.
- `labbench.paramattr.kwarg` is now `labbench.paramattr.method_kwarg`, in order to clarify the intent when decorating a device class
- Switched to hatch for project management, integrating testing across python versions

Removed
- `labbench.paramattr.register_key_argument` was removed in favor of directly decorating Device classes with `labbench.paramattr.method_kwarg`

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.