Changelog¶
Version 0.16.0-alpha.1¶
This section was edited by an LLM (Claude Opus 5.5) for Constantine Evans, from entries partly written with LLM assistance. Changes are relative to 0.15.3.
qslib¶
Instrument messages of several lines, which the instrument wraps in a tag such as
<quote.message>, are now received whole, without the tag. Only their first line was kept before.Added qslib-server as a
Machinebackend.backend="qslib"selects HTTP andbackend="auto"probes once during construction. HTTP defaults to port 7500. Direct SCPI remains the default. If you previously selected HTTP withserver_portalone, addbackend="qslib"orbackend="auto". Replace the file-transferfastandfallbackarguments with the intended backend when creating the machine.Machine.ensure_serverdeploys a supplied ARMv7 binary from a SCPI machine object.Machine.ensure_servernow uses qs-monitor’s deployment code, which has moved into the Rust library. A server it starts writes its output to<remote_path>.log, keeping the previous log as<remote_path>.log.1, and its process is recorded in<remote_path>.pid(qs-monitor used to write<remote_path>.qs-monitor.pid), so that qs-monitor can stop and replace it. A process running fromremote_paththat does not answer is not replaced. The Machine’spasswordis passed to the server in its environment, not on its command line.remote_pathandfile_rootmay contain only letters, digits and/._:-, andlistenmust be an IP address and port.Experimental QuantStudio 6 Pro support for firmware 1.4.0. The implementation was largely LLM-generated and has only been tested against one instrument.
On the QuantStudio 6 Pro,
Machine.run_statusno longer asks for the current operation (OPeration?), which has not been tried on that model, so a paused run is reported there asRunning.Machine.restart_systemrefuses to restart during a run unless givenforce=True, asrestart_machinealready did, over direct SCPI and through qslib-server. Their documentation describes what the instrument’s recovery does with a run interrupted this way.Fixed
Protocol.dataframenaming its cycle and step index levels the wrong way round. The index is nowstage, cycle, step, point, as the data always was.Removed the
monitorextra and theqs-monitorconsole script, whose module was not part of the package. qs-monitor is a separate program (see below).Removed
Machine.generate_random_key. ItsRAND?command means different things on different firmware versions: on 1.3.2 it returns a random number, not an access key.Linux wheels are now built for manylinux 2.28 (glibc 2.28 or later), rather than manylinux 2014.
AbortRunallows two minutes for the instrument’s reply while it cleans up the run.Machine.run_commandaccepts an explicit reply timeout for other long-running SCPI commands.When the instrument’s
AbortRunfails with an internal error orNoSuchFlagafter the run has stopped,Machine.abort_current_runand the qslib-server abort action now succeed, after a cleanup of qslib’s own: clearingroicontextand aborting each remaining flag, waiting at most 10 seconds for each. This is what the end ofAbortRundoes in firmware 1.6.1, and is done on every version, althoughAbortRunin 1.3.2 and 1.5.1 does neither. The internal error comes from a race in the instrument firmware’sTBC:UNHOLD, which fails when the hold it cancels ends at the same moment, so it can happen on instruments as well as on the simulator.Machine.stop_current_runover direct SCPI returns once the instrument shows that the stop has been requested, as qslib-server now does. The instrument replies toStopRunonly when the run stops at the end of its current cycle, so it used to wait for the cycle to end, and raisedTimeoutErrorif that took more than ten minutes although the stop had worked.Allowed Polars 2. Sample names are now joined to fluorescence data without reordering the readings, which Polars 2 otherwise did. The tests run with Polars 2 and with Polars 1.21, the oldest version allowed.
Stage.stepped_ramp(points_per_step=n)now emitsnseparate steps rather than one step repeatedntimes. The instrument runs a repeated step synchronously, so its temperature hold did not overlap acquisition and each point took about twice as long as asked for, silently stretching the run. The temperatures and the requested timing are unchanged.Protocol.validatenow warns about a collecting step with a repeat, for the same reason.Added
Step.ramp_rate, a percentage of the run-mode ramp rate, serialized as theRAMP -rateoption. It must be positive, and a rate other than 100 is shown in the step’s description.Added
qslib.timing, withTimingProfile,OpticsTimingandProtocolTimeline,Protocol.estimate_timeline, andMachine.get_timing_profile. The estimate follows how the instrument runs a repeated collecting step: for each point it holds for the full time and then, as for an unrepeated step, waits until about 4 s before where the hold would end before collecting, so a 20 s point takes about 36 s. A ramp to different zone temperatures takes as long as the zone with the longest ramp, as the instrument slows the other zones to arrive with it. No empirical ramp calibration is bundled; the tools for building one are in the privateqslib._timing_calibrationmodule for now.Stage.dataframeandProtocol.dataframeremain a simple view with a fixed 1.6 °C/s ramp rate, now documented as ignoringStep.ramp_rate, the run mode, the volume and collection time.Fixed event annotations shading the periods the drawer was shut rather than the periods it was open. The cover was already right.
Experiment.events’secondsandhourscolumns are now numbers in those units. They were durations, sohoursin particular was not in hours at all. They also now exist, as nulls, for a run with no active start time.Fixed plotting of a run that is still in progress: its last stage has no end time, which raised a
TypeError.Stage lines are now drawn whenever the stage boundary is in view, rather than only when the whole stage is. Their annotations now appear in
plot_over_time, and both are placed correctly for time units other than hours.Experiment.stagesnow always has the same columns, and exists for an experiment with no message log.A slice of stages with a negative step now selects what the same
rangewould:slice(4, 1, -1)selects stages 4, 3 and 2.plot_over_timeand stage lines selected nothing for such a slice, andplot_over_time_altairselected nothing forslice(None, None, -1). A step of 0, or a step below -1 with no start, raisesValueError.plot_over_time_altairnow takes the same stage selections asplot_over_time, and withstart_time="stage"measures from the first selected stage that the run has.A run that ended, was aborted or was stopped during its first stage now records an end time for that stage.
Fixed
Experiment.plot_over_timeraisingNameErrorwhen given a sequence of axes, which is how the temperature axes are supplied.Removed stray debug
prints fromExperiment.plot_over_timeand stage annotation, and from a failed protocol XML parse, and stopped logging the arguments of every machine status at INFO.RunStatus.pointis now -1 when no run is in progress. The machine does not clear its ownPointwhen a run ends, so it kept reporting the last point of the previous run.Fixed serialization of stage labels and protocol names that need quoting. They were written into the SCPI command raw, so a label containing a space displaced the stage body, and the instrument rejected the protocol.
Fixed stage labels being dropped when a protocol was read back from its SCPI form.
Stage.labelis nowStage.instrument_label, as it is the stage’s label in the machine’s protocol format, not a description. There is no alias: code settinglabelwill raise.Protocol.validatenow warns about a label that qslib-server would refuse: labels there must be 1 to 128 ASCII letters, digits, spaces and_-.().Protocolnow copies the list of stages it is given, andProtocol.validatereplaces a stage it renumbers or relabels rather than changing it. Validating a protocol built from another protocol’s stages changed the stages of the original.Experiment.plot_over_timeagain plots only the data of the stages selected withstages, and now draws stage lines only for those stages. The data filter was lost when plotting moved to Polars (8f7d15a), so every stage was plotted and only the title reflected the selection. The unusedstagesparameter of the private_annotate_eventsis removed.A protocol read from
tcprotocol.xml(Protocol.from_xml) now haspcroff for every step. The file does not record that option, and it was set on.Machine.define_protocolandExperiment.runnow raiseValueErrorfor a protocol name the instrument cannot run: names may contain only letters, digits,_and-, must not start with-, must not be a number other than a plain whole number (so not0123,1e5,infornan), and must not betrue,false,yes,no,onoroffin any case. The instrument stores each protocol in a variable named after it, which allows only those characters, and reads number-like and boolean-like run arguments as numbers and booleans, so such names either fail to run or are reported back differently. Such protocols can still be created and loaded, andProtocol.validatewarns about them. The check is the one qslib-server applies, which also limits names to 128 bytes in UTF-8.Fixed reading the protocol name from a run’s messages.log, which took the run name instead. Runs started by qslib have no
NEXT RPline in messages.log, so their protocol name is not available there.Added
Experiment.change_plate_setup, which replaces the samples in the plate setup file in a run’s folder on the machine (with no argument, it writes the experiment’s current plate setup), andMachine.get_plate_setupandMachine.set_plate_setup. Writing raises an error, rather than dropping wells, if the plate type differs from the run’s existing plate setup or a well is not on the plate.Experiment.from_runningnow copies the run folder file by file, asExperiment.sync_from_machinedoes, rather than with oneZIPREAD?, which failed if the instrument deleted a file while building the archive and sent nothing until the archive was complete. This keeps a transfer receipt, so a later sync copies only new and changed files. Over qslib-server, files are downloaded one by one, and an interrupted download continues on the next sync. Acquisition images (apldbio/sds/images) are left out unless giveninclude_images=True.Experiment.from_uncollectedstill usesZIPREAD?by default, and copies the files the same way withmethod="files". Both takemethod="files"ormethod="zip"to choose over SCPI.Added
Machine.read_filesandMachine.read_dir_files, which sendREAD?commands in groups before collecting the replies and leave out files that no longer exist. This avoids a delay after every reply: reading several hundred small files took about 4 ms per file, against 30 to 40 ms one at a time.Experiment.sync_from_machineuses it.Machine.download_dirtakesinclude_images.Machine.read_dir_as_ziptakes atimeout, 10 minutes by default (previously 30 seconds for the first reply), andMachine.run_command_to_bytestakes atimeout.Machine.read_dir_as_zipraisesFileNotFoundErrorfor a missing directory.Experiment.from_uncollectedthen tries the name as given after the name with underscores, and reports a run it cannot find as such.An SCPI reply is no longer cut off after 30 seconds while its data is still arriving. An open tag is now closed early only after 30 seconds without data, or after 10 minutes.
Experiment.from_uncollected,from_machine_storage,from_machine,latest_from_machine,Machine.load_run_from_storageandqslib copy(--images/--no-images) takeinclude_imagestoo. Images are still included from storage by default, andfrom_machineandlatest_from_machinekeep each source’s default unless given a value. Without images over qslib-server, a stored EDS file is read in parts so that image data is not transferred; over SCPI, it is still read whole.Over qslib-server,
Experiment.from_uncollectedwithinclude_images=Truedownloads the images one by one, uncompressed, after an archive of the other files. Previously the server compressed the images into the archive before sending anything.Over SCPI,
Experiment.from_uncollected(andfrom_runningwithmethod="zip") without images now checks whether the run folder has any, and if so names the other files in itsZIPREAD?, so that the instrument does not read the images. Previously the whole folder was read and the images were left out locally. Hidden files, which the listing does not show, are then left out too. With more than 1000 other files, the files are read one by one instead, since the instrument compares every file with every name and writes the command into the log of a run in progress.Machine.read_dir_as_ziptakesfilesto name the files to read.Experiment.sync_from_machinetakesinclude_images, replacinginclude_tiffs, which still works with aDeprecationWarning, and aprogresscallback. It now compares sizes as well as modification times, writes each file to a temporary file before renaming it into place, and keeps a transfer receipt (.qslib-transfer.json, not saved into EDS files) recording each copied file’s size and remote modification time, which later syncs use to skip unchanged files. Previously an interrupted copy could leave a partial file that later syncs kept.When some files cannot be copied,
Experiment.sync_from_machinecopies the rest, saves the transfer receipt, and then raisesSyncIncompleteErrorlisting the files that failed; a later sync copies only those. Previously such failures were logged, and a timeout or an unexpected reply during the SCPI batch read, or a local file error, stopped the sync.Machine.read_filestakes afailuresdict to record errors by path instead of raising.Experiment.sync_from_machineworks after the machine has collected the run and its folder is gone fromexperiments:: it updates the local files from the stored EDS file and removes the transfer receipt, rather than raising aCommandError. It reads the live protocol only while the run is the machine’s current run, so it no longer logs a warning with a traceback when nothing is running.Added
Machine.download_file, which copies one file and replaces the local copy only when complete.QSConnection.authenticateandMachine.authenticatenow use the Rust implementation in qslib-core.Machine.authenticateraisesAuthErrorfor a rejected password (previouslyCommandError), so the CLI’s wrong-password messages are now shown, andConnectionErrorwhen there is no connection.QSConnection.set_access_levelaccepts access level names in any case.Removed the
"Server"connection type and theserver_tokenargument from the low-levelqslib._qslib.QSConnection. Nothing in qslib used them. The qslib-server SCPI tunnel remains, and qslib-core’sQSConnection::connect_server_tunnelstill connects to it.Experiment.runon an instrument in theErrorstate now raisesMachineInErrorError, rather thanMachineBusyError(it is not a subclass of it). Itserrorsholds the most recent fatal entries of the instrument’s error log (at most 10), and its message lists them. The instrument is in this state while its error count (ERRor?) is above zero. The firmware’s fatal-error handlers raise the count, as do some failed self-tests, and it is cleared when the InstrumentServer restarts or the count is reset.Added
Machine.errors, which returns the lastlimitentries (default 100,Nonefor all) of the instrument’s error log, the errors and warnings since the InstrumentServer started, asErrorLogEntryobjects, oldest first. It needs only Observer access, and also works withbackend="qslib".qslib machine-statuslists the most recent fatal errors for an instrument in theErrorstate, and no longer prints an empty run line for it.qslib machine-powerno longer describes an instrument in theErrorstate as running a run.
qslib-core¶
New crate holding the SCPI connection and parser shared by qslib, qslib-server and qs-monitor. The Rust
qslibcrate depends on it.QSConnection::get_running_protocol_string, used by qs-monitor, now quotes the protocol name and fails unless the instrument returns exactly a name, sample volume and run mode.Removed the
simdfeature. Message framing always usesmemchr, and winnow’ssimdfeature is always enabled. Thesimdfeature of theqslibcrate is also removed.QSConnection::authenticatereturns a rejected password asCommandError::CommandErrorwith the instrument’s error response, and a timeout or disconnection asCommandError::ParseResponseError, rather thanCommandError::InternalError. qslib-server therefore answers a wrong--scpi-passwordwith 403 rather than 503. A challenge made only of digits (with at most onee) was parsed as a number, so authentication failed; such a challenge is now replaced by requesting another.Fixed replies with other tags inside a quoted value, such as the traceback in an instrument internal error, never reaching the waiting command, which then timed out. As in the instrument, once a tag is open only tags of the same name now count toward closing it.
MsgReceiveError::MismatchedCloseTagis removed.Fixed a log message containing a Python object description, such as
<built-in method release of thread.lock object at 0x...>, being taken as an unclosed tag, so that the replies after it, until the connection was dropped, never reached their commands. A tag’s name must now be made of letters, digits,_and., as in the instrument, and its attributes must bename="value"pairs, for it to count. The instrument sends such a message occasionally whenAbortRunis used.A closing tag with no tag open, as in an unquoted error reply such as
ERRor 2 [Test] boom </tagx> boom, is now read as text, and the reply reaches its command. Before, the line was discarded as a receive error and the command timed out.MsgReceiveError::UnexpectedCloseTagis removed.As in the instrument’s own client, only the first opening tag of a reply can make it span several lines, and now only if the tag begins a word, as the instrument’s tags do. Before,
<string>in a Python error such as(<string>, line 1), which the instrument sends when a$[...]expression fails, held that reply and the ones after it for up to ten minutes.Error replies to commands that the instrument cannot parse, such as one whose
$(...)or$[...]fails, now reach their command. The instrument names the previous command in these replies, so they went to that command or were dropped, and the failing command timed out. When such a command is the first on a connection, the instrument closes the connection instead of replying.RunProgress?replies during a run where the stage, cycle or step is-are now read as running with those fields left as-, rather than rejected. This also affectedQuickStatus.RunProgress::reports_no_stagereports when none of the three is set: the instrument clears them at the end of every stage and step, so this happens before the first stage, between stages, at the end of a run and while an aborted run is cleaned up. A reply with no run title is read as not running; at the end of a run the instrument clears the title before the run mode.QSConnection::stop_current_runandstop_runreturn once the instrument acknowledgesStopRunand shows the stop as requested (StopRequestedQuery, readingRunControl) or no run is in progress, rather than waiting for the run to stop at the end of its cycle.QSConnection::abort_current_runandabort_runhandle anAbortRunthat fails after the run has been aborted (an internal error orNoSuchFlag) asMachine.abort_current_runand qslib-server do: they wait for the run to end and carry out the skipped cleanup (finish_abort_cleanup).abort_failed_after_run_abortedidentifies these errors.Added
ErrorLogQuery(LOGG:READ? Error),ErrorCountQuery(ERRor?) andErrorLogEntry, which parses error log lines andErrortopic messages.
qslib-server and HTTP clients¶
Added qslib-server, an optional HTTP server that runs on the instrument. It provides status, control, runs, events, named files, directories, archives and, if enabled, raw SCPI. Requests are authorized with bearer tokens that carry a role, except
GET /health, which answers without credentials. Changes to the instrument can be disabled separately by server policy. Operations can be repeated safely with an idempotency key, and the event stream can be resumed from a cursor.No feature requires the Administrator role. An
administratortoken is accepted and treated as a Controller token.Raw SCPI is open to every role. The one-shot session is set to the requested access level, which is at most Observer, or at most
--max-accessfor a Controller token on a server with both--allow-controlsand--allow-file-writes; the instrument then decides what the command may do. The server no longer limits lower levels to commands whose name ends in?.The SCPI tunnel (with
--enable-scpi-tunnel) needs a Controller token.qslib-server has no access-key operation, because
RAND?does different things on different firmware versions.Every token can read every operation record and receives every operation event; they are no longer limited to the token that created them.
Changed:
Machine.ensure_serverand qs-monitor install their token with the Controller role. Thetoken_roleargument ofensure_serveris removed.Protocols staged through the server are checked against the subset of the protocol format the server accepts, and protocols whose names the instrument cannot run are rejected with an
invalid_inputerror. If installing an experiment or starting a run fails part way, the earlier state is restored.Paused runs are reported as
Paused. The instrument’sISTAT?remainsRunningduring a pause, so the server also reads the current operation.Archive downloads are sent in small chunks while the archive is built, so the server’s memory use does not grow with the size of the files. They leave out files removed meanwhile and take a repeatable
excludeparameter.ServerClient.download_dirtakesexclude. Each member’s sizes follow its data, so save an archive to a file before extracting it.At most two file or package uploads are received at once; later ones wait.
File reads support
RangeandIf-Range.ServerClient.download_filekeeps a partial file and continues an interrupted download, andServerClient.open_abs_filegives a seekable file read with ranged requests.The API’s entry document at
GET /api/v1lists the paths of the other resources (as HAL_links) and, as keys of_templateswith empty values, the actions the caller may currently use. Other representations carry_linksonly. The Rust and Python clients follow these paths, and check for each feature they use, so that a missing feature gives an error naming it.MachineandExperimentuse the server only for the features it offers.file_context_rootsin the server’s capabilities maps absolute instrument paths to named file contexts.The run preflight reports an instrument in the
Errorstate with the codemachine_error, rather thanmachine_busy, and gives the instrument’s error log’s most recent fatal entries indetails.errors.The instrument status includes
error_count(ERRor?, ornullif the instrument refuses it) and, only while the instrument is in theErrorstate,fatal_errors: the most recent fatal entries of its error log, at most 10. Warnings are not included, and the log is only read in theErrorstate.Added
GET /api/v1/instrument/errors(relationqs:instrument-errors, Observer role), which returns the lastlimitentries of the error log (default 100,0for all), oldest first.ServerClient.instrument_errorsreads it.Added
GET /api/v1/instrument/system-logs/{name}(relationqs:instrument-system-log, Observer role), which returns the instrument’s kernel log (kernel, fromdmesg) or Android log (logcat, fromlogcat -d) as{"name", "text"}. The server reads them withSYST:EXEC -verbose, so it needs Controller access to the instrument.ServerClient.system_logreads it.qslib-server’s log now includes qslib-core’s messages, such as connection and message framing errors, filtered by
QSLIB_SERVER_LOGin the same way as its own.There is now one qslib-server client, in Rust (
qslib::server_client). qs-monitor uses it directly, andqslib.server.ServerClientcalls it through the Python extension, releasing the GIL while it waits for the server. The Python methods and exceptions are unchanged. Waiting for an operation retries polls that time out or get a 408, 429 or 5xx response until its deadline.The client now finds every resource other than
/api/v1,/api/v1/capabilitiesand/healththrough the entry document, and no longer falls back to built-in paths when it is unavailable or lacks a resource. Form-style query links such asrun-preflightare followed. The Rust client no longer readsexe_sha256andscpi_okas names of health fields.ServerClient.has_linkandServerClient.allowsreturn a bool and raise the error from reading the entry document, rather than returningNone.MachineandExperimentno longer fall back to the capability flags to decide which features the server offers.qslib-server no longer reads a bare integer
Last-Event-IDas a sequence number; like a cursor from another epoch, it starts the stream with aresetevent.The stop action succeeds once the instrument shows the stop as requested. It used to wait for the run to end, and so timed out with an unknown outcome when the current cycle had more than 30 seconds left.
The restart action refuses to restart during a run, with
machine_busy, unless the request body has"force": true.ServerClient.restart_instrumenttakesforce.The stop and abort actions treat an instrument with no run title as having no run. With its error count above zero the instrument reports
Errorrather thanIdlewithout a run, and a finished stop or abort was reported as a change of the current run.The JSON types of the qslib-server API are defined once, in
qslib_core::server_api(featureserde, re-exported asqslib::server_api), and used by both the server and the Rust client. The client’sCapabilities,Health,InstrumentStatus,IndicatorStatus,BlockStatus,ListEntryandRunningProtocolare replaced byCapabilitiesDto,HealthDto,InstrumentStatusDto,IndicatorDto,BlockDto,ListEntryDtoandRunningProtocolDto;RunStatusDtoandStartRunRequesthave moved there too.InstrumentStatusDto.observed_atis achrono::DateTime<Utc>rather than a string,CapabilitiesDto.sse_cursor_formataStringrather than anOption, andListEntryDto.attributesaBTreeMap. The JSON sent by the server is unchanged.RunStatusandMachineStatuscan be constructed in Python from their fields.Machinebuilds them in this way from the server’s JSON, rather than writing SCPI reply text from the JSON and parsing that.Fixed temperatures that the instrument reports as NaN, which the server sends as
null, being left out ofMachineStatus.sample_temperaturesandblock_temperatures(so that later entries no longer matched their zones or sensors) and read as 0 for the cover and LED, when using the server. They are now NaN in their place, as with direct SCPI. The Rust types inserver_apilikewise read thesenullvalues as NaN, so qs-monitor no longer fails to read the instrument status when a temperature is NaN.POST /api/v1/scpitakes a JSON or a plain-text body and returns the text of the instrument’s reply as it was written, rather than re-rendering the parsed reply. It no longer takesencoding=bytesor sends theX-SCPI-Status,X-SCPI-Accessandx-scpi-errorheaders. It refuses a command that ends in a backslash or leaves a<<<or<tag>quotation open, which the instrument would continue onto the next line.--no-authalone gives anonymous Observer access; the--unauthenticated-roleoption is removed. Theunauthenticated_rolekey of the token file is unchanged.qslib-server sets
TCP_NODELAYon its connections. Without it, a small file’s contents were often held back until the client acknowledged the response headers, which added about 40 ms per request on a local network and a network round trip per request on a remote one, so reading a folder of small files file by file was several times slower than over SCPI.
qs-monitor¶
qs-monitor is now released as a Linux x86-64 bundle, with the matching ARMv7 qslib-server binary and an installer. See
qs-monitor/CHANGELOG.mdfor its changes.
Project infrastructure¶
Releases now include a static ARMv7 musl
qslib-serverbinary and the Linux qs-monitor bundle, with SHA-256 checksums.Releases are built and published by GitHub Actions when a version tag is pushed, with
SHA256SUMSattached to the GitHub release.Copyright and licence information for all files is given in
REUSE.toml, which replaces.reuse/dep5.
Version 0.15.3¶
Fixed
SmoothWindowMeanandSmoothEMWMeanbugs. By default from 0.14.0 these used Polars processors, which smoothed by time without properly grouping. Pre-0.14.0, and using Pandas processors, filter_sets could be inadvertently merged together (though not different wells).SmoothEMWMeanalso now gives Polars itsmin_periods,adjustandignore_nasettings, which had been silently left at the Polars defaults.Polars 1.21 or later is now required, for
min_samplesandcheck_sortedness.Experiment.latest_from_machinenow accepts a host name string, like the other methods that take a machine.Experiment.plot_over_timenow plots lines in the order the samples (or wells) and filter sets were given, so that colors follow that order and match between plots. This was a 0.14.0 regression.Experiment.plot_over_time_altairnow accepts well names as well as sample names, asExperiment.plot_over_timedoes.Removed a stray
printof the y-axis label fromExperiment.plot_over_time.Fixed
Experiment.abortwhen the experiment already has a machine.Loading an experiment no longer prints a Polars warning about column sortedness.
Added commands for querying and setting the status led.
Compress EDS archives written by
Experiment.save_file()with ZIP deflate, including file and in-memory outputs.Moved the canonical documentation URL to
https://docs.costi.net/qslib/and added a GitHub Pages deployment workflow.Made Forgejo runner labels configurable and namespaced persistent caches by forge, preventing the Codeberg and git.costi.net runners from sharing cache volumes.
Restricted release publication to one explicitly selected forge, limited intermediate wheel artifacts to one-day retention, and stopped mirroring wheels into Forgejo Packages or attaching them permanently to Forgejo releases.
Version 0.15.2¶
Protocol fixes¶
Correct collection-filter attributes in
tcprotocol.xmlfor hacform filter strings.
Communication fixes¶
Treat zero-byte reads as disconnects.
Resynchronize malformed messages at newline boundaries.
Bound response waits and make Python waits interruptible.
End log subscriptions when the connection closes.
Prevent response-channel backpressure from blocking the receive loop or dropping terminal responses.
Report response parse failures when their identifier is recoverable.
Stage identity fixes¶
Add raw stage names to
RunStatusand distinguishPRERUNfromPOSTRUNpositions.Use Polars APIs for Altair stage selection.
Warn when collected-data stage values are nonnumeric.
Version 0.15.1¶
Data fixes¶
Fix
welldata/filter_datatime columns on v1-spec EDS files. In 0.15.0 the v1 codepath was rewritten to go throughfilter_data_polars(which emitsDatetime[ms, UTC]) and reformat back to the legacy pandas multi-index; the timestamp conversion assumedastype("int64")returned nanoseconds, so it divided by 1e9 and produced timestamps 1e6× too small (and huge negativeseconds/hours). Now uses a time-unit-agnostic subtraction from the Unix epoch.Add
temperatures_polars_widefor callers that need the 0.14-era wide schema (timestampasDatetime[ms, UTC], one column per(kind, zone)—sample_1..N,heatsink,cover,block_1..N).temperatures_polarsitself remains long-format (the intentional 0.15 default), now also with atimecolumn derived fromtimestamp.
Version 0.15.0¶
Robustness improvements to communication, consolidation of parsing into Rust, and a new quant/calibration data pipeline:
Communication fixes¶
Fix READY message read to handle partial TCP reads (TCP does not guarantee message boundaries).
Fix double newline on command send when content already has a trailing newline.
Fix quoted string parser to handle backslash escape sequences (
\",\\,\n,\t).Fix ErrorResponse parser to handle errors without brackets.
Fix Rust parser tag character set to include underscore (e.g.
<quote_reply>).Fix DRAW? returning “false” instead of “Open” by not coercing open/closed to Bool in response parser.
Add single-quote string support to Rust parser.
Extend boolean parsing to cover all server-recognized forms (yes/no, on/off, open/close).
Extend command name character set to include
+,-,~,<(e.g.SUBS+,FLAG-).Add WARNing response type to Rust parser.
Add tag stack timeout to message receiver, preventing unclosed tags from absorbing all subsequent messages.
Send QUIT command on disconnect for clean server-side cleanup.
Handle auth-required gracefully in
Machine.connect()with a clear error message for remote connections.Handle
ExclusiveAccessandAccessGivenerrors as specific exception subclasses.
Data and protocol fixes¶
Fix IncrementCycle/IncrementStep defaults to match server (default=2, not 1).
Fix SampleTemperatures separator mismatch in multicomponent data parsing.
Remove overly strict temperature zone and plate type assertions.
Parameterize plate type in
Experiment._new_xml_filesinstead of hardcoding 96-well.
New features¶
Consolidate Python parsing to Rust:
AccessLevel,FilterSet,SCPICommand,PlateSetupall now handled in Rust;pyparsingdependency removed.Add Rust quant/calibration file parsers and filterdata reconstruction from quant + calibrations (matches filterdata.xml to <0.1 error).
Add ROI calibration parsing and TIFF-to-quant processing pipeline (exact match to instrument output).
Migrate
FilterDataCollectionloading and timestamp-setting to Rust.Dynamic zone count querying via
Machine.get_zone_count()instead of hardcoded 6.Expose server random key auth mechanism via
Machine.generate_random_key().Validate READY message capabilities on connection.
Make
subscribe_log()actually send SUBS+ command to the server.Parse MESSage timestamp structurally in
LogMessage.Extend
Subscribecommand builder with timestamp and multi-topic support.Add exclusive and stealth flags to
AccessLevelSetcommand.
Testing¶
~226 new tests across Rust and Python, covering communication, parsing, plate setup, processors, and machine logic.
Security¶
Update
rustls-webpki0.102 → 0.103 to fix four advisories: CRL distribution-point matching (RUSTSEC-2026-0049), URI name-constraint bypass (RUSTSEC-2026-0098), wildcard name-constraint bypass (RUSTSEC-2026-0099), and reachable panic in CRL parsing (RUSTSEC-2026-0104).Bump
bytesto 1.11.1 (integer overflow inBytesMut::reserve, RUSTSEC-2026-0007),quinn-prototo 0.11.14 (QUIC endpoint DoS, RUSTSEC-2026-0037), andtimeto 0.3.47 (stack-exhaustion DoS, RUSTSEC-2026-0009).Port
qs-monitorfrommatrix-sdk0.9 to 0.16, fixing three advisories: encrypted-event sender spoofing (RUSTSEC-2025-0041), panic inRoomMember::normalized_power_level()(RUSTSEC-2025-0065), and DoS via customm.room.join_rulesevents (RUSTSEC-2025-0135).
Build¶
Vendor
matrix-sdk0.16 with#![recursion_limit = "512"]added to work around rust-lang/rust#152942 (query-depth overflow on rustc 1.94+ due to matrix-sdk’s deeply nested#[tracing::instrument]async chain picking up an extraManuallyDroplayer).qs-monitor/src/main.rsgets the same attribute to raise the trait-solver limit forSend-ness ofClient::sync()when passed totokio::spawn.
CI¶
Bump GitHub Actions past the Node.js 20 deprecation:
actions/checkoutv4→v6,setup-pythonv5→v6,upload-artifactv4→v7,download-artifactv4→v8,extractions/setup-justv2→v4,astral-sh/setup-uvv7→v8.1.0,codecov/codecov-actionv5→v6.Fix wheel-test jobs on Linux:
RUSTC_WRAPPER=sccachewas leaking frommaturin-actioninto subsequentuv syncinvocations where sccache isn’t on PATH, failing silently on macOS (sccache pre-installed) but breaking Linux. Now overridden per-step.Drop macOS x86_64 (Intel) from the wheel matrix (<8 Darwin downloads/month across all arches on PyPI).
Version 0.14.0¶
A significant reorganization:
Core communication and parsing code in Rust.
Polars dataframe support, in addition to pandas.
A new, rust-based qs-monitor with improved reliability and a matrix bot with commands.
Altair plotting support.
Numerous bug fixes and improvements.
Python 3.10 is now the minimum supported Python.
Version 0.13.0¶
Add
PlateSetup.from_picklistmethod to generate a PlateSetup from a Kithairon PickList, if Kithairon is installed.Improve ssl support for monitor.
Have monitor complain to matrix if it exits unexpectedly.
Fix compile_eds when there is no folder to compile (if, eg, something else has already compiled the EDS).
Version 0.12.0¶
Machine.blockcommand to directly control block temperatures.Certificate support for SSL, and new connection recommendations.
Stage lines and event spans now are now not plotted if they are outside of the selected time range / stages.
Stepnow supports repeats.Stage.stepped_rampcan now take multiple data points per temperature.Fix hanging connection bug.
Version 0.11.0¶
Initial support for 384-well blocks, at least in data/file reading.
Initial support for v2.0 EDS specification machines (eg, QS6Pro), at least in data/file reading.
Parsing of multicomponent data for v1 and v2 machines, and partial analysis data for v1 machines.
Available data is shown in experiment information.
Change license to EUPL-1.2.
Fixes for new matplotlib versions.
Support for Python 3.12.
Version 0.10.1¶
SSL/non-SSL autoconnection speed improvements
Drawer/cover annotation improvements
Version 0.10.0¶
Add annotations to plots for drawer and cover open and close events.
Add support for SSL / firmware 1.3.4.
Version 0.9.4¶
Fix multi-temperature plotting bug.
Version 0.9.3¶
Update dependencies, convert to pyproject.toml.
Fix cycle selection and direct pandas selection for normalization processes.
Version 0.9.2¶
Fix a communications bug where a packet that can cause commands to hang in certain rare situations.
Version 0.9.1¶
Minor bug fixes and dependency updates (to fix pandas errors).
Fixes to support Pandas 2.0.
Ensure that some invalid characters are not used in machine names.
Check for files with and without spaces on machine when loading a new experiment (in case run was started outside of qslib).
Parse IOError messages from the machine.
Version 0.9.0¶
Fix
Stage.stepped_rampwhen all temperature increments are the same, but temperatures are not.Add a
start_incrementoption toStage.stepped_rampfor cases where the user does not want the ramp to actually start at the starting temperature, but at the first increment away from it (eg, when continuing a previous ramp).Ensure that units are delta units when appropriate in protocols, regardless of whether the user entered them as delta units (eg, so “2°C” will work as a temperature step).
Version 0.8.2¶
Add check for existing, completed EDS files with same name, and option to
Experiment.runto overwrite completed or working files.Fix XML protocol parsing bug for increment units with non-qslib EDS files.
Fix stage lines in plots.
Improve error messages.
Version 0.8.1¶
Fix bug with BytesIO not being recognized by
Experiment.save_file.
Version 0.8.0¶
Ensure that protocols don’t have incorrect stage index and label information when being sent to machine.
MachineStatus now includes temperature information, as does the
qslib machine-statusCLI command.Experiment.sync_from_machinecan exclude tiffs, and has better logging.Custom steps are now approximated in xml files, keeping them somewhat compatible with the machine’s android interface.
Several testing and documentation improvements.
Python 3.11 fixes.
Version 0.7.1¶
QSLib-initiated experiments should now be partially compatible with the machine’s android interface. Status, time, and the (possibly approximate) protocol should be displayed. Data and samples will likely not. Pause/resume/stop/open/close buttons on the interface should function properly.
Processorand plotting improvements.
Version 0.7.0¶
Protocolnow hasProtocol.stage, and Stage now hasStage.step, to provide convenient, 1-indexed access, such thatprotocol.stage[5]of is stage 5 ofprotocol, not stage 6.Protocolnow supports setting PRERUN and POSTRUN stages, as a series of SCPI commands. This allows the setting of things like idling temperatures and exposure times. It is not easily usable yet, however.Experiment.change_protocol_from_nowallows convenient changes to a currently-running experiment.Normalizationhas been renamed toProcessor. Plotting functions can take sequences of processors to process data. These now include:Normalization as before:
NormByMeanPerWell,NormByMaxPerWellSubtractMeanPerWell: subtracts the mean of a particular region, applied to each well.SmoothEMWMean: smooths data using Pandas’ ExponentialMovingWindow.mean.SmoothWindowMean: smooths data using Pandas’ Rolling.mean or Window.mean.
Some initial implementation changes to allow repeated steps (not stages).
Fixes bug that prevented loading of some aborted runs.
Fixes monitor’s recording of temperatures.
Experiment.all_filters uses data if it exists; Experiment.filter_strings as a convenience function alternative.
SCPICommand parsing improvements.
Protocol printing improvements.
Version 0.6.3¶
Fixes drawer check bug.
Version 0.6.2¶
Add checks for cover and drawer position after changing positions.
Version 0.6.1¶
Fix pyparsing 3.0.7 whitespace parsing problem (pyparsing/pyparsing#359).
Use Hypothesis for some tests.
Version 0.6.0¶
Improved plots, including new
Experiment.plot_temperatures.Comments in SCPI commands, allowing save/load of default filters in protocols
Licensing switched to AGPL 3.0, CLA in docs.
Command comment parsing, also used to store whether steps are using default filters.
Example notebook
Working parsing of Exposure commands
Dependency version fixes
Version 0.5.1¶
CustomStep.collect(and subclasses, includingStep) is nowCustomStep.collects. Thecollectparameter forStepcan now beNone, which will collect data if the step has a filter setting (ie, if you want to collect the defaultProtocolfilters, you need to usecollect=True).Stage.stepped_rampandStage.hold_forare now safer in requiring some keyword arguments, are documented, and are more flexible.
Version 0.5.0¶
Units throughout protocols, thanks to Pint: you can now use strings like ‘1 hr’ or ‘52 °C’ when defining protocols.
Automatic connections throughout Machine and Experiment, by default.
Change safe titles from spaces-as-“-” to spaces-as-“_”, consistent with machine.
Deprecated paramiko tunnel.
Documentation rewrite
Implement EDS-file (in-progress and complete) synchronization for monitor.
Reorganization of modules: common is no longer needed
Version 0.4.1¶
Allow setting of Experiment.sample_wells.
Improve plotting code.
Version 0.4.0¶
Much faster
Experiment.sync_from_machine, only transferring additional log entries rather than the entire log.Common plotting routines for fluorescence data.
More reliable monitoring.
More reliable connections, and testing.
Stage.stepped_rampconvenience function.Fixes to bugs inhibiting exposure setting, and some basic implementations for this.
Fixes to qs-monitor for cycle counts > 999 (and other large stage / step / cycle counts).
Version 0.3.1¶
CLI improvements.
Fix qs-monitor and various functions when run titles have spaces in them.
Improve tests and typing.
Version 0.3.0¶
Add qslib CLI, with some basic utility functions.
Include calculation using 1.6°c/s ramp (standard mode default) in temperature protocols, initiating from 25°c. This makes experiment temperature data match reasonably well with protocol calculations. It needs to be expanded to handle different ramp rates and run modes, however.
Added some tests.
Version 0.2.0¶
Add internal SSH tunnel support, so that this doesn’t need to be set up separately, and can be configured with parameters to Machine.
Fix mid-run syncing bugs related to directory creation.
Handle some different inputs for Protocol creation.
Try to handle spaces in names better; this is still a problem, howver.
Version 0.1.1¶
Various small improvements and bug fixes.
Version 0.1.0¶
Initial implementation of full communication (OK/NEXT/ERRor), Experiment files, Machine connection interface. Adaptation of QSConnectionAsync to use new communication. Move of monitor system into qslib.
Version 0.0.0 / etc¶
Initial version of QSConnectionAsync and other low-level portions to support rawquant and qpcr_data_updater.