plesty-server 0.3.2__tar.gz → 0.4.0.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/PKG-INFO +26 -29
  2. plesty_server-0.4.0.dev1/README.md +68 -0
  3. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/assets/console.qss +94 -5
  4. plesty_server-0.4.0.dev1/plesty/server/assets/report.css +394 -0
  5. plesty_server-0.4.0.dev1/plesty/server/assets/report.html +113 -0
  6. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/cli/main.py +144 -0
  7. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/__init__.py +38 -0
  8. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/agent.py +42 -2
  9. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/catalogue.py +14 -2
  10. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/device.py +36 -1
  11. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/device_manager.py +36 -5
  12. plesty_server-0.4.0.dev1/plesty/server/model/experiment.py +419 -0
  13. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/fleet.py +78 -7
  14. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/home.py +20 -0
  15. plesty_server-0.4.0.dev1/plesty/server/model/peer.py +187 -0
  16. plesty_server-0.4.0.dev1/plesty/server/presenter/bench.py +3352 -0
  17. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/services/__init__.py +78 -0
  18. plesty_server-0.4.0.dev1/plesty/server/services/experiments.py +645 -0
  19. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/services/installer.py +214 -5
  20. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/services/jobs.py +23 -1
  21. plesty_server-0.4.0.dev1/plesty/server/services/nodes.py +266 -0
  22. plesty_server-0.4.0.dev1/plesty/server/services/problem_report.py +232 -0
  23. plesty_server-0.4.0.dev1/plesty/server/services/run_report.py +789 -0
  24. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/view/control.py +39 -6
  25. plesty_server-0.4.0.dev1/plesty/server/view/dialogs.py +3553 -0
  26. plesty_server-0.4.0.dev1/plesty/server/view/window.py +3199 -0
  27. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/pyproject.toml +4 -4
  28. plesty_server-0.3.2/README.md +0 -71
  29. plesty_server-0.3.2/plesty/server/presenter/bench.py +0 -1636
  30. plesty_server-0.3.2/plesty/server/view/dialogs.py +0 -1228
  31. plesty_server-0.3.2/plesty/server/view/window.py +0 -1257
  32. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/LICENSE +0 -0
  33. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/LICENSES/LGPL-3.0-or-later.txt +0 -0
  34. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/__init__.py +0 -0
  35. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/__main__.py +0 -0
  36. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/assets/env.example +0 -0
  37. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/assets/fleet.example.yaml +0 -0
  38. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/assets/plesty-mark.svg +0 -0
  39. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/cli/__init__.py +0 -0
  40. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/config.yaml +0 -0
  41. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/host.py +0 -0
  42. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/envfile.py +0 -0
  43. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/errors.py +0 -0
  44. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/field_test.py +0 -0
  45. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/job.py +0 -0
  46. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/ports.py +0 -0
  47. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/process.py +0 -0
  48. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/purge.py +0 -0
  49. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/model/traffic.py +0 -0
  50. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/presenter/__init__.py +0 -0
  51. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/reexec.py +0 -0
  52. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/services/agent.py +0 -0
  53. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/services/catalogue.py +0 -0
  54. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/services/control.py +0 -0
  55. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/services/gitbin.py +0 -0
  56. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/services/launch.py +0 -0
  57. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/services/supervisor.py +0 -0
  58. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/view/__init__.py +0 -0
  59. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/view/app.py +0 -0
  60. {plesty_server-0.3.2 → plesty_server-0.4.0.dev1}/plesty/server/view/workers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: plesty-server
3
- Version: 0.3.2
3
+ Version: 0.4.0.dev1
4
4
  Summary: The PLESTY bench application: installs, runs and field-tests device servers.
5
5
  Project-URL: Homepage, https://gitlab.com/plesty/core/plesty-bench
6
6
  Project-URL: Documentation, https://plesty.gitlab.io/core/plesty-bench/
@@ -11,34 +11,36 @@ License-File: LICENSE
11
11
  License-File: LICENSES/LGPL-3.0-or-later.txt
12
12
  Requires-Python: >=3.12
13
13
  Requires-Dist: click>=8.1
14
- Requires-Dist: plesty-bench==0.3.2
15
- Requires-Dist: plesty-lib>=0.4.0
14
+ Requires-Dist: plesty-bench==0.4.0.dev1
15
+ Requires-Dist: plesty-lib[report]>=0.5.0.dev8
16
16
  Requires-Dist: pyyaml>=6.0
17
17
  Requires-Dist: pyzmq>=26
18
18
  Provides-Extra: gui
19
- Requires-Dist: plesty-lib[gui]>=0.4.0; extra == 'gui'
19
+ Requires-Dist: plesty-lib[gui]>=0.5.0.dev8; extra == 'gui'
20
20
  Requires-Dist: pyside6==6.11.2; extra == 'gui'
21
21
  Description-Content-Type: text/markdown
22
22
 
23
23
  # plesty-server · plesty-bench
24
24
 
25
- **The bench PC's own console for the PLESTY platform.** It installs hub device
26
- modules, starts and supervises their device servers, runs field tests against
27
- the real instruments and keeps the logs — so a lab bench is set up and kept
28
- running from one place instead of one venv, one terminal and one hand-written
29
- `uv` pin per instrument.
25
+ **The bench PC's own console for the PLESTY platform.** It installs hub
26
+ modules, starts and supervises device servers, runs field tests against the
27
+ real instruments, and runs experiments across the lab's benches — keeping the
28
+ logs, the runs and their reports — so a lab bench is set up and kept running
29
+ from one place instead of one venv, one terminal and one hand-written `uv` pin
30
+ per instrument.
30
31
 
31
32
  This repository publishes two packages:
32
33
 
33
34
  | | Install on | Install with |
34
35
  |---|---|---|
35
- | **`plesty-server`** — the bench application: CLI, Qt console, agent | the bench PC | `uv tool install "plesty-server[gui]"` |
36
+ | **`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) |
36
37
  | **`plesty-bench`** — the client that drives a bench from elsewhere | your own machine | `uv tool install plesty-bench` |
37
38
 
38
- On a Windows bench, the [releases](https://gitlab.com/plesty/core/plesty-bench/-/releases)
39
- carry a `setup.exe` (per-user, no admin); macOS and Linux have `install.sh`.
40
- Both install `uv`, run the command above and add a Start-menu / Launchpad
41
- entry — they contain no application code of their own.
39
+ Each release carries a Windows `setup.exe` (per-user, no admin) and an
40
+ `install.sh` for macOS and Linux. Both install the whole application,
41
+ console included, pinned to that release, and add a Start-menu or Launchpad
42
+ entry. Without an installer, `uv tool install "plesty-server[gui]"` installs
43
+ the same thing on macOS or Linux.
42
44
 
43
45
  ## Bringing up a bench
44
46
 
@@ -68,25 +70,20 @@ plesty-bench -b lab-bench-03 control pm100d # a control panel per devic
68
70
  ## Documentation
69
71
 
70
72
  **[Full documentation](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/index.md)**
71
- — start there if anything below is unfamiliar. It is in two parts.
73
+ — start there if anything below is unfamiliar. It is in three parts:
72
74
 
73
- *Using a bench*, in the order you meet it:
74
-
75
- | | |
75
+ | Part | Covers |
76
76
  |---|---|
77
- | [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` |
78
- | [Device modules](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/modules.md) | The catalogue, installing, several versions side by side |
79
- | [Running device servers](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/running.md) | Start, stop, status, logs, the working fleet, headless benches |
80
- | [Field tests](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/field_test.md) | Running a module's field test against the instrument |
81
- | [The console](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/console.md) | Every part of the window, and the control panels |
82
- | [Working remotely](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/remote.md) | The agent and the `plesty-bench` client |
83
- | [Maintenance](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/maintenance.md) | Upgrading, clearing logs, purging, uninstalling |
84
- | [Command reference](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/cli.md) | Every `plesty-server` command |
77
+ | [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 |
78
+ | [CLI](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/cli/index.md) | `plesty-server`, `plesty-bench`, and every file and setting |
79
+ | [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 |
80
+
81
+ A new bench starts at [Set up a bench](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/usage/first_bench.md).
85
82
 
86
83
  *[Design and internals](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/design/index.md)*
87
- is the other part: the architecture, the process model, the port rules, the
88
- installer, the agent protocol, the platform differences and the release
89
- machinery — for contributors, and for anyone debugging behaviour that only
84
+ covers the architecture, the process model, the port rules, the
85
+ installer, the agent protocol, experiment runs, the platform differences and
86
+ the release machinery — for contributors, and for anyone debugging behaviour that only
90
87
  makes sense once the mechanism is visible.
91
88
 
92
89
  New to the platform? The [PLESTY quickstart](https://plesty.net/learn/quickstart/index.html)
@@ -0,0 +1,68 @@
1
+ # plesty-server · plesty-bench
2
+
3
+ **The bench PC's own console for the PLESTY platform.** It installs hub
4
+ modules, starts and supervises device servers, runs field tests against the
5
+ real instruments, and runs experiments across the lab's benches — keeping the
6
+ logs, the runs and their reports — so a lab bench is set up and kept running
7
+ from one place instead of one venv, one terminal and one hand-written `uv` pin
8
+ per instrument.
9
+
10
+ This repository publishes two packages:
11
+
12
+ | | Install on | Install with |
13
+ |---|---|---|
14
+ | **`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) |
15
+ | **`plesty-bench`** — the client that drives a bench from elsewhere | your own machine | `uv tool install plesty-bench` |
16
+
17
+ Each release carries a Windows `setup.exe` (per-user, no admin) and an
18
+ `install.sh` for macOS and Linux. Both install the whole application,
19
+ console included, pinned to that release, and add a Start-menu or Launchpad
20
+ entry. Without an installer, `uv tool install "plesty-server[gui]"` installs
21
+ the same thing on macOS or Linux.
22
+
23
+ ## Bringing up a bench
24
+
25
+ ```bash
26
+ plesty-server fleet init # a fleet.yaml to declare into
27
+ plesty-server declare pm100d plesty-pm100d --version 0.2.1 \
28
+ --arg --address --arg "USB0::0x1313::…::INSTR"
29
+ plesty-server start pm100d # installs, launches, waits until it answers
30
+ plesty-server status
31
+ ```
32
+
33
+ The instrument is now reachable from an experiment PC at this machine's
34
+ address on the port `status` reports. `plesty-server gui` opens the same bench
35
+ in a window; `plesty-server fleet run` keeps it up headless after a reboot.
36
+
37
+ ## Driving it from your own machine
38
+
39
+ The bench serves an agent; the client sends it `plesty-server` command lines
40
+ and follows the output.
41
+
42
+ ```bash
43
+ plesty-bench -b lab-bench-03 status
44
+ plesty-bench -b lab-bench-03 field-test pm100d --gates connect,drain
45
+ plesty-bench -b lab-bench-03 control pm100d # a control panel per device
46
+ ```
47
+
48
+ ## Documentation
49
+
50
+ **[Full documentation](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/index.md)**
51
+ — start there if anything below is unfamiliar. It is in three parts:
52
+
53
+ | Part | Covers |
54
+ |---|---|
55
+ | [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 |
56
+ | [CLI](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/cli/index.md) | `plesty-server`, `plesty-bench`, and every file and setting |
57
+ | [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 |
58
+
59
+ A new bench starts at [Set up a bench](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/usage/first_bench.md).
60
+
61
+ *[Design and internals](https://gitlab.com/plesty/core/plesty-bench/-/blob/main/docs/design/index.md)*
62
+ covers the architecture, the process model, the port rules, the
63
+ installer, the agent protocol, experiment runs, the platform differences and
64
+ the release machinery — for contributors, and for anyone debugging behaviour that only
65
+ makes sense once the mechanism is visible.
66
+
67
+ New to the platform? The [PLESTY quickstart](https://plesty.net/learn/quickstart/index.html)
68
+ runs a whole experiment against a bench and is the gentlest way in.
@@ -88,15 +88,23 @@ QMenu::separator {
88
88
  font-size: 11px;
89
89
  }
90
90
 
91
- QTableWidget, QTableView {
91
+ /* Trees are styled with tables, not left out of them: an unstyled view keeps
92
+ Qt's own palette, whose alternate row is a pale grey that reads as disabled
93
+ text on this ground — and every other row of the Data tree was unreadable. */
94
+ QTableWidget, QTableView, QTreeWidget, QTreeView {
92
95
  background: {{surface}};
93
96
  alternate-background-color: {{surface2}};
97
+ color: {{text}};
94
98
  border: none;
95
99
  gridline-color: {{line}};
96
100
  selection-background-color: {{selection}};
97
101
  selection-color: {{text_bright}};
98
102
  }
99
103
 
104
+ QTreeWidget::branch {
105
+ background: transparent;
106
+ }
107
+
100
108
  QHeaderView::section {
101
109
  background: {{surface2}};
102
110
  color: {{muted}};
@@ -108,7 +116,7 @@ QHeaderView::section {
108
116
  letter-spacing: 0.04em;
109
117
  }
110
118
 
111
- QTableWidget::item {
119
+ QTableWidget::item, QTreeWidget::item {
112
120
  padding: 4px 8px;
113
121
  }
114
122
 
@@ -120,8 +128,12 @@ QTableWidget::item {
120
128
  like nothing is picked. */
121
129
  QTableWidget::item:selected,
122
130
  QTableView::item:selected,
131
+ QTreeWidget::item:selected,
132
+ QTreeView::item:selected,
123
133
  QTableWidget::item:selected:!active,
124
- QTableView::item:selected:!active {
134
+ QTableView::item:selected:!active,
135
+ QTreeWidget::item:selected:!active,
136
+ QTreeView::item:selected:!active {
125
137
  background: {{selection}};
126
138
  color: {{text_bright}};
127
139
  }
@@ -157,6 +169,14 @@ QTabWidget::pane {
157
169
  background: transparent;
158
170
  }
159
171
 
172
+ /* The strip the tabs sit on, which is not the tabs themselves. Without this it
173
+ * takes {{night}} from the QWidget rule and reads as a black band across a
174
+ * card that is {{surface}} — the tabs were already transparent, so what showed
175
+ * through was the wrong colour rather than the card behind them. */
176
+ QTabBar {
177
+ background: transparent;
178
+ }
179
+
160
180
  QTabBar::tab {
161
181
  background: transparent;
162
182
  color: {{muted}};
@@ -234,18 +254,29 @@ QPushButton#primary:disabled, QPushButton#danger:disabled {
234
254
  color: {{faint}};
235
255
  }
236
256
 
237
- QLineEdit, QComboBox, QSpinBox, QPlainTextEdit#editor {
257
+ /* QAbstractSpinBox, not QSpinBox: a stylesheet selector names an exact class
258
+ and does not follow inheritance, so naming only QSpinBox left every float
259
+ field — QDoubleSpinBox — with Qt's own white-on-white default. */
260
+ QLineEdit, QComboBox, QAbstractSpinBox, QPlainTextEdit#editor {
238
261
  background: {{surface2}};
262
+ color: {{text}};
239
263
  border: 1px solid {{line_strong}};
240
264
  border-radius: 6px;
241
265
  padding: 4px 8px;
242
266
  selection-background-color: {{selection}};
267
+ selection-color: {{text_bright}};
243
268
  }
244
269
 
245
- QLineEdit:focus, QComboBox:focus, QSpinBox:focus {
270
+ QLineEdit:focus, QComboBox:focus, QAbstractSpinBox:focus {
246
271
  border-color: {{cyan}};
247
272
  }
248
273
 
274
+ QAbstractSpinBox::up-button, QAbstractSpinBox::down-button {
275
+ background: {{surface}};
276
+ border-left: 1px solid {{line}};
277
+ width: 14px;
278
+ }
279
+
249
280
  QComboBox QAbstractItemView {
250
281
  background: {{surface2}};
251
282
  border: 1px solid {{line_strong}};
@@ -303,6 +334,64 @@ QGroupBox::title {
303
334
  font-weight: 600;
304
335
  }
305
336
 
337
+ /* A group of an experiment's settings, or one device of its fleet file. The
338
+ title is what the eye finds first — accent colour, heavier than any key —
339
+ and the keys under it are muted, so the values are what reads brightest. */
340
+ QGroupBox#settingsGroup {
341
+ background: {{surface}};
342
+ border: 1px solid {{line}};
343
+ border-radius: 8px;
344
+ margin-top: 20px;
345
+ padding: 14px 12px 10px 12px;
346
+ }
347
+
348
+ QGroupBox#settingsGroup::title {
349
+ subcontrol-origin: margin;
350
+ left: 12px;
351
+ padding: 0 6px;
352
+ color: {{cyan}};
353
+ font-size: 13px;
354
+ font-weight: 700;
355
+ letter-spacing: 0.03em;
356
+ }
357
+
358
+ QLabel#settingKey {
359
+ background: transparent;
360
+ color: {{muted}};
361
+ }
362
+
363
+ /* A value shown, not set here — an address built from a machine and a port.
364
+ Flat and muted, so it does not read as a field waiting for input. */
365
+ QGroupBox#settingsGroup QLineEdit[readOnly="true"] {
366
+ background: transparent;
367
+ border-color: transparent;
368
+ color: {{muted}};
369
+ }
370
+
371
+ /* Every QWidget is painted the window's colour; inside a group box that drew a
372
+ dark strip behind a check box, the width of the row. What is not an input
373
+ takes the box's colour instead. */
374
+ QGroupBox#settingsGroup QCheckBox,
375
+ QGroupBox#settingsGroup QLabel,
376
+ QWidget#listEditor {
377
+ background: transparent;
378
+ }
379
+
380
+ /* The column names over a list setting's rows. */
381
+ QLabel#listHeading {
382
+ background: transparent;
383
+ color: {{faint}};
384
+ font-size: 11px;
385
+ }
386
+
387
+ /* + and − at the end of each row of a list setting. */
388
+ QPushButton#listButton {
389
+ min-width: 24px;
390
+ max-width: 24px;
391
+ padding: 2px 0;
392
+ font-weight: 700;
393
+ }
394
+
306
395
  QStatusBar {
307
396
  background: {{night2}};
308
397
  border-top: 1px solid {{line}};