apsbits 1.0.0__py3-none-any.whl

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 (47) hide show
  1. apsbits/__init__.py +18 -0
  2. apsbits/_version.py +21 -0
  3. apsbits/core/__init__.py +11 -0
  4. apsbits/core/best_effort_init.py +51 -0
  5. apsbits/core/catalog_init.py +36 -0
  6. apsbits/core/run_engine_init.py +118 -0
  7. apsbits/demo_instrument/README.md +1 -0
  8. apsbits/demo_instrument/__init__.py +22 -0
  9. apsbits/demo_instrument/callbacks/__init__.py +1 -0
  10. apsbits/demo_instrument/callbacks/nexus_data_file_writer.py +58 -0
  11. apsbits/demo_instrument/callbacks/spec_data_file_writer.py +97 -0
  12. apsbits/demo_instrument/configs/__init__.py +1 -0
  13. apsbits/demo_instrument/configs/devices.yml +52 -0
  14. apsbits/demo_instrument/configs/devices_aps_only.yml +6 -0
  15. apsbits/demo_instrument/configs/iconfig.yml +82 -0
  16. apsbits/demo_instrument/configs/logging.yml +41 -0
  17. apsbits/demo_instrument/devices/__init__.py +1 -0
  18. apsbits/demo_instrument/plans/__init__.py +8 -0
  19. apsbits/demo_instrument/plans/dm_plans.py +111 -0
  20. apsbits/demo_instrument/plans/sim_plans.py +69 -0
  21. apsbits/demo_instrument/startup.py +76 -0
  22. apsbits/demo_qserver/qs-config.yml +51 -0
  23. apsbits/demo_qserver/qs_host.sh +231 -0
  24. apsbits/demo_qserver/user_group_permissions.yaml +46 -0
  25. apsbits/tests/__init__.py +1 -0
  26. apsbits/tests/conftest.py +39 -0
  27. apsbits/tests/test_config.py +113 -0
  28. apsbits/tests/test_device_factories.py +44 -0
  29. apsbits/tests/test_general.py +98 -0
  30. apsbits/tests/test_stored_dict.py +139 -0
  31. apsbits/utils/__init__.py +1 -0
  32. apsbits/utils/aps_functions.py +67 -0
  33. apsbits/utils/config_loaders.py +169 -0
  34. apsbits/utils/controls_setup.py +107 -0
  35. apsbits/utils/create_new_instrument.py +129 -0
  36. apsbits/utils/helper_functions.py +123 -0
  37. apsbits/utils/logging_setup.py +211 -0
  38. apsbits/utils/make_devices.py +162 -0
  39. apsbits/utils/metadata.py +96 -0
  40. apsbits/utils/sim_creator.py +202 -0
  41. apsbits/utils/stored_dict.py +174 -0
  42. apsbits-1.0.0.dist-info/METADATA +195 -0
  43. apsbits-1.0.0.dist-info/RECORD +47 -0
  44. apsbits-1.0.0.dist-info/WHEEL +5 -0
  45. apsbits-1.0.0.dist-info/entry_points.txt +2 -0
  46. apsbits-1.0.0.dist-info/licenses/LICENSE +48 -0
  47. apsbits-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,195 @@
1
+ Metadata-Version: 2.4
2
+ Name: apsbits
3
+ Version: 1.0.0
4
+ Summary: Model of a Bluesky Data Acquisition Instrument in console, notebook, & queueserver.
5
+ Author-email: Eric Codrea <ecodrea@anl.gov>, Pete Jemian <prjemian+instrument@gmail.com>, Rafael Vescovi <rvescovi@anl.gov>
6
+ Maintainer-email: Eric Codrea <ecodrea@anl.gov>, Pete Jemian <prjemian+instrument@gmail.com>, Rafael Vescovi <rvescovi@anl.gov>
7
+ License: Copyright (c) 2023-2025, UChicago Argonne, LLC
8
+
9
+ All Rights Reserved
10
+
11
+ BITS
12
+
13
+ BCDA, Advanced Photon Source, Argonne National Laboratory
14
+
15
+
16
+ OPEN SOURCE LICENSE
17
+
18
+ Redistribution and use in source and binary forms, with or without
19
+ modification, are permitted provided that the following conditions are met:
20
+
21
+ 1. Redistributions of source code must retain the above copyright notice,
22
+ this list of conditions and the following disclaimer. Software changes,
23
+ modifications, or derivative works, should be noted with comments and
24
+ the author and organization's name.
25
+
26
+ 2. Redistributions in binary form must reproduce the above copyright notice,
27
+ this list of conditions and the following disclaimer in the documentation
28
+ and/or other materials provided with the distribution.
29
+
30
+ 3. Neither the names of UChicago Argonne, LLC or the Department of Energy
31
+ nor the names of its contributors may be used to endorse or promote
32
+ products derived from this software without specific prior written
33
+ permission.
34
+
35
+ 4. The software and the end-user documentation included with the
36
+ redistribution, if any, must include the following acknowledgment:
37
+
38
+ "This product includes software produced by UChicago Argonne, LLC
39
+ under Contract No. DE-AC02-06CH11357 with the Department of Energy."
40
+
41
+ ****************************************************************************
42
+
43
+ DISCLAIMER
44
+
45
+ THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY OF ANY KIND.
46
+
47
+ Neither the United States GOVERNMENT, nor the United States Department
48
+ of Energy, NOR uchicago argonne, LLC, nor any of their employees, makes
49
+ any warranty, express or implied, or assumes any legal liability or
50
+ responsibility for the accuracy, completeness, or usefulness of any
51
+ information, data, apparatus, product, or process disclosed, or
52
+ represents that its use would not infringe privately owned rights.
53
+
54
+ ****************************************************************************
55
+
56
+ Project-URL: Homepage, https://BCDA-APS.github.io/BITS/
57
+ Project-URL: Bug Tracker, https://github.com/BCDA-APS/BITS/issues
58
+ Keywords: bluesky,queueserver
59
+ Classifier: Development Status :: 6 - Mature
60
+ Classifier: Environment :: Console
61
+ Classifier: Intended Audience :: Developers
62
+ Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
63
+ Classifier: License :: Freely Distributable
64
+ Classifier: License :: Public Domain
65
+ Classifier: Programming Language :: Python
66
+ Classifier: Programming Language :: Python :: 3
67
+ Classifier: Topic :: Utilities
68
+ Requires-Python: >=3.11
69
+ Description-Content-Type: text/markdown
70
+ License-File: LICENSE
71
+ Requires-Dist: apstools>=1.7.2
72
+ Requires-Dist: bluesky-queueserver-api
73
+ Requires-Dist: bluesky-queueserver
74
+ Requires-Dist: bluesky-widgets
75
+ Requires-Dist: bluesky
76
+ Requires-Dist: caproto
77
+ Requires-Dist: databroker==1.2.5
78
+ Requires-Dist: guarneri
79
+ Requires-Dist: ipython
80
+ Requires-Dist: jupyterlab
81
+ Requires-Dist: ophyd-registry
82
+ Requires-Dist: ophyd
83
+ Requires-Dist: PyQt5>5.15
84
+ Requires-Dist: pyRestTable
85
+ Requires-Dist: pysumreg
86
+ Requires-Dist: qtpy
87
+ Requires-Dist: toml
88
+ Requires-Dist: tomli
89
+ Requires-Dist: tomli-w
90
+ Provides-Extra: dev
91
+ Requires-Dist: build; extra == "dev"
92
+ Requires-Dist: isort; extra == "dev"
93
+ Requires-Dist: mypy; extra == "dev"
94
+ Requires-Dist: pre-commit; extra == "dev"
95
+ Requires-Dist: pytest; extra == "dev"
96
+ Requires-Dist: ruff; extra == "dev"
97
+ Provides-Extra: doc
98
+ Requires-Dist: babel; extra == "doc"
99
+ Requires-Dist: ipykernel; extra == "doc"
100
+ Requires-Dist: jinja2; extra == "doc"
101
+ Requires-Dist: markupsafe; extra == "doc"
102
+ Requires-Dist: myst_parser; extra == "doc"
103
+ Requires-Dist: nbsphinx; extra == "doc"
104
+ Requires-Dist: pydata-sphinx-theme; extra == "doc"
105
+ Requires-Dist: pygments-ipython-console; extra == "doc"
106
+ Requires-Dist: pygments; extra == "doc"
107
+ Requires-Dist: sphinx-design; extra == "doc"
108
+ Requires-Dist: sphinx-tabs; extra == "doc"
109
+ Requires-Dist: sphinx; extra == "doc"
110
+ Provides-Extra: all
111
+ Requires-Dist: apsbits[dev,doc]; extra == "all"
112
+ Dynamic: license-file
113
+
114
+ # APSBITS: Template Package for Bluesky Instruments
115
+
116
+ | PyPI | Coverage |
117
+ | --- | --- |
118
+ [![PyPi](https://img.shields.io/pypi/v/apsbits.svg)](https://pypi.python.org/pypi/apsbits) | [![Coverage Status](https://coveralls.io/repos/github/BCDA-APS/BITS/badge.svg?branch=main)](https://coveralls.io/github/BCDA-APS/BITS?branch=main) |
119
+
120
+ BITS: **B**luesky **I**nstrument **T**emplate **S**tructure
121
+
122
+ Template of a Bluesky Data Acquisition Instrument in console, notebook, &
123
+ queueserver.
124
+
125
+ ## Production use of BITS
126
+
127
+ Please create a bits instrument using our template repository: https://github.com/BCDA-APS/DEMO-BITS
128
+
129
+
130
+ ## Installing the BITS Package for Development
131
+
132
+ ```bash
133
+ git clone github.com:BCDA-APS/BITS.git
134
+ cd BITS
135
+ conda create -y -n BITS_env python=3.11 pyepics
136
+ conda activate BITS_env
137
+ pip install -e ."[all]"
138
+ ```
139
+
140
+ ## Testing the apsbits base installation
141
+
142
+ On an ipython console
143
+
144
+ ```py
145
+ from apsbits.demo_instrument.startup import *
146
+ listobjects()
147
+ RE(sim_print_plan())
148
+ RE(sim_count_plan())
149
+ RE(sim_rel_scan_plan())
150
+ ```
151
+
152
+ ## Testing
153
+
154
+ Use this command to run the test suite locally:
155
+
156
+ ```bash
157
+ pytest -vvv --lf ./src
158
+ ```
159
+
160
+ ## Documentation
161
+
162
+ <details>
163
+ <summary>prerequisite</summary>
164
+
165
+ To build the documentation locally, install [`pandoc`](https://pandoc.org/) in
166
+ your conda environment:
167
+
168
+ ```bash
169
+ conda install conda-forge::pandoc
170
+ ```
171
+
172
+ </details>
173
+
174
+ Use this command to build the documentation locally:
175
+
176
+ ```bash
177
+ make -C docs clean html
178
+ ```
179
+
180
+ Once the documentation builds, view the HTML pages using your web browser:
181
+
182
+ ```bash
183
+ BROWSER ./docs/build/html/index.html &
184
+ ```
185
+
186
+ ### Adding to the documentation source
187
+
188
+ The documentation source is located in files and directories under
189
+ `./docs/source`. Various examples are provided.
190
+
191
+ Documentation can be added in these formats:
192
+ [`.rst`](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html)
193
+ (reStructured text), [`.md`](https://en.wikipedia.org/wiki/Markdown) (markdown),
194
+ and [`.ipynb`](https://jupyter.org/) (Jupyter notebook). For more information,
195
+ see the [Sphinx](https://www.sphinx-doc.org/) documentation.
@@ -0,0 +1,47 @@
1
+ apsbits/__init__.py,sha256=aC6iFpu22_zSzmQDjkrd3FcthCgjoD1SUiZ-7j_TwuY,442
2
+ apsbits/_version.py,sha256=fo5PXsZuloQZu3LdpIFTUAXvJmY2L9N5sNGe2tvdU98,511
3
+ apsbits/core/__init__.py,sha256=CmmaJwx5aAUf2d-svOMw9paMlKnCSz_xvEPBAW8e5nA,266
4
+ apsbits/core/best_effort_init.py,sha256=XiE0FPqixqKdAiqLwxfUlygVeUmGjoTqbFPxURKDc1E,1298
5
+ apsbits/core/catalog_init.py,sha256=Bio154ee5GOZTOBnm3FyjS-cHnH_bocp6vOs8XAH1a8,755
6
+ apsbits/core/run_engine_init.py,sha256=uzfmW8Wdxzn5hMslFGGmU4xdUD-jAzl93MADa__YZtQ,4373
7
+ apsbits/demo_instrument/README.md,sha256=fLZWnARxJxOZSwrb1eIN4UtRpxrLgKeApU5xJ5jGNWs,19
8
+ apsbits/demo_instrument/__init__.py,sha256=jmvy-yVcbli9z0tmkOTywEjgyT28g0TxKaUh2K0wGTY,530
9
+ apsbits/demo_instrument/startup.py,sha256=wKjcBvLNDtj4tW5dKWuRKX0N_Z-VhT94YPb8sve_J40,2436
10
+ apsbits/demo_instrument/callbacks/__init__.py,sha256=UlYegbF9GbziD1UzgscoGo9T5aFPvs-upwXxPQmBEjY,35
11
+ apsbits/demo_instrument/callbacks/nexus_data_file_writer.py,sha256=XJy_kuMjxNIG0lxRq7lFuYnchP36vZFqi3hnDjjrc1k,1624
12
+ apsbits/demo_instrument/callbacks/spec_data_file_writer.py,sha256=oUckr7mIIWUGLzJHPGftaTZJyV8uNDkrcGJPpFJLQSE,2803
13
+ apsbits/demo_instrument/configs/__init__.py,sha256=mhZO8bz7uexqBJx0PrILGQM6ssHPbCx8fld7EtRy6so,46
14
+ apsbits/demo_instrument/configs/devices.yml,sha256=sbAyUSqCF2CeCp_KKmCBEuOj3gT1h8OP_eR5uqROby0,1305
15
+ apsbits/demo_instrument/configs/devices_aps_only.yml,sha256=XR9ZB-RaVpG-rghDSYKL8A16wETuOi7mzlx7U8LBCTg,136
16
+ apsbits/demo_instrument/configs/iconfig.yml,sha256=bUfhcio-mXxP3S6Fw2Xc71o2GAiCEcVvyPoCgYlzSP8,2246
17
+ apsbits/demo_instrument/configs/logging.yml,sha256=ydODRE8cUqzZvI7xxTB9jT6hEQci8jKrshF8mwRV9fo,836
18
+ apsbits/demo_instrument/devices/__init__.py,sha256=3nhJy2BDR_nelXjxWw5_1Ppg7zStO6v2vJNpvO06IYU,27
19
+ apsbits/demo_instrument/plans/__init__.py,sha256=Qjo7AYRIReo-x5i9rkpiYs86F5C8adDchn_Ghe-Qn1A,356
20
+ apsbits/demo_instrument/plans/dm_plans.py,sha256=SeZMKQeQGlQ-abpv3Ccfe9BgQDHMxFQq0pEgsiZCeb4,3445
21
+ apsbits/demo_instrument/plans/sim_plans.py,sha256=er9Dekkh9ob6t-GBR0tb2EIBdgr3JqRdIfr2xTi_l-Y,1963
22
+ apsbits/demo_qserver/qs-config.yml,sha256=Lf-o0-Ldwh90OcAY7xEgyD4ndLs-RM40QXqZmRDoOmY,1244
23
+ apsbits/demo_qserver/qs_host.sh,sha256=OBISAZb-DMMXN0rGt9Ea-lRVvVgqvzdrQFKlZz8K8Ao,6974
24
+ apsbits/demo_qserver/user_group_permissions.yaml,sha256=qNVoInWpvtLujYK_oOD7wD9o319yGSZiqGp_J_iUQ6Q,1621
25
+ apsbits/tests/__init__.py,sha256=ZqbT_R0daJUQAawNOy472d-DOwwYxmZQKuZp3jivZDM,48
26
+ apsbits/tests/conftest.py,sha256=K7mLdZoiFKVpihA_eiWhNBS5YHnEuffFHOn3Y-1_aZE,1155
27
+ apsbits/tests/test_config.py,sha256=Qum4h8Vi-YOj2I4Um8hw1ZNVsytwgYUG9p6nzms8OVI,3077
28
+ apsbits/tests/test_device_factories.py,sha256=Uoq3V6zugCLCqNagln81N3d7dk_e8bTAsH5ZwEKpVrI,1364
29
+ apsbits/tests/test_general.py,sha256=lbyJXN_RjI-_jxVR0pcAHVKE5pWNvS_IC64g_S5lGuw,2996
30
+ apsbits/tests/test_stored_dict.py,sha256=BmJAXnQFtkqdXloiMdzUXDxZ1SH-wwNyQmgmWOyhQkI,4248
31
+ apsbits/utils/__init__.py,sha256=2ZlHuOIAtb-kEBwQoabNVWD5QOVtDBORgdy1BzI8NS8,45
32
+ apsbits/utils/aps_functions.py,sha256=o4ZQ0GCdftpCRJnVcjKrx5WnQNV0gwnA_oXS8rBhGN0,2135
33
+ apsbits/utils/config_loaders.py,sha256=JGoWROkGx7sly8oRa7Um4Gg5SuC9eiIM4jhn8wdQgH0,4676
34
+ apsbits/utils/controls_setup.py,sha256=eXWyAOsu9CA7vR7DL_ibfFeuOGtxphnXu_JEA-lm8tw,3158
35
+ apsbits/utils/create_new_instrument.py,sha256=q_vqkmhZXSyhjparr6nEcwWiPF4zCdItzpsLOB3AlJw,3670
36
+ apsbits/utils/helper_functions.py,sha256=NLoTjmyXNfAKXiggmcR_IYZUso2iAFxl-7eVKaPQB4o,3409
37
+ apsbits/utils/logging_setup.py,sha256=dQEHnODseKFC7s86TmIqTY27_Ea36g5w_lH6jbDBXOo,7047
38
+ apsbits/utils/make_devices.py,sha256=Hp90wdrhg8x8vH1_zir_prUb10_oLfW9fhMG3x6ppRs,5065
39
+ apsbits/utils/metadata.py,sha256=8BrcYaryjwYrFZnfs7DW6GdCMCe52aJh0ULiP3epsdQ,2531
40
+ apsbits/utils/sim_creator.py,sha256=tTgD0FDqL5_QgYlBZ9_KmCVMqM7uz94yT2E7yycF3KY,5358
41
+ apsbits/utils/stored_dict.py,sha256=dRY51g1Of9oa0Nvldy334o1eDYUAEdCYxx6MarCUmy4,5512
42
+ apsbits-1.0.0.dist-info/licenses/LICENSE,sha256=VRL4rXRDmRe62o4ci_VPKWl_z8_96c-U6DUqelNBgI0,1927
43
+ apsbits-1.0.0.dist-info/METADATA,sha256=Iib2Qqo6LLgXJl5ahKWZ2EDAQb4Xl7anOjqza6C5z3s,6789
44
+ apsbits-1.0.0.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
45
+ apsbits-1.0.0.dist-info/entry_points.txt,sha256=iLl4F8OZNqN7wb-wmKSBY8_LDK7B2CnGWbPMNIt8QEA,73
46
+ apsbits-1.0.0.dist-info/top_level.txt,sha256=K0KyAyPka1k4prJJFWALbX0gcUL3i4kiflTvSeM_6O4,8
47
+ apsbits-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (77.0.3)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ create-bits = apsbits.utils.create_new_instrument:main
@@ -0,0 +1,48 @@
1
+ Copyright (c) 2023-2025, UChicago Argonne, LLC
2
+
3
+ All Rights Reserved
4
+
5
+ BITS
6
+
7
+ BCDA, Advanced Photon Source, Argonne National Laboratory
8
+
9
+
10
+ OPEN SOURCE LICENSE
11
+
12
+ Redistribution and use in source and binary forms, with or without
13
+ modification, are permitted provided that the following conditions are met:
14
+
15
+ 1. Redistributions of source code must retain the above copyright notice,
16
+ this list of conditions and the following disclaimer. Software changes,
17
+ modifications, or derivative works, should be noted with comments and
18
+ the author and organization's name.
19
+
20
+ 2. Redistributions in binary form must reproduce the above copyright notice,
21
+ this list of conditions and the following disclaimer in the documentation
22
+ and/or other materials provided with the distribution.
23
+
24
+ 3. Neither the names of UChicago Argonne, LLC or the Department of Energy
25
+ nor the names of its contributors may be used to endorse or promote
26
+ products derived from this software without specific prior written
27
+ permission.
28
+
29
+ 4. The software and the end-user documentation included with the
30
+ redistribution, if any, must include the following acknowledgment:
31
+
32
+ "This product includes software produced by UChicago Argonne, LLC
33
+ under Contract No. DE-AC02-06CH11357 with the Department of Energy."
34
+
35
+ ****************************************************************************
36
+
37
+ DISCLAIMER
38
+
39
+ THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY OF ANY KIND.
40
+
41
+ Neither the United States GOVERNMENT, nor the United States Department
42
+ of Energy, NOR uchicago argonne, LLC, nor any of their employees, makes
43
+ any warranty, express or implied, or assumes any legal liability or
44
+ responsibility for the accuracy, completeness, or usefulness of any
45
+ information, data, apparatus, product, or process disclosed, or
46
+ represents that its use would not infringe privately owned rights.
47
+
48
+ ****************************************************************************
@@ -0,0 +1 @@
1
+ apsbits