apsbits 1.0.4__tar.gz → 1.0.6__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 (141) hide show
  1. {apsbits-1.0.4 → apsbits-1.0.6}/.github/workflows/code.yml +3 -3
  2. {apsbits-1.0.4 → apsbits-1.0.6}/.github/workflows/docs.yml +2 -2
  3. {apsbits-1.0.4 → apsbits-1.0.6}/.github/workflows/pypi.yml +2 -2
  4. {apsbits-1.0.4 → apsbits-1.0.6}/.gitignore +6 -0
  5. {apsbits-1.0.4 → apsbits-1.0.6}/HISTORY.rst +42 -1
  6. {apsbits-1.0.4/apsbits.egg-info → apsbits-1.0.6}/PKG-INFO +9 -6
  7. {apsbits-1.0.4 → apsbits-1.0.6/apsbits.egg-info}/PKG-INFO +9 -6
  8. {apsbits-1.0.4 → apsbits-1.0.6}/apsbits.egg-info/SOURCES.txt +9 -10
  9. {apsbits-1.0.4 → apsbits-1.0.6}/apsbits.egg-info/requires.txt +8 -5
  10. apsbits-1.0.6/docs/source/api/generated/apsbits.demo_instrument.callbacks.demo_nexus_callback.rst +17 -0
  11. apsbits-1.0.6/docs/source/api/generated/apsbits.demo_instrument.callbacks.demo_spec_callback.rst +13 -0
  12. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.demo_instrument.callbacks.rst +2 -2
  13. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.demo_instrument.plans.rst +0 -1
  14. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/index.rst +0 -1
  15. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/utils.rst +0 -1
  16. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/guides/creating_devices.rst +14 -22
  17. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/guides/sessions.rst +22 -0
  18. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/guides/startup.rst +42 -2
  19. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/license.rst +1 -1
  20. {apsbits-1.0.4 → apsbits-1.0.6}/pyproject.toml +9 -6
  21. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/_version.py +16 -3
  22. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/api/create_new_instrument.py +48 -29
  23. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/api/delete_instrument.py +20 -17
  24. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/api/run_instrument.py +1 -3
  25. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/core/best_effort_init.py +7 -4
  26. apsbits-1.0.6/src/apsbits/core/catalog_init.py +60 -0
  27. apsbits-1.0.6/src/apsbits/core/instrument_init.py +204 -0
  28. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/core/run_engine_init.py +80 -24
  29. apsbits-1.0.6/src/apsbits/demo_instrument/README.md +10 -0
  30. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/demo_instrument/__init__.py +0 -4
  31. apsbits-1.0.4/src/apsbits/demo_instrument/callbacks/nexus_data_file_writer.py → apsbits-1.0.6/src/apsbits/demo_instrument/callbacks/demo_nexus_callback.py +5 -3
  32. apsbits-1.0.4/src/apsbits/demo_instrument/callbacks/spec_data_file_writer.py → apsbits-1.0.6/src/apsbits/demo_instrument/callbacks/demo_spec_callback.py +8 -4
  33. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/demo_instrument/configs/devices.yml +3 -8
  34. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/demo_instrument/configs/devices_aps_only.yml +3 -1
  35. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/demo_instrument/configs/iconfig.yml +9 -4
  36. apsbits-1.0.6/src/apsbits/demo_instrument/plans/__init__.py +1 -0
  37. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/demo_instrument/plans/sim_plans.py +9 -3
  38. {apsbits-1.0.4/src/apsbits/demo_qserver → apsbits-1.0.6/src/apsbits/demo_instrument/qserver}/qs-config.yml +0 -9
  39. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/demo_instrument/startup.py +31 -19
  40. {apsbits-1.0.4/src/apsbits/demo_qserver → apsbits-1.0.6/src/apsbits/demo_scripts}/qs_host.sh +5 -5
  41. apsbits-1.0.6/src/apsbits/py.typed +0 -0
  42. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/tests/conftest.py +6 -1
  43. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/tests/test_config.py +6 -4
  44. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/tests/test_delete_instrument.py +31 -29
  45. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/tests/test_device_factories.py +6 -4
  46. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/tests/test_general.py +10 -4
  47. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/tests/test_make_devices.py +9 -5
  48. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/tests/test_stored_dict.py +1 -1
  49. apsbits-1.0.6/src/apsbits/utils/__init__.py +5 -0
  50. apsbits-1.0.6/src/apsbits/utils/aps_functions.py +28 -0
  51. apsbits-1.0.6/src/apsbits/utils/baseline_setup.py +104 -0
  52. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/utils/config_loaders.py +61 -15
  53. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/utils/controls_setup.py +7 -7
  54. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/utils/helper_functions.py +46 -3
  55. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/utils/logging_setup.py +29 -11
  56. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/utils/metadata.py +15 -10
  57. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/utils/sim_creator.py +1 -1
  58. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/utils/stored_dict.py +2 -3
  59. apsbits-1.0.4/docs/source/api/generated/apsbits.demo_instrument.callbacks.nexus_data_file_writer.rst +0 -17
  60. apsbits-1.0.4/docs/source/api/generated/apsbits.demo_instrument.callbacks.spec_data_file_writer.rst +0 -19
  61. apsbits-1.0.4/docs/source/api/generated/apsbits.demo_instrument.plans.dm_plans.rst +0 -13
  62. apsbits-1.0.4/docs/source/api/generated/apsbits.utils.aps_functions.rst +0 -12
  63. apsbits-1.0.4/src/apsbits/core/catalog_init.py +0 -36
  64. apsbits-1.0.4/src/apsbits/core/instrument_init.py +0 -179
  65. apsbits-1.0.4/src/apsbits/demo_instrument/README.md +0 -1
  66. apsbits-1.0.4/src/apsbits/demo_instrument/plans/__init__.py +0 -8
  67. apsbits-1.0.4/src/apsbits/demo_instrument/plans/dm_plans.py +0 -111
  68. apsbits-1.0.4/src/apsbits/utils/__init__.py +0 -1
  69. apsbits-1.0.4/src/apsbits/utils/aps_functions.py +0 -75
  70. {apsbits-1.0.4 → apsbits-1.0.6}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  71. {apsbits-1.0.4 → apsbits-1.0.6}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  72. {apsbits-1.0.4 → apsbits-1.0.6}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  73. {apsbits-1.0.4 → apsbits-1.0.6}/.github/ISSUE_TEMPLATE/other.md +0 -0
  74. {apsbits-1.0.4 → apsbits-1.0.6}/.github/ISSUE_TEMPLATE/question-issue-template.md +0 -0
  75. {apsbits-1.0.4 → apsbits-1.0.6}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  76. {apsbits-1.0.4 → apsbits-1.0.6}/.github/dependabot.yml +0 -0
  77. {apsbits-1.0.4 → apsbits-1.0.6}/.pre-commit-config.yaml +0 -0
  78. {apsbits-1.0.4 → apsbits-1.0.6}/LICENSE +0 -0
  79. {apsbits-1.0.4 → apsbits-1.0.6}/README.md +0 -0
  80. {apsbits-1.0.4 → apsbits-1.0.6}/apsbits.egg-info/dependency_links.txt +0 -0
  81. {apsbits-1.0.4 → apsbits-1.0.6}/apsbits.egg-info/entry_points.txt +0 -0
  82. {apsbits-1.0.4 → apsbits-1.0.6}/apsbits.egg-info/top_level.txt +0 -0
  83. {apsbits-1.0.4 → apsbits-1.0.6}/docs/Makefile +0 -0
  84. {apsbits-1.0.4 → apsbits-1.0.6}/docs/make.bat +0 -0
  85. {apsbits-1.0.4 → apsbits-1.0.6}/docs/resources/create-repository-name.webp +0 -0
  86. {apsbits-1.0.4 → apsbits-1.0.6}/docs/resources/create-repository-owner.webp +0 -0
  87. {apsbits-1.0.4 → apsbits-1.0.6}/docs/resources/demo.ipynb +0 -0
  88. {apsbits-1.0.4 → apsbits-1.0.6}/docs/resources/use-this-template-button.webp +0 -0
  89. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/_static/.gitkeep +0 -0
  90. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/api.rst +0 -0
  91. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/core.rst +0 -0
  92. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/demo_instrument.rst +0 -0
  93. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/demo_qserver.rst +0 -0
  94. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.core.best_effort_init.rst +0 -0
  95. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.core.catalog_init.rst +0 -0
  96. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.core.run_engine_init.rst +0 -0
  97. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.demo_instrument.configs.rst +0 -0
  98. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.demo_instrument.devices.rst +0 -0
  99. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.demo_instrument.plans.sim_plans.rst +0 -0
  100. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.demo_instrument.rst +0 -0
  101. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.demo_instrument.startup.rst +0 -0
  102. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.demo_qserver.rst +0 -0
  103. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.utils.config_loaders.rst +0 -0
  104. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.utils.controls_setup.rst +0 -0
  105. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.utils.helper_functions.rst +0 -0
  106. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.utils.logging_setup.rst +0 -0
  107. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.utils.metadata.rst +0 -0
  108. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/api/generated/apsbits.utils.stored_dict.rst +0 -0
  109. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/bits_overview.rst +0 -0
  110. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/conf.py +0 -0
  111. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/deprecated/console.rst +0 -0
  112. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/deprecated/dm.md +0 -0
  113. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/deprecated/logging_config.rst +0 -0
  114. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/deprecated/notebook.rst +0 -0
  115. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/deprecated/script.rst +0 -0
  116. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/guides/creating_instrument.rst +0 -0
  117. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/guides/developing_bits.rst +0 -0
  118. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/guides/dm.rst +0 -0
  119. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/guides/index.rst +0 -0
  120. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/guides/logging.rst +0 -0
  121. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/guides/qserver.rst +0 -0
  122. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/guides/qserver_service.rst +0 -0
  123. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/guides/setting_iconfig.rst +0 -0
  124. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/guides/template_creation.rst +0 -0
  125. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/history.rst +0 -0
  126. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/index.rst +0 -0
  127. {apsbits-1.0.4 → apsbits-1.0.6}/docs/source/install.rst +0 -0
  128. {apsbits-1.0.4 → apsbits-1.0.6}/setup.cfg +0 -0
  129. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/__init__.py +0 -0
  130. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/api/__init__.py +0 -0
  131. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/configs/logging.yml +0 -0
  132. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/core/__init__.py +0 -0
  133. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/demo_instrument/callbacks/__init__.py +0 -0
  134. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/demo_instrument/configs/__init__.py +0 -0
  135. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/demo_instrument/configs/extra_logging.yml +0 -0
  136. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/demo_instrument/devices/__init__.py +0 -0
  137. {apsbits-1.0.4/src/apsbits/demo_qserver → apsbits-1.0.6/src/apsbits/demo_instrument/qserver}/user_group_permissions.yaml +0 -0
  138. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/demo_instrument/suspenders/__init__.py +0 -0
  139. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/demo_instrument/utils/__init__.py +0 -0
  140. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/tests/__init__.py +0 -0
  141. {apsbits-1.0.4 → apsbits-1.0.6}/src/apsbits/tests/test_run_instrument.py +0 -0
@@ -20,9 +20,9 @@ jobs:
20
20
  runs-on: ubuntu-latest
21
21
 
22
22
  steps:
23
- - uses: actions/checkout@v4
23
+ - uses: actions/checkout@v5
24
24
 
25
- - uses: actions/setup-python@v5
25
+ - uses: actions/setup-python@v6
26
26
  with:
27
27
  python-version: "3.11"
28
28
 
@@ -51,7 +51,7 @@ jobs:
51
51
  DISPLAY: ":99.0"
52
52
 
53
53
  steps:
54
- - uses: actions/checkout@v4
54
+ - uses: actions/checkout@v5
55
55
 
56
56
  - name: Install OS libraries to test Linux PyQt apps
57
57
  run: |
@@ -50,11 +50,11 @@ jobs:
50
50
  run: echo "TZ=America/Chicago" >> "$GITHUB_ENV"
51
51
 
52
52
  - name: Checkout
53
- uses: actions/checkout@v4
53
+ uses: actions/checkout@v5
54
54
  with:
55
55
  fetch-depth: 0 # required for push to dest repo
56
56
 
57
- - uses: actions/setup-python@v5
57
+ - uses: actions/setup-python@v6
58
58
  with:
59
59
  python-version: "3.11"
60
60
 
@@ -18,9 +18,9 @@ jobs:
18
18
  runs-on: ubuntu-latest
19
19
 
20
20
  steps:
21
- - uses: actions/checkout@v4
21
+ - uses: actions/checkout@v5
22
22
  - name: Set up Python
23
- uses: actions/setup-python@v5
23
+ uses: actions/setup-python@v6
24
24
  with:
25
25
  python-version: "3.11"
26
26
 
@@ -176,3 +176,9 @@ existing_plans_and_devices.yaml
176
176
 
177
177
  # Local Run Engine metadata dictionary
178
178
  .re_md_dict.yml
179
+
180
+ # Test/deleted artifacts
181
+ .deleted/
182
+
183
+ # Claude Code context files
184
+ CLAUDE.md
@@ -30,11 +30,27 @@ describe future plans.
30
30
  .. Coming release content can be gathered here.
31
31
  Some people object to publishing unreleased changes.
32
32
 
33
- 1.0.4
33
+ 1.1.0
34
34
  #####
35
35
 
36
36
  release expected ?
37
37
 
38
+ New Features
39
+ ---------------
40
+
41
+ * Hoist support to setup baseline stream using labels kwarg from USAXS.
42
+
43
+ Maintenance
44
+ ---------------
45
+
46
+ * Bump iconfig version to 2.0.1 for the baseline addition.
47
+ * Remove run_engine section from QS config.yml file and pin QS to 0.0.22+.
48
+
49
+ 1.0.4
50
+ #####
51
+
52
+ released 2025-05-14
53
+
38
54
  1.0.3
39
55
  #####
40
56
 
@@ -68,6 +84,31 @@ Maintenance
68
84
  * adding install docs given new workflow
69
85
  * Feature/API_functionalities and Makedevices
70
86
 
87
+ Breaking Changes
88
+ ----------------
89
+
90
+ * **Callback file renaming**: Demo callback files renamed to follow `_demo` naming convention:
91
+
92
+ * ``nexus_data_file_writer.py`` → ``demo_nexus_callback.py``
93
+ * ``spec_data_file_writer.py`` → ``demo_spec_callback.py``
94
+
95
+ Import paths updated in startup.py. Direct imports of these modules will need updating.
96
+
97
+ * **DM plans removed**: The ``dm_plans.py`` file has been removed to reduce apstools dependency.
98
+ DM configuration infrastructure remains in iconfig.yml and startup.py.
99
+
100
+ * **StoredDict implementation**: Now uses local implementation instead of ``apstools.utils.StoredDict``.
101
+ This reduces external dependencies while maintaining full compatibility.
102
+
103
+ Enhancements
104
+ ------------
105
+
106
+ * **Improved error handling**: Enhanced error messages with specific exception types and detailed context across core modules (device loading, configuration parsing, RunEngine initialization, databroker catalog setup).
107
+
108
+ * **Complete type annotations**: Added comprehensive type annotations to all public APIs for better IDE support and code maintainability.
109
+
110
+ * **Code quality improvements**: Added ``py.typed`` marker for mypy support and improved code formatting compliance.
111
+
71
112
  1.0.1
72
113
  #####
73
114
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apsbits
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: Model of a Bluesky Data Acquisition Instrument in console, notebook, & queueserver.
5
5
  Author-email: Eric Codrea <ecodrea@anl.gov>, Pete Jemian <prjemian+instrument@gmail.com>, Rafael Vescovi <rvescovi@anl.gov>
6
6
  Maintainer-email: Eric Codrea <ecodrea@anl.gov>, Pete Jemian <prjemian+instrument@gmail.com>, Rafael Vescovi <rvescovi@anl.gov>
@@ -17,25 +17,27 @@ Classifier: Topic :: Utilities
17
17
  Requires-Python: >=3.11
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
- Requires-Dist: apstools>=1.7.2
20
+ Requires-Dist: apstools
21
+ Requires-Dist: bluesky-queueserver>=0.0.22
21
22
  Requires-Dist: bluesky-queueserver-api
22
- Requires-Dist: bluesky-queueserver
23
23
  Requires-Dist: bluesky-widgets
24
24
  Requires-Dist: bluesky
25
25
  Requires-Dist: caproto
26
26
  Requires-Dist: databroker==1.2.5
27
- Requires-Dist: guarneri
27
+ Requires-Dist: guarneri>=0.4.0
28
28
  Requires-Dist: ipython
29
29
  Requires-Dist: jupyterlab
30
+ Requires-Dist: matplotlib
31
+ Requires-Dist: ophyd-async
30
32
  Requires-Dist: ophyd-registry
31
33
  Requires-Dist: ophyd
32
34
  Requires-Dist: PyQt5>5.15
33
35
  Requires-Dist: pyRestTable
34
36
  Requires-Dist: pysumreg
35
37
  Requires-Dist: qtpy
36
- Requires-Dist: toml
37
- Requires-Dist: tomli
38
+ Requires-Dist: tiled[all]
38
39
  Requires-Dist: tomli-w
40
+ Requires-Dist: tomli
39
41
  Provides-Extra: dev
40
42
  Requires-Dist: build; extra == "dev"
41
43
  Requires-Dist: isort; extra == "dev"
@@ -59,6 +61,7 @@ Requires-Dist: sphinx-tabs; extra == "doc"
59
61
  Requires-Dist: sphinx; extra == "doc"
60
62
  Requires-Dist: graphviz; extra == "doc"
61
63
  Requires-Dist: dot; extra == "doc"
64
+ Requires-Dist: tomli-w; extra == "doc"
62
65
  Provides-Extra: all
63
66
  Requires-Dist: apsbits[dev,doc]; extra == "all"
64
67
  Dynamic: license-file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apsbits
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: Model of a Bluesky Data Acquisition Instrument in console, notebook, & queueserver.
5
5
  Author-email: Eric Codrea <ecodrea@anl.gov>, Pete Jemian <prjemian+instrument@gmail.com>, Rafael Vescovi <rvescovi@anl.gov>
6
6
  Maintainer-email: Eric Codrea <ecodrea@anl.gov>, Pete Jemian <prjemian+instrument@gmail.com>, Rafael Vescovi <rvescovi@anl.gov>
@@ -17,25 +17,27 @@ Classifier: Topic :: Utilities
17
17
  Requires-Python: >=3.11
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
- Requires-Dist: apstools>=1.7.2
20
+ Requires-Dist: apstools
21
+ Requires-Dist: bluesky-queueserver>=0.0.22
21
22
  Requires-Dist: bluesky-queueserver-api
22
- Requires-Dist: bluesky-queueserver
23
23
  Requires-Dist: bluesky-widgets
24
24
  Requires-Dist: bluesky
25
25
  Requires-Dist: caproto
26
26
  Requires-Dist: databroker==1.2.5
27
- Requires-Dist: guarneri
27
+ Requires-Dist: guarneri>=0.4.0
28
28
  Requires-Dist: ipython
29
29
  Requires-Dist: jupyterlab
30
+ Requires-Dist: matplotlib
31
+ Requires-Dist: ophyd-async
30
32
  Requires-Dist: ophyd-registry
31
33
  Requires-Dist: ophyd
32
34
  Requires-Dist: PyQt5>5.15
33
35
  Requires-Dist: pyRestTable
34
36
  Requires-Dist: pysumreg
35
37
  Requires-Dist: qtpy
36
- Requires-Dist: toml
37
- Requires-Dist: tomli
38
+ Requires-Dist: tiled[all]
38
39
  Requires-Dist: tomli-w
40
+ Requires-Dist: tomli
39
41
  Provides-Extra: dev
40
42
  Requires-Dist: build; extra == "dev"
41
43
  Requires-Dist: isort; extra == "dev"
@@ -59,6 +61,7 @@ Requires-Dist: sphinx-tabs; extra == "doc"
59
61
  Requires-Dist: sphinx; extra == "doc"
60
62
  Requires-Dist: graphviz; extra == "doc"
61
63
  Requires-Dist: dot; extra == "doc"
64
+ Requires-Dist: tomli-w; extra == "doc"
62
65
  Provides-Extra: all
63
66
  Requires-Dist: apsbits[dev,doc]; extra == "all"
64
67
  Dynamic: license-file
@@ -42,18 +42,16 @@ docs/source/api/utils.rst
42
42
  docs/source/api/generated/apsbits.core.best_effort_init.rst
43
43
  docs/source/api/generated/apsbits.core.catalog_init.rst
44
44
  docs/source/api/generated/apsbits.core.run_engine_init.rst
45
- docs/source/api/generated/apsbits.demo_instrument.callbacks.nexus_data_file_writer.rst
45
+ docs/source/api/generated/apsbits.demo_instrument.callbacks.demo_nexus_callback.rst
46
+ docs/source/api/generated/apsbits.demo_instrument.callbacks.demo_spec_callback.rst
46
47
  docs/source/api/generated/apsbits.demo_instrument.callbacks.rst
47
- docs/source/api/generated/apsbits.demo_instrument.callbacks.spec_data_file_writer.rst
48
48
  docs/source/api/generated/apsbits.demo_instrument.configs.rst
49
49
  docs/source/api/generated/apsbits.demo_instrument.devices.rst
50
- docs/source/api/generated/apsbits.demo_instrument.plans.dm_plans.rst
51
50
  docs/source/api/generated/apsbits.demo_instrument.plans.rst
52
51
  docs/source/api/generated/apsbits.demo_instrument.plans.sim_plans.rst
53
52
  docs/source/api/generated/apsbits.demo_instrument.rst
54
53
  docs/source/api/generated/apsbits.demo_instrument.startup.rst
55
54
  docs/source/api/generated/apsbits.demo_qserver.rst
56
- docs/source/api/generated/apsbits.utils.aps_functions.rst
57
55
  docs/source/api/generated/apsbits.utils.config_loaders.rst
58
56
  docs/source/api/generated/apsbits.utils.controls_setup.rst
59
57
  docs/source/api/generated/apsbits.utils.helper_functions.rst
@@ -79,6 +77,7 @@ docs/source/guides/startup.rst
79
77
  docs/source/guides/template_creation.rst
80
78
  src/apsbits/__init__.py
81
79
  src/apsbits/_version.py
80
+ src/apsbits/py.typed
82
81
  src/apsbits/api/__init__.py
83
82
  src/apsbits/api/create_new_instrument.py
84
83
  src/apsbits/api/delete_instrument.py
@@ -93,8 +92,8 @@ src/apsbits/demo_instrument/README.md
93
92
  src/apsbits/demo_instrument/__init__.py
94
93
  src/apsbits/demo_instrument/startup.py
95
94
  src/apsbits/demo_instrument/callbacks/__init__.py
96
- src/apsbits/demo_instrument/callbacks/nexus_data_file_writer.py
97
- src/apsbits/demo_instrument/callbacks/spec_data_file_writer.py
95
+ src/apsbits/demo_instrument/callbacks/demo_nexus_callback.py
96
+ src/apsbits/demo_instrument/callbacks/demo_spec_callback.py
98
97
  src/apsbits/demo_instrument/configs/__init__.py
99
98
  src/apsbits/demo_instrument/configs/devices.yml
100
99
  src/apsbits/demo_instrument/configs/devices_aps_only.yml
@@ -102,13 +101,12 @@ src/apsbits/demo_instrument/configs/extra_logging.yml
102
101
  src/apsbits/demo_instrument/configs/iconfig.yml
103
102
  src/apsbits/demo_instrument/devices/__init__.py
104
103
  src/apsbits/demo_instrument/plans/__init__.py
105
- src/apsbits/demo_instrument/plans/dm_plans.py
106
104
  src/apsbits/demo_instrument/plans/sim_plans.py
105
+ src/apsbits/demo_instrument/qserver/qs-config.yml
106
+ src/apsbits/demo_instrument/qserver/user_group_permissions.yaml
107
107
  src/apsbits/demo_instrument/suspenders/__init__.py
108
108
  src/apsbits/demo_instrument/utils/__init__.py
109
- src/apsbits/demo_qserver/qs-config.yml
110
- src/apsbits/demo_qserver/qs_host.sh
111
- src/apsbits/demo_qserver/user_group_permissions.yaml
109
+ src/apsbits/demo_scripts/qs_host.sh
112
110
  src/apsbits/tests/__init__.py
113
111
  src/apsbits/tests/conftest.py
114
112
  src/apsbits/tests/test_config.py
@@ -120,6 +118,7 @@ src/apsbits/tests/test_run_instrument.py
120
118
  src/apsbits/tests/test_stored_dict.py
121
119
  src/apsbits/utils/__init__.py
122
120
  src/apsbits/utils/aps_functions.py
121
+ src/apsbits/utils/baseline_setup.py
123
122
  src/apsbits/utils/config_loaders.py
124
123
  src/apsbits/utils/controls_setup.py
125
124
  src/apsbits/utils/helper_functions.py
@@ -1,22 +1,24 @@
1
- apstools>=1.7.2
1
+ apstools
2
+ bluesky-queueserver>=0.0.22
2
3
  bluesky-queueserver-api
3
- bluesky-queueserver
4
4
  bluesky-widgets
5
5
  bluesky
6
6
  caproto
7
7
  databroker==1.2.5
8
- guarneri
8
+ guarneri>=0.4.0
9
9
  ipython
10
10
  jupyterlab
11
+ matplotlib
12
+ ophyd-async
11
13
  ophyd-registry
12
14
  ophyd
13
15
  PyQt5>5.15
14
16
  pyRestTable
15
17
  pysumreg
16
18
  qtpy
17
- toml
18
- tomli
19
+ tiled[all]
19
20
  tomli-w
21
+ tomli
20
22
 
21
23
  [all]
22
24
  apsbits[dev,doc]
@@ -45,3 +47,4 @@ sphinx-tabs
45
47
  sphinx
46
48
  graphviz
47
49
  dot
50
+ tomli-w
@@ -0,0 +1,17 @@
1
+ apsbits.demo\_instrument.callbacks.demo\_nexus\_callback
2
+ ======================================================
3
+
4
+ .. automodule:: apsbits.demo_instrument.callbacks.demo_nexus_callback
5
+
6
+
7
+ .. rubric:: Functions
8
+
9
+ .. autosummary::
10
+
11
+ nxwriter_init
12
+
13
+ .. rubric:: Classes
14
+
15
+ .. autosummary::
16
+
17
+ MyNXWriter
@@ -0,0 +1,13 @@
1
+ apsbits.demo\_instrument.callbacks.demo\_spec\_callback
2
+ =====================================================
3
+
4
+ .. automodule:: apsbits.demo_instrument.callbacks.demo_spec_callback
5
+
6
+
7
+ .. rubric:: Functions
8
+
9
+ .. autosummary::
10
+
11
+ spec_comment
12
+ newSpecFile
13
+ init_specwriter_with_RE
@@ -10,5 +10,5 @@ apsbits.demo\_instrument.callbacks
10
10
  :toctree:
11
11
  :recursive:
12
12
 
13
- nexus_data_file_writer
14
- spec_data_file_writer
13
+ demo_nexus_callback
14
+ demo_spec_callback
@@ -10,5 +10,4 @@ apsbits.demo\_instrument.plans
10
10
  :toctree:
11
11
  :recursive:
12
12
 
13
- dm_plans
14
13
  sim_plans
@@ -72,7 +72,6 @@ The utilities module provides helper functions and tools:
72
72
  :toctree: generated
73
73
  :recursive:
74
74
 
75
- apsbits.utils.aps_functions
76
75
  apsbits.utils.config_loaders
77
76
  apsbits.utils.controls_setup
78
77
  apsbits.utils.helper_functions
@@ -11,7 +11,6 @@ The utilities module provides helper functions and tools for working with Bluesk
11
11
  :toctree: generated
12
12
  :recursive:
13
13
 
14
- aps_functions
15
14
  config_loaders
16
15
  controls_setup
17
16
  helper_functions
@@ -46,32 +46,24 @@ You can also add a device from an external package to the ``devices.yml`` file.
46
46
  prefix: ioc:Slit1
47
47
  labels: ["slits"]
48
48
 
49
- 2. Make sure all your device files are loaded on the ``iconfig.yml`` file.
50
-
51
- .. code-block:: yaml
52
-
53
- DEVICES_FILES:
54
- - devices.yml
55
- APS_DEVICES_FILES:
56
- - devices_aps_only.yml
57
-
58
- Note that the ``devices.yml`` file is loaded by default and the ``devices_aps_only.yml`` file is only loaded if the device is on the APS network.
59
49
 
60
50
  .. tip::
61
- All kwargs of your device can be specified in the yaml file making it easy to resuse classes.
51
+ `APSTOOLS <https://github.com/BCDA-APS/apstools/tree/main/apstools>`_ has a lot of devices commonly used at the APS. Consider first checking the package and overwriting the device class to fit your needs before creating a new device.
62
52
 
63
53
  .. tip::
64
- You can add any number of device files inside the iconfig file used by your instrument ``startup.py`` file. Just add another entry to the list.
54
+ You can add the `label: baseline` to any device in your configuration to automatically track its state during scans. This is particularly useful for monitoring environmental conditions or instrument parameters. For example:
65
55
 
66
- .. code-block:: yaml
56
+ .. code-block:: yaml
67
57
 
68
- ### Local OPHYD Device Control Yaml
69
- DEVICES_FILES:
70
- - devices.yml ## standard device file
71
- - devices_2.yml ## another device file
72
- APS_DEVICES_FILES:
73
- - devices_aps_only.yml ## APS only device file
74
- - devices_aps_only_2.yml ## another APS only device file
58
+ apstools.devices.ApsMachineParametersDevice:
59
+ - name: aps
60
+ labels:
61
+ - baseline
75
62
 
76
- .. tip::
77
- `APSTOOLS <https://github.com/BCDA-APS/apstools/tree/main/apstools>`_ has a lot of devices commonly used at the APS. Consider first checking the package and overwriting the device class to fit your needs before creating a new device.
63
+ ophyd.EpicsSignalRO:
64
+ - name: temperature_monitor
65
+ prefix: "IOC:TEMP"
66
+ labels:
67
+ - baseline
68
+
69
+ Baseline devices will be automatically included in the metadata of each scan, making it easy to track changes in environmental conditions or instrument parameters over time.
@@ -35,4 +35,26 @@ When ready to load the bluesky data acquisition for use, type this command. For
35
35
 
36
36
  .. code-block:: bash
37
37
 
38
+ from demo_instrument.startup import *
39
+
40
+ .. note::
41
+ Change the demo_instrument to your instrument installed package name.
42
+
43
+ Adding BITS to ipython profile
44
+ ----------------------------------
45
+
46
+ To add BITS to your ipython profile, first create a new profile:
47
+
48
+ .. code-block:: bash
49
+
50
+ ipython profile create bits-xx
51
+
52
+ Then, add the following to your startup file:
53
+
54
+ .. code-block:: bash
55
+
56
+ cat > ~/.ipython/profile_bits-xx/startup/00-start-bits.py << EOF
38
57
  from new_instrument.startup import *
58
+ EOF
59
+
60
+ For more detailed guidance on creating and configuring an ipython profile, see the `bluesky training documentation <https://github.com/BCDA-APS/bluesky_training/blob/304b8d02503044932afa5657cb43afd1f6be2f40/docs/source/instrument/_create_bluesky_ipython_profile.rst#L2>`_.
@@ -52,7 +52,6 @@ Tips:
52
52
  * Create an extra_logging.yml file if you need custom logging configuration
53
53
  * The default logging setup from apsbits will be used if no extra configuration is provided
54
54
 
55
-
56
55
  Data Management Setup
57
56
  ~~~~~~~~~~~~~~~~~~~
58
57
 
@@ -129,10 +128,51 @@ Device Loading
129
128
  if host_on_aps_subnet():
130
129
  RE(make_devices(clear=False, file="device_aps_only.yml"))
131
130
 
131
+ This block:
132
+ * Loads the main device configuration from devices.yml
133
+ * Optionally loads APS-specific devices from devices_aps_only.yml if running on APS subnet
134
+ * Uses clear=False to preserve existing devices
135
+
132
136
  Tips:
133
137
  * Create a devices.yml file with your instrument's device configurations
134
138
  * Optionally create device_aps_only.yml for APS-specific devices
135
- * Set clear=False to preserve existing devices
139
+ * The make_devices function will automatically register devices with the ophyd registry
140
+
141
+ Baseline Device Setup
142
+ ~~~~~~~~~~~~~~~~~~~
143
+
144
+ The baseline device setup allows you to track and record the state of specific devices during each scan. This is particularly useful for monitoring environmental conditions or instrument parameters that might affect your measurements.
145
+
146
+ To configure baseline devices:
147
+
148
+ 1. In your devices.yml file, add a `label: baseline` to any device you want to track:
149
+
150
+ .. code-block:: yaml
151
+
152
+ apstools.devices.ApsMachineParametersDevice:
153
+ - name: aps
154
+ labels:
155
+ - baseline
156
+
157
+ ophyd.EpicsSignalRO:
158
+ - name: temperature_monitor
159
+ prefix: "IOC:TEMP"
160
+ labels:
161
+ - baseline
162
+
163
+ 2. The baseline devices will be automatically included in the metadata of each scan through the setup_baseline_stream function:
164
+
165
+ .. code-block:: python
166
+
167
+ setup_baseline_stream(sd, oregistry, connect=False)
168
+
169
+ 3. You can access baseline device values in your analysis using the scan metadata.
170
+
171
+ Tips:
172
+ * Use baseline devices for monitoring critical environmental parameters
173
+ * Consider including timestamps, temperature, pressure, or other relevant measurements
174
+ * Baseline devices should be read-only to avoid accidental modifications
175
+ * Keep the number of baseline devices reasonable to avoid excessive data collection
136
176
 
137
177
  Configuration Tips
138
178
  ----------------
@@ -6,7 +6,7 @@ Software License
6
6
  ================
7
7
 
8
8
  License
9
- =======
9
+ -------
10
10
 
11
11
  The project is licensed under the following terms:
12
12
 
@@ -33,25 +33,27 @@ classifiers = [
33
33
  "Topic :: Utilities",
34
34
  ]
35
35
  dependencies = [
36
- "apstools >= 1.7.2",
36
+ "apstools",
37
+ "bluesky-queueserver >=0.0.22",
37
38
  "bluesky-queueserver-api",
38
- "bluesky-queueserver",
39
39
  "bluesky-widgets",
40
40
  "bluesky",
41
41
  "caproto",
42
- "databroker ==1.2.5",
43
- "guarneri",
42
+ "databroker==1.2.5",
43
+ "guarneri>=0.4.0",
44
44
  "ipython",
45
45
  "jupyterlab",
46
+ "matplotlib",
47
+ "ophyd-async",
46
48
  "ophyd-registry",
47
49
  "ophyd",
48
50
  "PyQt5>5.15",
49
51
  "pyRestTable",
50
52
  "pysumreg",
51
53
  "qtpy",
52
- "toml",
53
- "tomli",
54
+ "tiled[all]",
54
55
  "tomli-w",
56
+ "tomli",
55
57
  ]
56
58
 
57
59
  [project.optional-dependencies]
@@ -73,6 +75,7 @@ doc = [
73
75
  "sphinx",
74
76
  "graphviz",
75
77
  "dot",
78
+ "tomli-w",
76
79
  ]
77
80
 
78
81
  all = ["apsbits[dev,doc]"]
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '1.0.4'
21
- __version_tuple__ = version_tuple = (1, 0, 4)
31
+ __version__ = version = '1.0.6'
32
+ __version_tuple__ = version_tuple = (1, 0, 6)
33
+
34
+ __commit_id__ = commit_id = 'g484b02f15'