Metadata-Version: 2.5
Name: plesty-bench
Version: 0.4.0.dev1
Summary: Client for a PLESTY bench running plesty-server: run its commands and fetch its reports from another machine.
Author-email: Yunshuang Yuan <yuanyunshuang@gmail.com>
Maintainer-email: Plesty Development Team <plesty.dev@example.com>
License-Expression: LGPL-3.0-or-later
License-File: LICENSE
License-File: LICENSES/LGPL-3.0-or-later.txt
Requires-Python: >=3.12
Requires-Dist: click>=8.1
Requires-Dist: pyzmq>=26
Provides-Extra: control
Requires-Dist: plesty-lib[gui]>=0.5.0.dev8; extra == 'control'
Provides-Extra: gui
Requires-Dist: plesty-lib[gui]>=0.5.0.dev8; extra == 'gui'
Requires-Dist: plesty-lib[report]>=0.5.0.dev8; extra == 'gui'
Requires-Dist: pyside6==6.11.2; extra == 'gui'
Requires-Dist: pyyaml>=6.0; extra == 'gui'
Provides-Extra: server
Requires-Dist: plesty-lib[report]>=0.5.0.dev8; extra == 'server'
Requires-Dist: pyyaml>=6.0; extra == 'server'
Description-Content-Type: text/markdown

# plesty-server · plesty-bench

**The bench PC's own console for the PLESTY platform.** It installs hub
modules, starts and supervises device servers, runs field tests against the
real instruments, and runs experiments across the lab's benches — keeping the
logs, the runs and their reports — so a lab bench is set up and kept running
from one place instead of one venv, one terminal and one hand-written `uv` pin
per instrument.

This repository publishes two packages:

| | Install on | Install with |
|---|---|---|
| **`plesty-server`** — the bench application: CLI, Qt console, agent | the bench PC | the installer from the [releases](https://gitlab.com/plesty/core/plesty-bench/-/releases) |
| **`plesty-bench`** — the client that drives a bench from elsewhere | your own machine | `uv tool install plesty-bench` |

Each release carries a Windows `setup.exe` (per-user, no admin) and an
`install.sh` for macOS and Linux. Both install the whole application,
console included, pinned to that release, and add a Start-menu or Launchpad
entry. Without an installer, `uv tool install "plesty-server[gui]"` installs
the same thing on macOS or Linux.

## Bringing up a bench

```bash
plesty-server fleet init                      # a fleet.yaml to declare into
plesty-server declare pm100d plesty-pm100d --version 0.2.1 \
    --arg --address --arg "USB0::0x1313::…::INSTR"
plesty-server start pm100d                    # installs, launches, waits until it answers
plesty-server status
```

The instrument is now reachable from an experiment PC at this machine's
address on the port `status` reports. `plesty-server gui` opens the same bench
in a window; `plesty-server fleet run` keeps it up headless after a reboot.

## Driving it from your own machine

The bench serves an agent; the client sends it `plesty-server` command lines
and follows the output.

```bash
plesty-bench -b lab-bench-03 status
plesty-bench -b lab-bench-03 field-test pm100d --gates connect,drain
plesty-bench -b lab-bench-03 control pm100d          # a control panel per device
```

## Documentation

**[Full documentation](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/index.md)**
— start there if anything below is unfamiliar. It is in three parts:

| Part | Covers |
|---|---|
| [GUI](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/gui/index.md) | The window element by element: the Devices and Experiments tabs, every menu, every dialog, the Control window |
| [CLI](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/cli/index.md) | `plesty-server`, `plesty-bench`, and every file and setting |
| [Usages](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/usage/index.md) | Tasks start to finish: set up a bench, install modules, field-test, run an experiment, work remotely, run without a window, maintain |

A new bench starts at [Set up a bench](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/usage/first_bench.md).

*[Design and internals](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/design/index.md)*
covers the architecture, the process model, the port rules, the
installer, the agent protocol, experiment runs, the platform differences and
the release machinery — for contributors, and for anyone debugging behaviour that only
makes sense once the mechanism is visible.

New to the platform? The [PLESTY quickstart](https://plesty.net/learn/quickstart/index.html)
runs a whole experiment against a bench and is the gentlest way in.
