Skip to content

Testing new pm - #163

Open
ofw24 wants to merge 14 commits into
toolsforexperiments:masterfrom
ofw24:testing-new-pm
Open

ofw24 wants to merge 14 commits into
toolsforexperiments:masterfrom
ofw24:testing-new-pm

Conversation

@ofw24

@ofw24 ofw24 commented Oct 21, 2026 •

Copy link
Copy Markdown

summary of changes in this pr is below. they include quality of life fixes for the new types in the parameter manager, speed-ups when working with types, and some bug fixes.

Types tab

  • Remove type button. It removes the selected Type and its Globals parameters (_globals.<type>). If the server refuses, the reason appears in the New type strip's note.
  • Editable entry units. Changing a unit applies it to every Instance and to the entry's Globals parameter.
  • Global value column. The entries pane now reads parameter | unit | default | global | locked to global. The global column shows and sets the value every locked Instance follows. New ParameterManager.ensure_global_targets() creates any missing Globals parameters, so every entry has a global value to edit.
  • Set buttons for defaults and global values, matching the parameter rows: an edit turns the button orange, and Return or a click applies it. An edit you haven't applied yet survives pane rebuilds and incoming values.
  • Removing an entry also removes its Globals parameter. Instances locked to it go back to their own values.
  • Removed the Type Lock re-target button and the code only it used.

Instances pane

  • A delete button on each row. After you confirm, it removes every parameter under the Instance and any groups left empty.

Profile switching (fixes the PM being emptied at GUI startup)

When two or more Parameter Managers share a working directory, opening one PM's GUI could load another PM's profile into it, emptying it and later overwriting a profile file.

  • Opening the GUI no longer loads, saves or switches a profile. The dropdown shows the profile the PM is on.
  • switch_to_profile checks the new file before it saves or clears anything. It refuses unreadable files, another PM's v2 profile, and legacy files with no keys for this PM. If the load still fails after the check, the previous state is restored.
  • The GUI handles a refused switch: it shows a warning and puts the dropdown back on the current profile.
  • does_profile_exist matches whole names only. Before, pm counted as a match for parameter_manager-tracking_pm.json.
  • New get_selected_profile(), readable through the proxy.

Performance and stability

  • Server: fixed 100% idle CPU after the first request. The zmq poller's wakeup socket was never drained.
  • GUI: a burst of changes, such as adding or removing an Instance, rebuilds the Types pane and its colour tints once, after a short pause, instead of once per parameter.
  • GUI: Instance, Type and entry removals call the server directly and refresh the proxy once.
  • Proxy: update() now refreshes the units of parameters it already has. Before, a unit changed on the server stayed stale, and Instances stopped matching their Type.
  • Log widget: closing a window removes its log handler from the shared logger. This fixes leftover handlers and a possible crash when another thread logs while the window closes.

qcodes compatibility

  • ManagedParameter.snapshot_base now also accepts the string form of update that qcodes 0.59+ passes ("All" and so on). Before, a locked parameter's Target was read twice per snapshot. Tests pass on qcodes 0.58.0 and 0.63.0.

Tests

  • New tests for the Types tab and Instances pane, profile switching between PMs, does_profile_exist, and the log widget teardown.
  • The clean_parameter_manager fixture now catches the plain Exception the proxy raises. Before, it caught only ValueError, and the old reload at GUI startup hid the mistake.

marcosfrenkel and others added 14 commits October 20, 2026 14:59
The button shows while a Type is selected and calls remove_type on the
server; a refused removal shows the error on the New type strip's note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… pane

An own entry's unit cell is a line edit; Return calls
set_type_parameter_unit, which propagates the unit to every Instance,
then refreshes the GUI so the parameter tree shows the new units.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es pane

The button sits next to Show; after confirmation it removes every
parameter under the Instance, and the emptied groups go with them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… edits

- server: the zmq poller reports the wakeup socketpair by its file
  descriptor, so the old 'socket in socks' check never matched, the pipe
  was never drained, and the request loop spun at 100% CPU after the
  first request.
- GUI: a burst of Broadcasts (an Instance added or removed) emits
  structureChanged once, after 50 ms of quiet, instead of rebuilding the
  tints and Types pane once per parameter.
- GUI: the instance delete button calls the Server directly and refreshes
  the proxy once, instead of refetching the whole blueprint per parameter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
update() only added parameters it did not have yet, so a unit the Server
changed in place (a Type's unit edit propagates to its Instances) stayed
stale on the proxy; the Parameter Manager GUI then saw the Instance's
units disagree with its Type and stopped counting it as an Instance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e Lock re-target

- The Types tab's entries pane reads parameter | unit | default | global
  | locked to global. The global column shows and sets the value every
  locked Instance follows: the Type Lock's Target, or the entry's
  _globals.<type>.<path> parameter while unlocked. Default and global
  boxes are narrower.
- ParameterManager.ensure_global_targets() creates the Globals parameter
  of every Type entry that has none; the GUI calls it so every entry has
  a global value to edit. set_type_parameter_unit also updates the
  entry's Globals parameter, so a later Type Lock does not hit a unit
  conflict.
- Remove the Type Lock re-target button, its arm-strip path and the
  rank_lock_targets arm_rel option only it used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…obal values

- Removing a Type, or one of its entries, also removes its Globals
  parameters (_globals.<type> or _globals.<type>.<path>). The Server
  drops every Lock on a removed parameter first, so the Instance
  parameters locked to them go back to their own values. Instance,
  Type and entry removal share one helper that calls the Server
  directly and refreshes the proxy once.
- The global value cell gets the parameter rows' set button: an edit
  turns it orange, Return or the button sets the value and turns it
  back. An uncommitted edit survives pane rebuilds and incoming values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e on edit

The default editor in the Types tab gets the parameter rows' set button:
an edit turns it orange, Return or the button sets the default and the
next rebuild shows it plain again. An uncommitted edit survives pane
rebuilds. Also apply ruff format to the two GUI files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants