ophyd-websocket 0.1.0__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 (30) hide show
  1. ophyd_websocket-0.1.0/.claude/settings.local.json +7 -0
  2. ophyd_websocket-0.1.0/.gitignore +110 -0
  3. ophyd_websocket-0.1.0/Dockerfile +11 -0
  4. ophyd_websocket-0.1.0/LICENSE +43 -0
  5. ophyd_websocket-0.1.0/PKG-INFO +788 -0
  6. ophyd_websocket-0.1.0/README.md +718 -0
  7. ophyd_websocket-0.1.0/pyproject.toml +57 -0
  8. ophyd_websocket-0.1.0/react_examples/README.md +52 -0
  9. ophyd_websocket-0.1.0/react_examples/deviceControllerTypes.ts +16 -0
  10. ophyd_websocket-0.1.0/react_examples/ophydSocketTypes.ts +66 -0
  11. ophyd_websocket-0.1.0/react_examples/useOphydSocket.ts +150 -0
  12. ophyd_websocket-0.1.0/src/ophyd_websocket/__init__.py +0 -0
  13. ophyd_websocket-0.1.0/src/ophyd_websocket/device_registry.py +263 -0
  14. ophyd_websocket-0.1.0/src/ophyd_websocket/examples/example_startup.py +48 -0
  15. ophyd_websocket-0.1.0/src/ophyd_websocket/queue_safety.py +168 -0
  16. ophyd_websocket-0.1.0/src/ophyd_websocket/routers/camera_socket.py +308 -0
  17. ophyd_websocket-0.1.0/src/ophyd_websocket/routers/core_api.py +321 -0
  18. ophyd_websocket-0.1.0/src/ophyd_websocket/routers/device_socket.py +325 -0
  19. ophyd_websocket-0.1.0/src/ophyd_websocket/routers/pv_socket.py +284 -0
  20. ophyd_websocket-0.1.0/src/ophyd_websocket/routers/qs_console_socket.py +50 -0
  21. ophyd_websocket-0.1.0/src/ophyd_websocket/server.py +340 -0
  22. ophyd_websocket-0.1.0/src/tests/__init__.py +1 -0
  23. ophyd_websocket-0.1.0/src/tests/conftest.py +189 -0
  24. ophyd_websocket-0.1.0/src/tests/test_device_registry.py +193 -0
  25. ophyd_websocket-0.1.0/src/tests/test_integration.py +71 -0
  26. ophyd_websocket-0.1.0/src/tests/test_ioc.py +87 -0
  27. ophyd_websocket-0.1.0/src/tests/test_smoke.py +89 -0
  28. ophyd_websocket-0.1.0/src/tests/test_startup.py +38 -0
  29. ophyd_websocket-0.1.0/src/tests/test_websockets.py +192 -0
  30. ophyd_websocket-0.1.0/uv.lock +1107 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(grep -v \"^/Users/seij/Repos/ophyd-websocket$\")"
5
+ ]
6
+ }
7
+ }
@@ -0,0 +1,110 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+ MANIFEST
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ .hypothesis/
48
+ .pytest_cache/
49
+
50
+ # Translations
51
+ *.mo
52
+ *.pot
53
+
54
+ # Django stuff:
55
+ *.log
56
+ local_settings.py
57
+ db.sqlite3
58
+
59
+ # Flask stuff:
60
+ instance/
61
+ .webassets-cache
62
+
63
+ # Scrapy stuff:
64
+ .scrapy
65
+
66
+ # Sphinx documentation
67
+ docs/_build/
68
+
69
+ # PyBuilder
70
+ target/
71
+
72
+ # Jupyter Notebook
73
+ .ipynb_checkpoints
74
+
75
+ # IPython
76
+ profile_default/
77
+ ipython_config.py
78
+
79
+ # pyenv
80
+ .python-version
81
+
82
+ # celery beat schedule file
83
+ celerybeat-schedule
84
+
85
+ # SageMath parsed files
86
+ *.sage.py
87
+
88
+ # Environments
89
+ .env
90
+ .venv
91
+ env/
92
+ venv/
93
+ ENV/
94
+ env.bak/
95
+ venv.bak/
96
+
97
+ # Spyder project settings
98
+ .spyderproject
99
+ .spyproject
100
+
101
+ # Rope project settings
102
+ .ropeproject
103
+
104
+ # mkdocs documentation
105
+ /site
106
+
107
+ # mypy
108
+ .mypy_cache/
109
+ .dmypy.json
110
+ dmypy.json
@@ -0,0 +1,11 @@
1
+ FROM --platform=linux/amd64 ghcr.io/astral-sh/uv:python3.12-bookworm-slim
2
+
3
+ WORKDIR /code
4
+
5
+ COPY pyproject.toml uv.lock* ./
6
+
7
+ RUN uv sync --frozen --no-dev
8
+
9
+ COPY . /code
10
+
11
+ CMD ["uv", "run", "python", "src/ophyd_websocket/server.py"]
@@ -0,0 +1,43 @@
1
+ Web Based Beamline Control System (Bluesky Web)
2
+
3
+ Copyright (c) 2024, The Regents of the University of California, through
4
+ Lawrence Berkeley National Laboratory (subject to receipt of any required
5
+ approvals from the U.S. Dept. of Energy). All rights reserved.
6
+
7
+ Redistribution and use in source and binary forms, with or without
8
+ modification, are permitted provided that the following conditions are met:
9
+
10
+ (1) Redistributions of source code must retain the above copyright notice,
11
+ this list of conditions and the following disclaimer.
12
+
13
+ (2) Redistributions in binary form must reproduce the above copyright
14
+ notice, this list of conditions and the following disclaimer in the
15
+ documentation and/or other materials provided with the distribution.
16
+
17
+ (3) Neither the name of the University of California, Lawrence Berkeley
18
+ National Laboratory, U.S. Dept. of Energy nor the names of its contributors
19
+ may be used to endorse or promote products derived from this software
20
+ without specific prior written permission.
21
+
22
+
23
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
27
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
30
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
+
34
+ You are under no obligation whatsoever to provide any bug fixes, patches,
35
+ or upgrades to the features, functionality or performance of the source
36
+ code ("Enhancements") to anyone; however, if you choose to make your
37
+ Enhancements available either publicly, or directly to Lawrence Berkeley
38
+ National Laboratory, without imposing a separate written license agreement
39
+ for such Enhancements, then you hereby grant the following license: a
40
+ non-exclusive, royalty-free perpetual license to install, use, modify,
41
+ prepare derivative works, incorporate into other computer software,
42
+ distribute, and sublicense such enhancements or derivative works thereof,
43
+ in binary and source code form.