pts-framework 0.6.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 (65) hide show
  1. pts_framework-0.6.1/PKG-INFO +95 -0
  2. pts_framework-0.6.1/README.md +55 -0
  3. pts_framework-0.6.1/pyproject.toml +141 -0
  4. pts_framework-0.6.1/setup.cfg +4 -0
  5. pts_framework-0.6.1/src/pts_framework.egg-info/PKG-INFO +95 -0
  6. pts_framework-0.6.1/src/pts_framework.egg-info/SOURCES.txt +63 -0
  7. pts_framework-0.6.1/src/pts_framework.egg-info/dependency_links.txt +1 -0
  8. pts_framework-0.6.1/src/pts_framework.egg-info/entry_points.txt +3 -0
  9. pts_framework-0.6.1/src/pts_framework.egg-info/requires.txt +25 -0
  10. pts_framework-0.6.1/src/pts_framework.egg-info/top_level.txt +1 -0
  11. pts_framework-0.6.1/src/pypts/XYGraph/StreamContainer.py +67 -0
  12. pts_framework-0.6.1/src/pypts/XYGraph/XY_graph.py +362 -0
  13. pts_framework-0.6.1/src/pypts/XYGraph/simulated_signals.py +88 -0
  14. pts_framework-0.6.1/src/pypts/YamVIEW/__init__.py +3 -0
  15. pts_framework-0.6.1/src/pypts/YamVIEW/customGUIModules.py +416 -0
  16. pts_framework-0.6.1/src/pypts/YamVIEW/recipe_creator.py +569 -0
  17. pts_framework-0.6.1/src/pypts/YamVIEW/recipe_sequencer_setup.py +523 -0
  18. pts_framework-0.6.1/src/pypts/YamVIEW/recipe_step_setup.py +577 -0
  19. pts_framework-0.6.1/src/pypts/YamVIEW/styles.py +13 -0
  20. pts_framework-0.6.1/src/pypts/YamVIEW/verify_recipe.py +105 -0
  21. pts_framework-0.6.1/src/pypts/__init__.py +41 -0
  22. pts_framework-0.6.1/src/pypts/__main__.py +43 -0
  23. pts_framework-0.6.1/src/pypts/_version.py +24 -0
  24. pts_framework-0.6.1/src/pypts/clim_chamber.py +41 -0
  25. pts_framework-0.6.1/src/pypts/common.py +11 -0
  26. pts_framework-0.6.1/src/pypts/dev_tests.py +82 -0
  27. pts_framework-0.6.1/src/pypts/event_proxy.py +226 -0
  28. pts_framework-0.6.1/src/pypts/example_tests.py +213 -0
  29. pts_framework-0.6.1/src/pypts/examples/environment_setup_tools/Minimal_setup/Minimal_setup_recipe.yml +212 -0
  30. pts_framework-0.6.1/src/pypts/examples/environment_setup_tools/Minimal_setup/README.md +41 -0
  31. pts_framework-0.6.1/src/pypts/examples/environment_setup_tools/Minimal_setup/init_env_min.py +46 -0
  32. pts_framework-0.6.1/src/pypts/examples/environment_setup_tools/Minimal_setup/tests/example_tests.py +86 -0
  33. pts_framework-0.6.1/src/pypts/examples/environment_setup_tools/Package_based_setup/Package_based_recipe.yml +215 -0
  34. pts_framework-0.6.1/src/pypts/examples/environment_setup_tools/Package_based_setup/README.md +55 -0
  35. pts_framework-0.6.1/src/pypts/examples/environment_setup_tools/Package_based_setup/init_env_pack.py +91 -0
  36. pts_framework-0.6.1/src/pypts/examples/environment_setup_tools/Package_based_setup/pyproject.toml +76 -0
  37. pts_framework-0.6.1/src/pypts/examples/environment_setup_tools/Package_based_setup/tests/example_tests.py +86 -0
  38. pts_framework-0.6.1/src/pypts/exceptions.py +3 -0
  39. pts_framework-0.6.1/src/pypts/gui.py +818 -0
  40. pts_framework-0.6.1/src/pypts/gui_components/__init__.py +5 -0
  41. pts_framework-0.6.1/src/pypts/gui_components/interaction_panel.py +206 -0
  42. pts_framework-0.6.1/src/pypts/gui_components/log_panel.py +53 -0
  43. pts_framework-0.6.1/src/pypts/gui_components/resources.py +87 -0
  44. pts_framework-0.6.1/src/pypts/gui_components/results_panel.py +162 -0
  45. pts_framework-0.6.1/src/pypts/gui_components/step_table.py +159 -0
  46. pts_framework-0.6.1/src/pypts/gui_components/styles.py +463 -0
  47. pts_framework-0.6.1/src/pypts/gui_components/toolbar.py +115 -0
  48. pts_framework-0.6.1/src/pypts/gui_theme.py +164 -0
  49. pts_framework-0.6.1/src/pypts/instruments/__init__.py +15 -0
  50. pts_framework-0.6.1/src/pypts/instruments/pendulum/__init__.py +7 -0
  51. pts_framework-0.6.1/src/pypts/instruments/pendulum/cnt91.py +122 -0
  52. pts_framework-0.6.1/src/pypts/pts.py +250 -0
  53. pts_framework-0.6.1/src/pypts/recipe.py +802 -0
  54. pts_framework-0.6.1/src/pypts/recipe_artifacts.py +85 -0
  55. pts_framework-0.6.1/src/pypts/recipe_language.py +389 -0
  56. pts_framework-0.6.1/src/pypts/recipe_parser.py +552 -0
  57. pts_framework-0.6.1/src/pypts/recipe_reference.py +217 -0
  58. pts_framework-0.6.1/src/pypts/recipes/shared_object_example.py +23 -0
  59. pts_framework-0.6.1/src/pypts/recipes/shared_resource_client.py +24 -0
  60. pts_framework-0.6.1/src/pypts/recipes/shared_resource_server.py +62 -0
  61. pts_framework-0.6.1/src/pypts/recipes/shared_resource_tests_example.py +31 -0
  62. pts_framework-0.6.1/src/pypts/report.py +544 -0
  63. pts_framework-0.6.1/src/pypts/startup.py +86 -0
  64. pts_framework-0.6.1/src/pypts/steps.py +1257 -0
  65. pts_framework-0.6.1/src/pypts/utils.py +290 -0
@@ -0,0 +1,95 @@
1
+ Metadata-Version: 2.4
2
+ Name: pts-framework
3
+ Version: 0.6.1
4
+ Summary: Hardware-oriented testing framework developed by BE-CEM-MTA
5
+ Author-email: Odd Oyvind Andreassen <odd.oyvind.andreassen@cern.ch>, Bartlomiej Banas <Bartlomiej.Banas@cern.ch>, Oliver Damborg <odamborg@cern.ch>, Alvaro Martinez Landete <alvaro.martinez.landete@cern.ch>
6
+ License-Expression: LGPL-2.1-or-later
7
+ Project-URL: Homepage, https://github.com/CERN/pts-framework
8
+ Project-URL: Repository, https://github.com/CERN/pts-framework
9
+ Project-URL: Changelog, https://github.com/CERN/pts-framework/blob/master/CHANGELOG.md
10
+ Keywords: testing,hardware,instrumentation,cern
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Operating System :: OS Independent
16
+ Requires-Python: >=3.13
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: hightime==0.2.2
19
+ Requires-Dist: matplotlib
20
+ Requires-Dist: nidmm==1.4.8
21
+ Requires-Dist: numpy
22
+ Requires-Dist: PySide6==6.9.1
23
+ Requires-Dist: PyYAML==6.0.2
24
+ Requires-Dist: ruamel.yaml
25
+ Requires-Dist: pymeasure==0.15.0
26
+ Requires-Dist: pyserial
27
+ Requires-Dist: paramiko
28
+ Requires-Dist: pydantic<3,>=2.13
29
+ Requires-Dist: pyvisa
30
+ Provides-Extra: test
31
+ Requires-Dist: pytest; extra == "test"
32
+ Requires-Dist: pytest-qt; extra == "test"
33
+ Requires-Dist: pytest-cov; extra == "test"
34
+ Requires-Dist: pytest-timeout; extra == "test"
35
+ Provides-Extra: doc
36
+ Requires-Dist: Sphinx; extra == "doc"
37
+ Provides-Extra: dev
38
+ Requires-Dist: pts-framework[doc,test]; extra == "dev"
39
+ Requires-Dist: ruff; extra == "dev"
40
+
41
+ <!--
42
+ SPDX-FileCopyrightText: 2025 CERN <home.cern>
43
+
44
+ SPDX-License-Identifier: CC-BY-SA-4.0
45
+ -->
46
+
47
+ # pypts
48
+
49
+ ![pypts quick run](images/pypts_quick_run.gif)
50
+
51
+ Hardware-oriented testing framework developed by BE-CEM-MTA.
52
+
53
+ ## Key Features
54
+
55
+ * **YAML-based Recipes:** Define test sequences, steps, parameters, and variables using structured YAML files.
56
+ * **Modular Steps:** Supports various step types including Python function calls, sub-sequence execution, user interaction prompts, wait times, and indexed steps for running tasks multiple times with varying inputs.
57
+ **Reliable order execution:** Unlike pytest-order, the reliably follows the specified order.
58
+ * **Variable Scopes:** Manages global variables for the recipe and local variables within sequences.
59
+ * **Threaded Execution:** Runs recipes in a separate thread using `pts.run_pts`.
60
+ * **Incremental Reporting:** Generates a detailed CSV report (`report.csv`) in real-time as steps complete.
61
+ * **Contextual Reports:** Includes run context (Recipe Name, File Name, Serial Number) and step context (Sequence Name) in reports.
62
+ * **HTML Reports:** Provides a utility to convert the CSV report into a styled HTML file (`report.html`) for easy viewing, similar to `pytest-html`.
63
+ * **Event System:** Uses queues for inter-thread communication and event reporting (e.g., step start/end).
64
+
65
+ For full documentation, please visit [PTS Framework Documentation](https://acc-py.web.cern.ch/gitlab/pts/framework/pypts/docs/stable/).
66
+
67
+ =======
68
+
69
+ ## Continuous integration and releases
70
+
71
+ The project is tested in a disposable Python 3.13 Docker image. To reproduce the
72
+ GitHub CI build locally, run:
73
+
74
+ ```sh
75
+ docker build --build-arg SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PTS_FRAMEWORK=0+local -t pts-framework-ci .
76
+ docker run --rm pts-framework-ci
77
+ ```
78
+
79
+ Creating a protected `vX.Y.Z` tag runs the same tests, builds the wheel and source
80
+ distribution, and publishes them to TestPyPI. Verify the TestPyPI package in a clean
81
+ environment before approving the `pypi` GitHub Environment:
82
+
83
+ ```sh
84
+ python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pts-framework==X.Y.Z
85
+ ```
86
+
87
+ Approval publishes the same distributions to PyPI. GitHub retains the release
88
+ artifact for 30 days; PyPI is the permanent package source. See
89
+ [release configuration](.github/RELEASE.md) for the one-time setup.
90
+
91
+ ## Licences
92
+
93
+ pypts is distributed under the **LGPL-2.1-or-later** licence.
94
+
95
+ pypts comes with a [dependency licence compatibility analysis report](https://acc-py.web.cern.ch/gitlab/pts/framework/pypts/docs/stable/dependency_license_analysis.html).
@@ -0,0 +1,55 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2025 CERN <home.cern>
3
+
4
+ SPDX-License-Identifier: CC-BY-SA-4.0
5
+ -->
6
+
7
+ # pypts
8
+
9
+ ![pypts quick run](images/pypts_quick_run.gif)
10
+
11
+ Hardware-oriented testing framework developed by BE-CEM-MTA.
12
+
13
+ ## Key Features
14
+
15
+ * **YAML-based Recipes:** Define test sequences, steps, parameters, and variables using structured YAML files.
16
+ * **Modular Steps:** Supports various step types including Python function calls, sub-sequence execution, user interaction prompts, wait times, and indexed steps for running tasks multiple times with varying inputs.
17
+ **Reliable order execution:** Unlike pytest-order, the reliably follows the specified order.
18
+ * **Variable Scopes:** Manages global variables for the recipe and local variables within sequences.
19
+ * **Threaded Execution:** Runs recipes in a separate thread using `pts.run_pts`.
20
+ * **Incremental Reporting:** Generates a detailed CSV report (`report.csv`) in real-time as steps complete.
21
+ * **Contextual Reports:** Includes run context (Recipe Name, File Name, Serial Number) and step context (Sequence Name) in reports.
22
+ * **HTML Reports:** Provides a utility to convert the CSV report into a styled HTML file (`report.html`) for easy viewing, similar to `pytest-html`.
23
+ * **Event System:** Uses queues for inter-thread communication and event reporting (e.g., step start/end).
24
+
25
+ For full documentation, please visit [PTS Framework Documentation](https://acc-py.web.cern.ch/gitlab/pts/framework/pypts/docs/stable/).
26
+
27
+ =======
28
+
29
+ ## Continuous integration and releases
30
+
31
+ The project is tested in a disposable Python 3.13 Docker image. To reproduce the
32
+ GitHub CI build locally, run:
33
+
34
+ ```sh
35
+ docker build --build-arg SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PTS_FRAMEWORK=0+local -t pts-framework-ci .
36
+ docker run --rm pts-framework-ci
37
+ ```
38
+
39
+ Creating a protected `vX.Y.Z` tag runs the same tests, builds the wheel and source
40
+ distribution, and publishes them to TestPyPI. Verify the TestPyPI package in a clean
41
+ environment before approving the `pypi` GitHub Environment:
42
+
43
+ ```sh
44
+ python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pts-framework==X.Y.Z
45
+ ```
46
+
47
+ Approval publishes the same distributions to PyPI. GitHub retains the release
48
+ artifact for 30 days; PyPI is the permanent package source. See
49
+ [release configuration](.github/RELEASE.md) for the one-time setup.
50
+
51
+ ## Licences
52
+
53
+ pypts is distributed under the **LGPL-2.1-or-later** licence.
54
+
55
+ pypts comes with a [dependency licence compatibility analysis report](https://acc-py.web.cern.ch/gitlab/pts/framework/pypts/docs/stable/dependency_license_analysis.html).
@@ -0,0 +1,141 @@
1
+ # SPDX-FileCopyrightText: 2025 CERN <home.cern>
2
+ #
3
+ # SPDX-License-Identifier: LGPL-2.1-or-later
4
+
5
+ [build-system]
6
+ requires = ["setuptools", "wheel", "setuptools_scm>=8"]
7
+ build-backend = "setuptools.build_meta"
8
+
9
+ [project]
10
+ name = "pts-framework"
11
+ dynamic = [
12
+ "version", # The version is taken directly from the repository, using setuptools-scm.
13
+ ]
14
+ description = "Hardware-oriented testing framework developed by BE-CEM-MTA"
15
+ readme = "README.md"
16
+ license = "LGPL-2.1-or-later"
17
+ keywords = ["testing", "hardware", "instrumentation", "cern"]
18
+ classifiers = [
19
+ "Development Status :: 3 - Alpha",
20
+ "Intended Audience :: Science/Research",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Operating System :: OS Independent",
24
+ ]
25
+ authors = [
26
+ { name = "Odd Oyvind Andreassen", email = "odd.oyvind.andreassen@cern.ch" },
27
+ { name = "Bartlomiej Banas", email = "Bartlomiej.Banas@cern.ch" },
28
+ { name = "Oliver Damborg", email = "odamborg@cern.ch" },
29
+ { name = "Alvaro Martinez Landete", email = "alvaro.martinez.landete@cern.ch" },
30
+ ]
31
+ # Specify the minimum Python version required. It is not safe to use
32
+ # this to control the *upper* version of Python.
33
+ requires-python = ">=3.13"
34
+
35
+ # The core dependencies of the project.
36
+ dependencies = [
37
+ "hightime==0.2.2",
38
+ "matplotlib",
39
+ "nidmm==1.4.8",
40
+ "numpy",
41
+ "PySide6==6.9.1",
42
+ "PyYAML==6.0.2",
43
+ "ruamel.yaml",
44
+ "pymeasure==0.15.0",
45
+ "pyserial",
46
+ "paramiko",
47
+ "pydantic>=2.13,<3",
48
+ "pyvisa"
49
+ ]
50
+
51
+ [project.optional-dependencies]
52
+ # The optional dependencies of the project, installable using the "extras" syntax.
53
+ test = [
54
+ "pytest",
55
+ "pytest-qt",
56
+ "pytest-cov",
57
+ "pytest-timeout",
58
+ ]
59
+ doc = [
60
+ "Sphinx",
61
+ ]
62
+ dev = [
63
+ # Dependencies for development of the project, such as type checkers,
64
+ # linters, etc.
65
+ # "requirement-for-development-purposes-only",
66
+
67
+ # Include the "test" and "doc" dependencies in the dev dependencies.
68
+ "pts-framework[doc,test]",
69
+ "ruff",
70
+ ]
71
+
72
+ [project.urls]
73
+ Homepage = "https://github.com/CERN/pts-framework"
74
+ Repository = "https://github.com/CERN/pts-framework"
75
+ Changelog = "https://github.com/CERN/pts-framework/blob/master/CHANGELOG.md"
76
+
77
+ [project.scripts]
78
+ init_env_min = "pypts.examples.environment_setup_tools.Minimal_setup.init_env_min:main"
79
+ init_env_pack = "pypts.examples.environment_setup_tools.Package_based_setup.init_env_pack:main"
80
+
81
+
82
+ [tool.setuptools.packages.find]
83
+ where = ["src"]
84
+ include = ["pypts", "pypts.*"]
85
+
86
+ [tool.setuptools.package-data]
87
+ "pypts.examples.environment_setup_tools.Minimal_setup" = [
88
+ "Minimal_setup_recipe.yml",
89
+ "README.md",
90
+ "tests/example_tests.py",
91
+ ]
92
+ "pypts.examples.environment_setup_tools.Package_based_setup" = [
93
+ "Package_based_recipe.yml",
94
+ "README.md",
95
+ "pyproject.toml",
96
+ "tests/example_tests.py",
97
+ ]
98
+
99
+ [tool.setuptools_scm]
100
+ # Tell setuptools_scm to write a _version.py file in the package. The
101
+ # _version.py file must not be committed to the repository.
102
+ version_file = "src/pypts/_version.py"
103
+
104
+ [tool.acc_py_template]
105
+ features = [
106
+ {name = "core", version = 2},
107
+ {name = "docs", version = 2},
108
+ ]
109
+
110
+ [tool.pytest.ini_options]
111
+ minversion = "7.0"
112
+ addopts = "--strict-markers"
113
+ timeout = 90
114
+ faulthandler_timeout = 60
115
+ testpaths = ["tests"]
116
+ markers = [
117
+ "unit: unit tests",
118
+ "functional: functional tests",
119
+ ]
120
+
121
+ [tool.coverage.run]
122
+ source = ["src/pypts"]
123
+ omit = [
124
+ "*/tests/*",
125
+ "*/test_*.py",
126
+ "*/__pycache__/*",
127
+ "*/site-packages/*",
128
+ ]
129
+
130
+ [tool.coverage.report]
131
+ exclude_lines = [
132
+ "pragma: no cover",
133
+ "def __repr__",
134
+ "raise AssertionError",
135
+ "raise NotImplementedError",
136
+ "if __name__ == .__main__.:",
137
+ "if TYPE_CHECKING:",
138
+ "class .*\\bProtocol\\):",
139
+ "@(abc\\.)?abstractmethod",
140
+ ]
141
+ precision = 2
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,95 @@
1
+ Metadata-Version: 2.4
2
+ Name: pts-framework
3
+ Version: 0.6.1
4
+ Summary: Hardware-oriented testing framework developed by BE-CEM-MTA
5
+ Author-email: Odd Oyvind Andreassen <odd.oyvind.andreassen@cern.ch>, Bartlomiej Banas <Bartlomiej.Banas@cern.ch>, Oliver Damborg <odamborg@cern.ch>, Alvaro Martinez Landete <alvaro.martinez.landete@cern.ch>
6
+ License-Expression: LGPL-2.1-or-later
7
+ Project-URL: Homepage, https://github.com/CERN/pts-framework
8
+ Project-URL: Repository, https://github.com/CERN/pts-framework
9
+ Project-URL: Changelog, https://github.com/CERN/pts-framework/blob/master/CHANGELOG.md
10
+ Keywords: testing,hardware,instrumentation,cern
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Operating System :: OS Independent
16
+ Requires-Python: >=3.13
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: hightime==0.2.2
19
+ Requires-Dist: matplotlib
20
+ Requires-Dist: nidmm==1.4.8
21
+ Requires-Dist: numpy
22
+ Requires-Dist: PySide6==6.9.1
23
+ Requires-Dist: PyYAML==6.0.2
24
+ Requires-Dist: ruamel.yaml
25
+ Requires-Dist: pymeasure==0.15.0
26
+ Requires-Dist: pyserial
27
+ Requires-Dist: paramiko
28
+ Requires-Dist: pydantic<3,>=2.13
29
+ Requires-Dist: pyvisa
30
+ Provides-Extra: test
31
+ Requires-Dist: pytest; extra == "test"
32
+ Requires-Dist: pytest-qt; extra == "test"
33
+ Requires-Dist: pytest-cov; extra == "test"
34
+ Requires-Dist: pytest-timeout; extra == "test"
35
+ Provides-Extra: doc
36
+ Requires-Dist: Sphinx; extra == "doc"
37
+ Provides-Extra: dev
38
+ Requires-Dist: pts-framework[doc,test]; extra == "dev"
39
+ Requires-Dist: ruff; extra == "dev"
40
+
41
+ <!--
42
+ SPDX-FileCopyrightText: 2025 CERN <home.cern>
43
+
44
+ SPDX-License-Identifier: CC-BY-SA-4.0
45
+ -->
46
+
47
+ # pypts
48
+
49
+ ![pypts quick run](images/pypts_quick_run.gif)
50
+
51
+ Hardware-oriented testing framework developed by BE-CEM-MTA.
52
+
53
+ ## Key Features
54
+
55
+ * **YAML-based Recipes:** Define test sequences, steps, parameters, and variables using structured YAML files.
56
+ * **Modular Steps:** Supports various step types including Python function calls, sub-sequence execution, user interaction prompts, wait times, and indexed steps for running tasks multiple times with varying inputs.
57
+ **Reliable order execution:** Unlike pytest-order, the reliably follows the specified order.
58
+ * **Variable Scopes:** Manages global variables for the recipe and local variables within sequences.
59
+ * **Threaded Execution:** Runs recipes in a separate thread using `pts.run_pts`.
60
+ * **Incremental Reporting:** Generates a detailed CSV report (`report.csv`) in real-time as steps complete.
61
+ * **Contextual Reports:** Includes run context (Recipe Name, File Name, Serial Number) and step context (Sequence Name) in reports.
62
+ * **HTML Reports:** Provides a utility to convert the CSV report into a styled HTML file (`report.html`) for easy viewing, similar to `pytest-html`.
63
+ * **Event System:** Uses queues for inter-thread communication and event reporting (e.g., step start/end).
64
+
65
+ For full documentation, please visit [PTS Framework Documentation](https://acc-py.web.cern.ch/gitlab/pts/framework/pypts/docs/stable/).
66
+
67
+ =======
68
+
69
+ ## Continuous integration and releases
70
+
71
+ The project is tested in a disposable Python 3.13 Docker image. To reproduce the
72
+ GitHub CI build locally, run:
73
+
74
+ ```sh
75
+ docker build --build-arg SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PTS_FRAMEWORK=0+local -t pts-framework-ci .
76
+ docker run --rm pts-framework-ci
77
+ ```
78
+
79
+ Creating a protected `vX.Y.Z` tag runs the same tests, builds the wheel and source
80
+ distribution, and publishes them to TestPyPI. Verify the TestPyPI package in a clean
81
+ environment before approving the `pypi` GitHub Environment:
82
+
83
+ ```sh
84
+ python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pts-framework==X.Y.Z
85
+ ```
86
+
87
+ Approval publishes the same distributions to PyPI. GitHub retains the release
88
+ artifact for 30 days; PyPI is the permanent package source. See
89
+ [release configuration](.github/RELEASE.md) for the one-time setup.
90
+
91
+ ## Licences
92
+
93
+ pypts is distributed under the **LGPL-2.1-or-later** licence.
94
+
95
+ pypts comes with a [dependency licence compatibility analysis report](https://acc-py.web.cern.ch/gitlab/pts/framework/pypts/docs/stable/dependency_license_analysis.html).
@@ -0,0 +1,63 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/pts_framework.egg-info/PKG-INFO
4
+ src/pts_framework.egg-info/SOURCES.txt
5
+ src/pts_framework.egg-info/dependency_links.txt
6
+ src/pts_framework.egg-info/entry_points.txt
7
+ src/pts_framework.egg-info/requires.txt
8
+ src/pts_framework.egg-info/top_level.txt
9
+ src/pypts/__init__.py
10
+ src/pypts/__main__.py
11
+ src/pypts/_version.py
12
+ src/pypts/clim_chamber.py
13
+ src/pypts/common.py
14
+ src/pypts/dev_tests.py
15
+ src/pypts/event_proxy.py
16
+ src/pypts/example_tests.py
17
+ src/pypts/exceptions.py
18
+ src/pypts/gui.py
19
+ src/pypts/gui_theme.py
20
+ src/pypts/pts.py
21
+ src/pypts/recipe.py
22
+ src/pypts/recipe_artifacts.py
23
+ src/pypts/recipe_language.py
24
+ src/pypts/recipe_parser.py
25
+ src/pypts/recipe_reference.py
26
+ src/pypts/report.py
27
+ src/pypts/startup.py
28
+ src/pypts/steps.py
29
+ src/pypts/utils.py
30
+ src/pypts/XYGraph/StreamContainer.py
31
+ src/pypts/XYGraph/XY_graph.py
32
+ src/pypts/XYGraph/simulated_signals.py
33
+ src/pypts/YamVIEW/__init__.py
34
+ src/pypts/YamVIEW/customGUIModules.py
35
+ src/pypts/YamVIEW/recipe_creator.py
36
+ src/pypts/YamVIEW/recipe_sequencer_setup.py
37
+ src/pypts/YamVIEW/recipe_step_setup.py
38
+ src/pypts/YamVIEW/styles.py
39
+ src/pypts/YamVIEW/verify_recipe.py
40
+ src/pypts/examples/environment_setup_tools/Minimal_setup/Minimal_setup_recipe.yml
41
+ src/pypts/examples/environment_setup_tools/Minimal_setup/README.md
42
+ src/pypts/examples/environment_setup_tools/Minimal_setup/init_env_min.py
43
+ src/pypts/examples/environment_setup_tools/Minimal_setup/tests/example_tests.py
44
+ src/pypts/examples/environment_setup_tools/Package_based_setup/Package_based_recipe.yml
45
+ src/pypts/examples/environment_setup_tools/Package_based_setup/README.md
46
+ src/pypts/examples/environment_setup_tools/Package_based_setup/init_env_pack.py
47
+ src/pypts/examples/environment_setup_tools/Package_based_setup/pyproject.toml
48
+ src/pypts/examples/environment_setup_tools/Package_based_setup/tests/example_tests.py
49
+ src/pypts/gui_components/__init__.py
50
+ src/pypts/gui_components/interaction_panel.py
51
+ src/pypts/gui_components/log_panel.py
52
+ src/pypts/gui_components/resources.py
53
+ src/pypts/gui_components/results_panel.py
54
+ src/pypts/gui_components/step_table.py
55
+ src/pypts/gui_components/styles.py
56
+ src/pypts/gui_components/toolbar.py
57
+ src/pypts/instruments/__init__.py
58
+ src/pypts/instruments/pendulum/__init__.py
59
+ src/pypts/instruments/pendulum/cnt91.py
60
+ src/pypts/recipes/shared_object_example.py
61
+ src/pypts/recipes/shared_resource_client.py
62
+ src/pypts/recipes/shared_resource_server.py
63
+ src/pypts/recipes/shared_resource_tests_example.py
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ init_env_min = pypts.examples.environment_setup_tools.Minimal_setup.init_env_min:main
3
+ init_env_pack = pypts.examples.environment_setup_tools.Package_based_setup.init_env_pack:main
@@ -0,0 +1,25 @@
1
+ hightime==0.2.2
2
+ matplotlib
3
+ nidmm==1.4.8
4
+ numpy
5
+ PySide6==6.9.1
6
+ PyYAML==6.0.2
7
+ ruamel.yaml
8
+ pymeasure==0.15.0
9
+ pyserial
10
+ paramiko
11
+ pydantic<3,>=2.13
12
+ pyvisa
13
+
14
+ [dev]
15
+ pts-framework[doc,test]
16
+ ruff
17
+
18
+ [doc]
19
+ Sphinx
20
+
21
+ [test]
22
+ pytest
23
+ pytest-qt
24
+ pytest-cov
25
+ pytest-timeout
@@ -0,0 +1,67 @@
1
+ # SPDX-FileCopyrightText: 2025 CERN (home.cern)
2
+ #
3
+ # SPDX-License-Identifier: LGPL-2.1-or-later
4
+
5
+ class GlobalContainer:
6
+ _instance = None
7
+ def __new__(cls, *args, **kwargs):
8
+
9
+ print("Something is creating the container object")
10
+ if cls._instance is None:
11
+ cls._instance = super().__new__(cls)
12
+ cls._instance.streamlist = []
13
+ return cls._instance
14
+
15
+ def remove_stream(self, Stream):
16
+ self.streamlist.remove(Stream)
17
+
18
+ def add_stream(self, Stream):
19
+ self.streamlist.append(Stream)
20
+
21
+ def get_stream(self, key):
22
+ return self.streamlist[key]
23
+
24
+ def get_all_streams(self):
25
+ return list(self.streamlist)
26
+
27
+ def get_streams_info(self):
28
+ streams_info = ""
29
+ print(f"container object inside the streams_info: {container}")
30
+ for stream in self.streamlist:
31
+ streams_info = streams_info + (f"Retrieved registered stream {stream.name}. Stream is tied with {stream.hook} hook.\n")
32
+ return streams_info
33
+
34
+ global container
35
+ container = GlobalContainer()
36
+
37
+ class Stream:
38
+ def __init__(self, name, hook, description=None, unit=None, frequency=None):
39
+ self.name = name
40
+ self.hook = hook
41
+ self.description = description
42
+ self.unit = unit
43
+ self.frequency = frequency
44
+ container.add_stream(self)
45
+
46
+ def kill(self):
47
+ container.remove_stream(self)
48
+ del(self)
49
+ #
50
+ # if __name__ == "__main__":
51
+ # stream1 = Stream(name = "PT100 probe", hook = "file1.csv")
52
+ # stream2 = Stream(name = "oscilloscope", hook = "file2.csv")
53
+ #
54
+ # # container = GlobalContainer()
55
+ # # print("Adding 1st stream")
56
+ # # container.add_stream(stream1)
57
+ # # print(container.get_streams_info())
58
+ # # print("Adding 2nd stream")
59
+ # # container.add_stream(stream2)
60
+ # # print(container.get_streams_info())
61
+ #
62
+ # import time
63
+ # while True:
64
+ # time.sleep(1)
65
+ # streamlist = container.get_all_streams()
66
+ # for stream in streamlist:
67
+ # print(f"Retrieved registered stream {stream.name}. Stream is tied with {stream.hook} hook.")