plesty-server 0.2.1__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 (42) hide show
  1. plesty_server-0.2.1/LICENSE +184 -0
  2. plesty_server-0.2.1/LICENSES/LGPL-3.0-or-later.txt +165 -0
  3. plesty_server-0.2.1/PKG-INFO +45 -0
  4. plesty_server-0.2.1/README.md +24 -0
  5. plesty_server-0.2.1/plesty/server/__init__.py +22 -0
  6. plesty_server-0.2.1/plesty/server/__main__.py +9 -0
  7. plesty_server-0.2.1/plesty/server/assets/console.qss +321 -0
  8. plesty_server-0.2.1/plesty/server/assets/env.example +12 -0
  9. plesty_server-0.2.1/plesty/server/assets/fleet.example.yaml +44 -0
  10. plesty_server-0.2.1/plesty/server/assets/plesty-mark.svg +54 -0
  11. plesty_server-0.2.1/plesty/server/cli/__init__.py +14 -0
  12. plesty_server-0.2.1/plesty/server/cli/main.py +761 -0
  13. plesty_server-0.2.1/plesty/server/config.yaml +21 -0
  14. plesty_server-0.2.1/plesty/server/host.py +262 -0
  15. plesty_server-0.2.1/plesty/server/model/__init__.py +144 -0
  16. plesty_server-0.2.1/plesty/server/model/catalogue.py +130 -0
  17. plesty_server-0.2.1/plesty/server/model/device.py +177 -0
  18. plesty_server-0.2.1/plesty/server/model/device_manager.py +364 -0
  19. plesty_server-0.2.1/plesty/server/model/envfile.py +65 -0
  20. plesty_server-0.2.1/plesty/server/model/errors.py +8 -0
  21. plesty_server-0.2.1/plesty/server/model/field_test.py +356 -0
  22. plesty_server-0.2.1/plesty/server/model/fleet.py +205 -0
  23. plesty_server-0.2.1/plesty/server/model/home.py +159 -0
  24. plesty_server-0.2.1/plesty/server/model/job.py +268 -0
  25. plesty_server-0.2.1/plesty/server/model/ports.py +136 -0
  26. plesty_server-0.2.1/plesty/server/model/process.py +124 -0
  27. plesty_server-0.2.1/plesty/server/presenter/__init__.py +15 -0
  28. plesty_server-0.2.1/plesty/server/presenter/bench.py +990 -0
  29. plesty_server-0.2.1/plesty/server/reexec.py +69 -0
  30. plesty_server-0.2.1/plesty/server/services/__init__.py +58 -0
  31. plesty_server-0.2.1/plesty/server/services/agent.py +243 -0
  32. plesty_server-0.2.1/plesty/server/services/catalogue.py +106 -0
  33. plesty_server-0.2.1/plesty/server/services/installer.py +324 -0
  34. plesty_server-0.2.1/plesty/server/services/jobs.py +118 -0
  35. plesty_server-0.2.1/plesty/server/services/launch.py +178 -0
  36. plesty_server-0.2.1/plesty/server/services/supervisor.py +437 -0
  37. plesty_server-0.2.1/plesty/server/view/__init__.py +21 -0
  38. plesty_server-0.2.1/plesty/server/view/app.py +97 -0
  39. plesty_server-0.2.1/plesty/server/view/dialogs.py +808 -0
  40. plesty_server-0.2.1/plesty/server/view/window.py +786 -0
  41. plesty_server-0.2.1/plesty/server/view/workers.py +92 -0
  42. plesty_server-0.2.1/pyproject.toml +40 -0
@@ -0,0 +1,184 @@
1
+ Copyright (C) 2026 Plesty Development Team
2
+
3
+ This file is part of Plesty.
4
+
5
+ Plesty is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU Lesser General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ Plesty is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU Lesser General Public License for more details.
14
+
15
+ You should have received a copy of the GNU Lesser General Public License
16
+ along with Plesty. If not, see <https://www.gnu.org/licenses/> or the copy below.
17
+
18
+ #########################################################################
19
+
20
+ GNU LESSER GENERAL PUBLIC LICENSE
21
+ Version 3, 29 June 2007
22
+
23
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
24
+ Everyone is permitted to copy and distribute verbatim copies
25
+ of this license document, but changing it is not allowed.
26
+
27
+
28
+ This version of the GNU Lesser General Public License incorporates
29
+ the terms and conditions of version 3 of the GNU General Public
30
+ License, supplemented by the additional permissions listed below.
31
+
32
+ 0. Additional Definitions.
33
+
34
+ As used herein, "this License" refers to version 3 of the GNU Lesser
35
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
36
+ General Public License.
37
+
38
+ "The Library" refers to a covered work governed by this License,
39
+ other than an Application or a Combined Work as defined below.
40
+
41
+ An "Application" is any work that makes use of an interface provided
42
+ by the Library, but which is not otherwise based on the Library.
43
+ Defining a subclass of a class defined by the Library is deemed a mode
44
+ of using an interface provided by the Library.
45
+
46
+ A "Combined Work" is a work produced by combining or linking an
47
+ Application with the Library. The particular version of the Library
48
+ with which the Combined Work was made is also called the "Linked
49
+ Version".
50
+
51
+ The "Minimal Corresponding Source" for a Combined Work means the
52
+ Corresponding Source for the Combined Work, excluding any source code
53
+ for portions of the Combined Work that, considered in isolation, are
54
+ based on the Application, and not on the Linked Version.
55
+
56
+ The "Corresponding Application Code" for a Combined Work means the
57
+ object code and/or source code for the Application, including any data
58
+ and utility programs needed for reproducing the Combined Work from the
59
+ Application, but excluding the System Libraries of the Combined Work.
60
+
61
+ 1. Exception to Section 3 of the GNU GPL.
62
+
63
+ You may convey a covered work under sections 3 and 4 of this License
64
+ without being bound by section 3 of the GNU GPL.
65
+
66
+ 2. Conveying Modified Versions.
67
+
68
+ If you modify a copy of the Library, and, in your modifications, a
69
+ facility refers to a function or data to be supplied by an Application
70
+ that uses the facility (other than as an argument passed when the
71
+ facility is invoked), then you may convey a copy of the modified
72
+ version:
73
+
74
+ a) under this License, provided that you make a good faith effort to
75
+ ensure that, in the event an Application does not supply the
76
+ function or data, the facility still operates, and performs
77
+ whatever part of its purpose remains meaningful, or
78
+
79
+ b) under the GNU GPL, with none of the additional permissions of
80
+ this License applicable to that copy.
81
+
82
+ 3. Object Code Incorporating Material from Library Header Files.
83
+
84
+ The object code form of an Application may incorporate material from
85
+ a header file that is part of the Library. You may convey such object
86
+ code under terms of your choice, provided that, if the incorporated
87
+ material is not limited to numerical parameters, data structure
88
+ layouts and accessors, or small macros, inline functions and templates
89
+ (ten or fewer lines in length), you do both of the following:
90
+
91
+ a) Give prominent notice with each copy of the object code that the
92
+ Library is used in it and that the Library and its use are
93
+ covered by this License.
94
+
95
+ b) Accompany the object code with a copy of the GNU GPL and this license
96
+ document.
97
+
98
+ 4. Combined Works.
99
+
100
+ You may convey a Combined Work under terms of your choice that,
101
+ taken together, effectively do not restrict modification of the
102
+ portions of the Library contained in the Combined Work and reverse
103
+ engineering for debugging such modifications, if you also do each of
104
+ the following:
105
+
106
+ a) Give prominent notice with each copy of the Combined Work that
107
+ the Library is used in it and that the Library and its use are
108
+ covered by this License.
109
+
110
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
111
+ document.
112
+
113
+ c) For a Combined Work that displays copyright notices during
114
+ execution, include the copyright notice for the Library among
115
+ these notices, as well as a reference directing the user to the
116
+ copies of the GNU GPL and this license document.
117
+
118
+ d) Do one of the following:
119
+
120
+ 0) Convey the Minimal Corresponding Source under the terms of this
121
+ License, and the Corresponding Application Code in a form
122
+ suitable for, and under terms that permit, the user to
123
+ recombine or relink the Application with a modified version of
124
+ the Linked Version to produce a modified Combined Work, in the
125
+ manner specified by section 6 of the GNU GPL for conveying
126
+ Corresponding Source.
127
+
128
+ 1) Use a suitable shared library mechanism for linking with the
129
+ Library. A suitable mechanism is one that (a) uses at run time
130
+ a copy of the Library already present on the user's computer
131
+ system, and (b) will operate properly with a modified version
132
+ of the Library that is interface-compatible with the Linked
133
+ Version.
134
+
135
+ e) Provide Installation Information, but only if you would otherwise
136
+ be required to provide such information under section 6 of the
137
+ GNU GPL, and only to the extent that such information is
138
+ necessary to install and execute a modified version of the
139
+ Combined Work produced by recombining or relinking the
140
+ Application with a modified version of the Linked Version. (If
141
+ you use option 4d0, the Installation Information must accompany
142
+ the Minimal Corresponding Source and Corresponding Application
143
+ Code. If you use option 4d1, you must provide the Installation
144
+ Information in the manner specified by section 6 of the GNU GPL
145
+ for conveying Corresponding Source.)
146
+
147
+ 5. Combined Libraries.
148
+
149
+ You may place library facilities that are a work based on the
150
+ Library side by side in a single library together with other library
151
+ facilities that are not Applications and are not covered by this
152
+ License, and convey such a combined library under terms of your
153
+ choice, if you do both of the following:
154
+
155
+ a) Accompany the combined library with a copy of the same work based
156
+ on the Library, uncombined with any other library facilities,
157
+ conveyed under the terms of this License.
158
+
159
+ b) Give prominent notice with the combined library that part of it
160
+ is a work based on the Library, and explaining where to find the
161
+ accompanying uncombined form of the same work.
162
+
163
+ 6. Revised Versions of the GNU Lesser General Public License.
164
+
165
+ The Free Software Foundation may publish revised and/or new versions
166
+ of the GNU Lesser General Public License from time to time. Such new
167
+ versions will be similar in spirit to the present version, but may
168
+ differ in detail to address new problems or concerns.
169
+
170
+ Each version is given a distinguishing version number. If the
171
+ Library as you received it specifies that a certain numbered version
172
+ of the GNU Lesser General Public License "or any later version"
173
+ applies to it, you have the option of following the terms and
174
+ conditions either of that published version or of any later version
175
+ published by the Free Software Foundation. If the Library as you
176
+ received it does not specify a version number of the GNU Lesser
177
+ General Public License, you may choose any version of the GNU Lesser
178
+ General Public License ever published by the Free Software Foundation.
179
+
180
+ If the Library as you received it specifies that a proxy can decide
181
+ whether future versions of the GNU Lesser General Public License shall
182
+ apply, that proxy's public statement of acceptance of any version is
183
+ permanent authorization for you to choose that version for the
184
+ Library.
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
@@ -0,0 +1,45 @@
1
+ Metadata-Version: 2.5
2
+ Name: plesty-server
3
+ Version: 0.2.1
4
+ Summary: The PLESTY bench application: installs, runs and field-tests device servers.
5
+ Project-URL: Homepage, https://gitlab.com/plesty/core/plesty-bench
6
+ Project-URL: Documentation, https://plesty.gitlab.io/core/plesty-bench/
7
+ Author-email: Yunshuang Yuan <yuanyunshuang@gmail.com>
8
+ Maintainer-email: Plesty Development Team <plesty.dev@example.com>
9
+ License-Expression: LGPL-3.0-or-later
10
+ License-File: LICENSE
11
+ License-File: LICENSES/LGPL-3.0-or-later.txt
12
+ Requires-Python: >=3.12
13
+ Requires-Dist: click>=8.1
14
+ Requires-Dist: plesty-bench==0.2.1
15
+ Requires-Dist: plesty-lib>=0.3.3
16
+ Requires-Dist: pyyaml>=6.0
17
+ Requires-Dist: pyzmq>=26
18
+ Provides-Extra: gui
19
+ Requires-Dist: plesty-lib[gui]>=0.3.3; extra == 'gui'
20
+ Description-Content-Type: text/markdown
21
+
22
+ # plesty-server
23
+
24
+ The bench PC's own console for the PLESTY platform: installs hub device
25
+ modules (several versions side by side), launches and supervises their device
26
+ servers, runs field tests against the instruments, and keeps the logs — so
27
+ running the platform on a lab bench is no longer hand work.
28
+
29
+ Two deliverables from one repository:
30
+
31
+ - **`plesty.server`** — the bench application (CLI `plesty-server`, Qt
32
+ console `plesty-server-gui`, agent), on PyPI as **`plesty-server`**:
33
+ `uv tool install "plesty-server[gui]"` — or the light installers from the
34
+ [releases](https://gitlab.com/plesty/core/plesty-bench/-/releases) (Windows
35
+ `setup.exe`; `install.sh` for macOS/Linux), which do exactly that plus the
36
+ Start-menu / Launchpad entry.
37
+ - **`plesty.bench`** — the remote client, on PyPI as **`plesty-bench`**
38
+ (`uv tool install plesty-bench`). The CLI is the API:
39
+ `plesty-bench -b lab-bench-03 field-test pm100d` runs it on the bench and
40
+ follows the job.
41
+
42
+ Built as model – services – presenter – view, with one module (`host`) for
43
+ everything that differs between Windows and POSIX. See `docs/` for the
44
+ architecture, the process-management and cross-platform primers, the console
45
+ and the remote loop.
@@ -0,0 +1,24 @@
1
+ # plesty-server
2
+
3
+ The bench PC's own console for the PLESTY platform: installs hub device
4
+ modules (several versions side by side), launches and supervises their device
5
+ servers, runs field tests against the instruments, and keeps the logs — so
6
+ running the platform on a lab bench is no longer hand work.
7
+
8
+ Two deliverables from one repository:
9
+
10
+ - **`plesty.server`** — the bench application (CLI `plesty-server`, Qt
11
+ console `plesty-server-gui`, agent), on PyPI as **`plesty-server`**:
12
+ `uv tool install "plesty-server[gui]"` — or the light installers from the
13
+ [releases](https://gitlab.com/plesty/core/plesty-bench/-/releases) (Windows
14
+ `setup.exe`; `install.sh` for macOS/Linux), which do exactly that plus the
15
+ Start-menu / Launchpad entry.
16
+ - **`plesty.bench`** — the remote client, on PyPI as **`plesty-bench`**
17
+ (`uv tool install plesty-bench`). The CLI is the API:
18
+ `plesty-bench -b lab-bench-03 field-test pm100d` runs it on the bench and
19
+ follows the job.
20
+
21
+ Built as model – services – presenter – view, with one module (`host`) for
22
+ everything that differs between Windows and POSIX. See `docs/` for the
23
+ architecture, the process-management and cross-platform primers, the console
24
+ and the remote loop.
@@ -0,0 +1,22 @@
1
+ # SPDX-FileCopyrightText: 2026 Yunshuang Yuan
2
+ # SPDX-License-Identifier: LGPL-3.0-or-later
3
+
4
+ """Server plesty module."""
5
+
6
+ from typing import Any
7
+
8
+ from plesty.lib.utils.config import module_config
9
+
10
+ __all__ = [
11
+ "load_config",
12
+ ]
13
+
14
+
15
+ def load_config() -> dict[str, Any]:
16
+ """Load the packaged module configuration (constants and running defaults).
17
+
18
+ Returns:
19
+ The parsed ``config.yaml`` shipped with this module.
20
+ """
21
+ config: dict[str, Any] = module_config(__name__)
22
+ return config
@@ -0,0 +1,9 @@
1
+ # SPDX-FileCopyrightText: 2026 Yunshuang Yuan
2
+ # SPDX-License-Identifier: LGPL-3.0-or-later
3
+
4
+ """``python -m plesty.server`` — the ``plesty-server`` command line."""
5
+
6
+ from plesty.server.cli.main import main
7
+
8
+ if __name__ == "__main__": # pragma: no cover
9
+ main()