Repository navigation
QCoDeS 0.61.0 #8576
Jens Hedegaard Nielsen (jenshnielsen)
announced in
Announcements
QCoDeS 0.61.0
#8576
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
QCoDeS 0.61.0 (2026-10-08)
Breaking Changes:
compatibility imports after the conversion to PEP 695 type parameter syntax.
Imports of
typing.TypeVarandtyping.ParamSpecare now banned: use PEP695 type parameter syntax unless a default value requires the corresponding
typing_extensionstype on Python 3.12. Remove deprecated typing compatibility exports #8543Improved:
The documentation on naming instrument drivers (in the Contributor guide and in the
"Creating Instrument Drivers" example notebook) has been updated to state that instrument driver
modules should be named using lower case
snake_case, e.g.weinschel_8320.py. Vendor andmodel capitalization belongs in the class name (
Weinschel8320) and not in the module name. Enable ruff lint N999 #8356Exceptions raised by QCoDeS drivers are now more specific.
The ruff rule
TRY002(raise-vanilla-class) has been enabled. A number of drivers raised abare
Exception; these now raise a specific builtin exception instead. Invalid arguments raiseValueError, using the instrument in an unsupported state raisesRuntimeErrorand selecting anunimplemented acquisition mode on the AlazarTech ATS raises
NotImplementedError. Code thatcatches
Exceptionis unaffected since all of these are subclasses ofException.In addition, two catch-all exception handlers have been narrowed to the specific exceptions that the
guarded code can actually raise: reading a screenshot from the Keysight Infiniium now only handles
OSErrorandVisaIOError, and waiting for the Tektronix AWG5014 to become ready only handlesVisaIOError. Both previously swallowed unrelated errors.Finally, the coding style section of the contributor documentation now points at
ruff checkandruff format, configured inpyproject.toml, rather than the long removedpycodestyleandflake8based workflow. Implement remaining ruff 0.16 lints #8368Adding metadata that SQLite cannot store in a column now fails with a message naming the tag and its type.
A nested dict or a sequence previously surfaced as
sqlite3.ProgrammingError: Error binding parameter 1: type 'list' is not supported, which said nothing about which tag was at fault.validate_dynamic_column_datanow rejects such values with a
TypeErrorsuggesting serialization, alongside its existing checks for invalidtags and
None. Values that NumPy registers a SQLite adapter for, such as scalars and arrays, are unaffected. Fail meaningfully on metadata a column cannot hold #8518Fixed NetCDF export of measurements without setpoint dependencies, including
scalar and array-valued parameters measured with
do0dordond.The exported data retains its shape using parameter-specific dimensions. fix: support NetCDF export without dependencies #8570
A second interrupt during a database write rolls the open transaction back instead of leaving the file locked.
Improved Drivers:
used
castwherepyvisatypes thereturn of
read_binary_values/query_binary_valuesas aSequence[float]regardless of the requested
container. This replaces five type checkersuppressions. More type safe Infiniium driver #8457
New:
Added split raw data storage for the DataSet: an opt-in results
backend selected via the
dataset.raw_data_backendconfig option(set it to
"sqlite_per_dataset_db") that writes raw measurementdata into individual per-dataset SQLite files while keeping all metadata
in the main database. This prevents the main DB file from growing
excessively large and allows users to have a single main SQLite QCoDeS
database on their PC as opposed to many that grow infinitely. When
selected, no results table is created in the main database at all - it
holds only metadata - and all public
DataSetAPIs continue to workunchanged. Backend-specific settings (such as the per-dataset file
folder
raw_data_path) live underdataset.raw_data_backend_config.Management helpers included:
update_raw_data_paths(): update stored paths after raw data fileshave been moved to a new folder.
purge_orphaned_datasets(): find and remove dataset records whoseraw data files no longer exist on disk (
dry_run=Trueby default).cleanup_datasets(): remove datasets (DB records and raw data files)by age, sample name, or file size (
dry_run=Trueby default). feat: split raw data storage into per-dataset SQLite files #8219The method for setting a parameter's cache from a raw value as reported by the
instrument is now public as
Parameter.cache.set_from_raw_value. It is theraw-side counterpart of
Parameter.cache.setand applies the sameconversions as a
get(get_parser,scale,offsetandval_mapping). This is useful for drivers that populate the caches of manyparameters from a single bulk instrument reply without issuing a
getperparameter. The previous private
_set_from_raw_valueis kept as abackwards-compatible alias. Make Parameter cache.set_from_raw_value public #8484
Instruments can now opt in to a logger of their own, rather than sharing a
single logger with every other instrument in the process. Setting the class
attribute
default_logger_scopeto"instrument"makesInstrument.log(and
VisaInstrument.visa_log) use a logger named after the driver class andthe instrument's
name_parts, so that levels, handlers andpropagatecanbe configured per instrument::
The scoped loggers mirror the instrument hierarchy below the module-qualified
driver class. For an instrument
myinstofMyDriver, defined in themodule
vendor.driver, the loggers are named::A submodule is named after the key it is added with in
add_submodule, forexample
my_moduleforself.add_submodule("my_module", MyModule(self)),and not after its own name or class. A submodule that is not added as an
individual submodule, such as a channel that only exists in a channel list, is
named after its own name.
Each logger is a child of the previous one, so a level or handler can be set
for a whole driver class, for everything that belongs to one instrument
(its own messages, its submodules and its VISA traffic), or for a single
submodule or the VISA traffic of one instrument. Setting the level for a whole
driver also works before any of its instruments exist, so it can be configured
via
logger_levelsinqcodesrc.json.Because module-qualified scoped loggers are no longer below
qcodes.instrument.instrument_base, opted-in drivers do not inherit levelsconfigured on that shared logger or on
qcodes.instrument.instrument_base.com.visa.Configure the module-qualified driver class logger instead.
The default is unchanged: without opting in, all instruments keep sharing one
logger exactly as before. Add opt-in per-instrument logger scope (default_logger_scope) #8523
Under the hood:
Enable the ruff rule
N999(invalid-module-name). Instrument driver modules that are part of thepublic
qcodesnamespace are exempted vialint.pep8-naming.extend-ignore-namesinpyproject.tomlso that no public module names change. Test modules with invalid names have been renamed to lower case. Enable ruff lint N999 #8356
CombinedParameter.parameteris now a small dataclass holding thename,full_name,labelandunitof the combined parameter, replacing alambda that had those attributes attached to it. It remains callable, and
calling it returns
Noneas before. Bump github/codeql-action/upload-sarif from 4.37.3 to 4.37.4 #8364Two additional ruff lint rules have been enabled.
TRY004(type-check-without-type-error) ensures that new code raisesTypeErrorwhenrejecting a value because of its type. Existing type checks that raise
ValueErrororRuntimeErrorare unchanged and carry an explicitnoqacomment, sinceTypeErroris not asubclass of either and changing them would break user code that catches the current exception.
S110(try-except-pass) flags exception handlers that silently pass. No behaviour changed as aresult: the only remaining silent handlers are in teardown paths that must never raise or log, and
they are now explicitly marked as intentional. Implement remaining ruff 0.16 lints #8368
Enable the ruff rule
BLE001(blind-except). Places where QCoDeS intentionally catches abroad exception are now explicitly marked, and several catch-all handlers now log the full traceback
using
Logger.exceptionrather than only the exception message. The private module level loggersnamed
_LOGhave been renamed to_LOGGER. style: Enable ruff BLE001 (blind-except) #8498The test suite no longer depends on
deepdiff. The tests that used it now compare the data directlyusing
InterDependenciesequality andnumpy.testing.assert_array_equal. Update agent instructions to prefer prek and uv run #8552This discussion was created from the release QCoDeS 0.61.0.
All reactions