A lab rarely runs one setup on one PC. Once several benches each serve devices, an operator needs three things: group a bench's devices the way the work is grouped, see any mix of benches in one table, and know what each bench has installed. PLESTY Bench 0.5.0 adds all three. It also starts a run with only the devices that run's settings use, so measuring on one bench no longer needs every other bench in the setup to be ready.
What changed
A bench has fleets
A fleet is a named list of declared devices, kept in its own file. A new bench starts on an empty fleets/default.yaml. You can add more fleets from the console, the command line, or another machine.
View ▸ Fleet, ticked one by one
You tick each fleet of this bench and each other bench on its own, so the table can show any mix. A bench you leave unticked is not asked for its devices.
Hub ▸ Installed modules…
Lists every installed version, declared or not, with its kind and the declarations that use it. From here you can uninstall what nothing uses.
Every version is offered
The version drop-downs list every PyPI release, newest first, and every release tag of the repository. You no longer type an older version in by hand.
A run starts only what it uses
An experiment can name the devices its settings use. The bench then starts and checks only those devices, and only their benches.
One name: the Hub
The menu, its window and its messages now all say "Hub": Hub ▸ Browse… (Ctrl+K), Load from… and Installed modules….
For users: working with fleets
Create a fleet and declare into it
On the bench itself, use the plesty-server command line:
plesty-server fleet new cryo # an empty fleet: <home>/fleets/cryo.yaml
plesty-server declare stage plesty-kst201 --fleet cryo
plesty-server fleet list # * marks the current fleet
* default 3 device(s) ~/.plesty/server/fleets/default.yaml
cryo 1 device(s) ~/.plesty/server/fleets/cryo.yaml
From another machine, the same commands go through the plesty-bench client to that bench's agent:
plesty-bench -b BENCH fleet new cryo
plesty-bench -b BENCH declare stage plesty-kst201 --fleet cryo
fleet new keeps the current fleet current. A device name can be declared in only one fleet of a bench, because the name also names that device's folder, log and process record.
Choose what the table shows
View ▸ Fleet lists each fleet of this bench and each other bench as its own tick box:
All ticks or clears everything and is the default. The menu stays open while you tick. The Fleet column shows which fleet each of this bench's rows belongs to, and Host shows which bench serves a remote row. Another bench's devices are in none of this bench's fleets, so ticking one local fleet leaves them out of the table.
See and clean up what a bench has installed
Hub ▸ Installed modules… has one row per installed version of every module: its kind (device or experiment), version, source, and Used by, the declarations that use it. A module installed from the Hub and never declared used to be invisible and impossible to remove. Now it is listed here, and Uninstall removes it.
| Case | What Uninstall does |
|---|---|
| Installed, nothing uses it | Removes that version's environment |
| A device or experiment still uses it | Refuses and names the declaration. Remove that declaration first |
| A folder added with Load from… | Removes the bench's record of it. The folder itself stays |
Every install, update and uninstall now ends with a message in the main window: green when it worked, red with the last line of its log when it did not. The message is not a modal dialog, because these jobs often finish while you are working elsewhere and a modal would stop the console from refreshing.
Pick any version
Add device…, Edit ▸ Device config… and the Hub's install form now offer every release on PyPI, newest first (yanked releases are left out), and every release tag of the module's repository. A tag that was never published to PyPI is offered under the Repository (git) source. Tags are listed only on a bench that already has git.
For users: a run starts only the devices it uses
When an experiment says it chooses its devices (plesty-lib 0.6.0's @cli.needs), the bench asks it which devices this run's settings use, then starts and share-checks only those and the benches that serve them. A module that does not choose still gets every device, as before.
For developers and contributors
Script fleets
fleet list --json prints each fleet's name, file, device count and whether it is current, so a setup script can provision a bench through plesty-bench -b.
Publish so the Hub can offer you
Release tags and PyPI releases both show in the drop-downs. Tag each release in your repository, and every published version can be picked without typing it in.
Where it lives in plesty-bench
| Piece | Where |
|---|---|
Fleet files, new_fleet, fleet_rows, declare(…, fleet=) | plesty/server/presenter/bench.py, plesty/server/model/home.py |
fleet new / fleet list / declare --fleet | plesty/server/cli/main.py |
| View ▸ Fleet tick boxes | plesty/server/view/window.py |
Bench.installed_modules, Bench.uninstall_module, the dialog | presenter/bench.py, view/dialogs.py |
pypi_releases, remote_tags (one git ls-remote that never prompts for a password) | plesty/server/services/catalogue.py |
| Device choice before a run | plesty/server/services/experiments.py, model/experiment.py |
<home>/fleets/default.yaml, written empty at its first start. Before, such a bench created <home>/fleet.yaml at its first declaration.Released in plesty-bench 0.5.0 on 28 October. The device choice needs an experiment built on plesty-lib 0.6.0 or newer. In the same release, fleet up -f <setup.yaml> leaves an experiment's setup.yaml as it was committed, where it used to rewrite the file.