Metadata-Version: 2.5
Name: plesty-server
Version: 0.3.2
Summary: The PLESTY bench application: installs, runs and field-tests device servers.
Project-URL: Homepage, https://gitlab.com/plesty/core/plesty-bench
Project-URL: Documentation, https://plesty.gitlab.io/core/plesty-bench/
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: plesty-bench==0.3.2
Requires-Dist: plesty-lib>=0.4.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: pyzmq>=26
Provides-Extra: gui
Requires-Dist: plesty-lib[gui]>=0.4.0; extra == 'gui'
Requires-Dist: pyside6==6.11.2; extra == 'gui'
Description-Content-Type: text/markdown

# plesty-server · plesty-bench

**The bench PC's own console for the PLESTY platform.** It installs hub device
modules, starts and supervises their device servers, runs field tests against
the real instruments and keeps the logs — 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 | `uv tool install "plesty-server[gui]"` |
| **`plesty-bench`** — the client that drives a bench from elsewhere | your own machine | `uv tool install plesty-bench` |

On a Windows bench, the [releases](https://gitlab.com/plesty/core/plesty-bench/-/releases)
carry a `setup.exe` (per-user, no admin); macOS and Linux have `install.sh`.
Both install `uv`, run the command above and add a Start-menu / Launchpad
entry — they contain no application code of their own.

## 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 two parts.

*Using a bench*, in the order you meet it:

| | |
|---|---|
| [Setting up a bench](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/bench_setup.md) | The fleet file, declaring devices, ports, the `.env` |
| [Device modules](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/modules.md) | The catalogue, installing, several versions side by side |
| [Running device servers](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/running.md) | Start, stop, status, logs, the working fleet, headless benches |
| [Field tests](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/field_test.md) | Running a module's field test against the instrument |
| [The console](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/console.md) | Every part of the window, and the control panels |
| [Working remotely](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/remote.md) | The agent and the `plesty-bench` client |
| [Maintenance](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/maintenance.md) | Upgrading, clearing logs, purging, uninstalling |
| [Command reference](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/cli.md) | Every `plesty-server` command |

*[Design and internals](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/design/index.md)*
is the other part: the architecture, the process model, the port rules, the
installer, the agent protocol, 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.
