apsbits 1.0.3__tar.gz → 1.0.5__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.
- {apsbits-1.0.3 → apsbits-1.0.5}/HISTORY.rst +51 -2
- {apsbits-1.0.3/apsbits.egg-info → apsbits-1.0.5}/PKG-INFO +2 -2
- {apsbits-1.0.3 → apsbits-1.0.5/apsbits.egg-info}/PKG-INFO +2 -2
- {apsbits-1.0.3 → apsbits-1.0.5}/apsbits.egg-info/SOURCES.txt +6 -1
- {apsbits-1.0.3 → apsbits-1.0.5}/apsbits.egg-info/requires.txt +1 -1
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/guides/creating_devices.rst +14 -22
- apsbits-1.0.5/docs/source/guides/dm.rst +88 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/guides/index.rst +1 -0
- apsbits-1.0.5/docs/source/guides/logging.rst +283 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/guides/sessions.rst +22 -0
- apsbits-1.0.5/docs/source/guides/startup.rst +207 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/pyproject.toml +1 -1
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/_version.py +2 -2
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/core/instrument_init.py +23 -21
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/core/run_engine_init.py +1 -2
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/configs/devices.yml +4 -5
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/configs/devices_aps_only.yml +3 -1
- apsbits-1.0.5/src/apsbits/demo_instrument/configs/extra_logging.yml +40 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/configs/iconfig.yml +8 -2
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/startup.py +36 -13
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_qserver/qs-config.yml +0 -9
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/tests/test_config.py +6 -4
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/utils/aps_functions.py +10 -2
- apsbits-1.0.5/src/apsbits/utils/baseline_setup.py +104 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/utils/config_loaders.py +0 -1
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/utils/controls_setup.py +0 -2
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/utils/helper_functions.py +0 -1
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/utils/logging_setup.py +74 -22
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/utils/metadata.py +0 -1
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/utils/sim_creator.py +0 -1
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/utils/stored_dict.py +0 -1
- {apsbits-1.0.3 → apsbits-1.0.5}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/.github/ISSUE_TEMPLATE/other.md +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/.github/ISSUE_TEMPLATE/question-issue-template.md +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/.github/dependabot.yml +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/.github/workflows/code.yml +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/.github/workflows/docs.yml +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/.github/workflows/pypi.yml +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/.gitignore +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/.pre-commit-config.yaml +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/LICENSE +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/README.md +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/apsbits.egg-info/dependency_links.txt +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/apsbits.egg-info/entry_points.txt +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/apsbits.egg-info/top_level.txt +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/Makefile +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/make.bat +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/resources/create-repository-name.webp +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/resources/create-repository-owner.webp +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/resources/demo.ipynb +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/resources/use-this-template-button.webp +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/_static/.gitkeep +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/api.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/core.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/demo_instrument.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/demo_qserver.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.core.best_effort_init.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.core.catalog_init.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.core.run_engine_init.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.demo_instrument.callbacks.nexus_data_file_writer.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.demo_instrument.callbacks.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.demo_instrument.callbacks.spec_data_file_writer.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.demo_instrument.configs.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.demo_instrument.devices.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.demo_instrument.plans.dm_plans.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.demo_instrument.plans.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.demo_instrument.plans.sim_plans.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.demo_instrument.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.demo_instrument.startup.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.demo_qserver.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.utils.aps_functions.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.utils.config_loaders.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.utils.controls_setup.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.utils.helper_functions.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.utils.logging_setup.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.utils.metadata.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/generated/apsbits.utils.stored_dict.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/index.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/api/utils.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/bits_overview.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/conf.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/deprecated/console.rst +0 -0
- {apsbits-1.0.3/docs/source/guides → apsbits-1.0.5/docs/source/deprecated}/dm.md +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/deprecated/logging_config.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/deprecated/notebook.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/deprecated/script.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/guides/creating_instrument.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/guides/developing_bits.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/guides/qserver.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/guides/qserver_service.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/guides/setting_iconfig.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/guides/template_creation.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/history.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/index.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/install.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/docs/source/license.rst +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/setup.cfg +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/__init__.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/api/__init__.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/api/create_new_instrument.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/api/delete_instrument.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/api/run_instrument.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/configs/logging.yml +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/core/__init__.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/core/best_effort_init.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/core/catalog_init.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/README.md +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/__init__.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/callbacks/__init__.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/callbacks/nexus_data_file_writer.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/callbacks/spec_data_file_writer.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/configs/__init__.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/devices/__init__.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/plans/__init__.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/plans/dm_plans.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/plans/sim_plans.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/suspenders/__init__.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_instrument/utils/__init__.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_qserver/qs_host.sh +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/demo_qserver/user_group_permissions.yaml +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/tests/__init__.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/tests/conftest.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/tests/test_delete_instrument.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/tests/test_device_factories.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/tests/test_general.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/tests/test_make_devices.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/tests/test_run_instrument.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/tests/test_stored_dict.py +0 -0
- {apsbits-1.0.3 → apsbits-1.0.5}/src/apsbits/utils/__init__.py +0 -0
|
@@ -30,10 +30,59 @@ 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
|
|
33
|
+
1.1.0
|
|
34
34
|
#####
|
|
35
35
|
|
|
36
|
-
release expected
|
|
36
|
+
release expected ?
|
|
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
|
+
|
|
54
|
+
1.0.3
|
|
55
|
+
#####
|
|
56
|
+
|
|
57
|
+
released 2025-05-01
|
|
58
|
+
|
|
59
|
+
Enhancements
|
|
60
|
+
---------------
|
|
61
|
+
|
|
62
|
+
* arguments for run engine
|
|
63
|
+
|
|
64
|
+
Fixes
|
|
65
|
+
-----
|
|
66
|
+
|
|
67
|
+
* 'make_devices()' from yaml file
|
|
68
|
+
|
|
69
|
+
Maintenance
|
|
70
|
+
---------------
|
|
71
|
+
|
|
72
|
+
* Clean backend
|
|
73
|
+
|
|
74
|
+
1.0.2
|
|
75
|
+
#####
|
|
76
|
+
|
|
77
|
+
released 2025-04-18
|
|
78
|
+
|
|
79
|
+
Maintenance
|
|
80
|
+
---------------
|
|
81
|
+
|
|
82
|
+
* Add a release history file
|
|
83
|
+
* Documentation overhaul1
|
|
84
|
+
* adding install docs given new workflow
|
|
85
|
+
* Feature/API_functionalities and Makedevices
|
|
37
86
|
|
|
38
87
|
1.0.1
|
|
39
88
|
#####
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apsbits
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
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>
|
|
@@ -19,7 +19,7 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: apstools>=1.7.2
|
|
21
21
|
Requires-Dist: bluesky-queueserver-api
|
|
22
|
-
Requires-Dist: bluesky-queueserver
|
|
22
|
+
Requires-Dist: bluesky-queueserver>=0.0.22
|
|
23
23
|
Requires-Dist: bluesky-widgets
|
|
24
24
|
Requires-Dist: bluesky
|
|
25
25
|
Requires-Dist: caproto
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apsbits
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
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>
|
|
@@ -19,7 +19,7 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: apstools>=1.7.2
|
|
21
21
|
Requires-Dist: bluesky-queueserver-api
|
|
22
|
-
Requires-Dist: bluesky-queueserver
|
|
22
|
+
Requires-Dist: bluesky-queueserver>=0.0.22
|
|
23
23
|
Requires-Dist: bluesky-widgets
|
|
24
24
|
Requires-Dist: bluesky
|
|
25
25
|
Requires-Dist: caproto
|
|
@@ -61,18 +61,21 @@ docs/source/api/generated/apsbits.utils.logging_setup.rst
|
|
|
61
61
|
docs/source/api/generated/apsbits.utils.metadata.rst
|
|
62
62
|
docs/source/api/generated/apsbits.utils.stored_dict.rst
|
|
63
63
|
docs/source/deprecated/console.rst
|
|
64
|
+
docs/source/deprecated/dm.md
|
|
64
65
|
docs/source/deprecated/logging_config.rst
|
|
65
66
|
docs/source/deprecated/notebook.rst
|
|
66
67
|
docs/source/deprecated/script.rst
|
|
67
68
|
docs/source/guides/creating_devices.rst
|
|
68
69
|
docs/source/guides/creating_instrument.rst
|
|
69
70
|
docs/source/guides/developing_bits.rst
|
|
70
|
-
docs/source/guides/dm.
|
|
71
|
+
docs/source/guides/dm.rst
|
|
71
72
|
docs/source/guides/index.rst
|
|
73
|
+
docs/source/guides/logging.rst
|
|
72
74
|
docs/source/guides/qserver.rst
|
|
73
75
|
docs/source/guides/qserver_service.rst
|
|
74
76
|
docs/source/guides/sessions.rst
|
|
75
77
|
docs/source/guides/setting_iconfig.rst
|
|
78
|
+
docs/source/guides/startup.rst
|
|
76
79
|
docs/source/guides/template_creation.rst
|
|
77
80
|
src/apsbits/__init__.py
|
|
78
81
|
src/apsbits/_version.py
|
|
@@ -95,6 +98,7 @@ src/apsbits/demo_instrument/callbacks/spec_data_file_writer.py
|
|
|
95
98
|
src/apsbits/demo_instrument/configs/__init__.py
|
|
96
99
|
src/apsbits/demo_instrument/configs/devices.yml
|
|
97
100
|
src/apsbits/demo_instrument/configs/devices_aps_only.yml
|
|
101
|
+
src/apsbits/demo_instrument/configs/extra_logging.yml
|
|
98
102
|
src/apsbits/demo_instrument/configs/iconfig.yml
|
|
99
103
|
src/apsbits/demo_instrument/devices/__init__.py
|
|
100
104
|
src/apsbits/demo_instrument/plans/__init__.py
|
|
@@ -116,6 +120,7 @@ src/apsbits/tests/test_run_instrument.py
|
|
|
116
120
|
src/apsbits/tests/test_stored_dict.py
|
|
117
121
|
src/apsbits/utils/__init__.py
|
|
118
122
|
src/apsbits/utils/aps_functions.py
|
|
123
|
+
src/apsbits/utils/baseline_setup.py
|
|
119
124
|
src/apsbits/utils/config_loaders.py
|
|
120
125
|
src/apsbits/utils/controls_setup.py
|
|
121
126
|
src/apsbits/utils/helper_functions.py
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
56
|
+
.. code-block:: yaml
|
|
67
57
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
77
|
-
|
|
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.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
Guide: APS Data Management Plans
|
|
2
|
+
==============================
|
|
3
|
+
|
|
4
|
+
Provides a few examples of the plans that interact with APS Data Management (DM)
|
|
5
|
+
tools.
|
|
6
|
+
|
|
7
|
+
Required
|
|
8
|
+
--------
|
|
9
|
+
|
|
10
|
+
The DM tools rely on the existence of a set of environment variables that define various aspects of the DM system.
|
|
11
|
+
|
|
12
|
+
Show any DM jobs still processing
|
|
13
|
+
--------------------------------
|
|
14
|
+
|
|
15
|
+
Use the ``dm_list_processing_jobs()`` plan stub to show DM any workflow jobs that
|
|
16
|
+
are still running or pending. These are installed by calling
|
|
17
|
+
``aps_dm_setup(DM_SETUP_SCRIPT)`` in each session before you call any other DM
|
|
18
|
+
code.
|
|
19
|
+
|
|
20
|
+
Here, ``DM_SETUP_SCRIPT`` is the full path to the bash setup shell script provided
|
|
21
|
+
by DM for this account. The exact path can be different for some installations.
|
|
22
|
+
If unsure, contact the APS DM team for advice.
|
|
23
|
+
|
|
24
|
+
Note: ``aps_dm_setup`` is not a bluesky plan stub. Call it as a standard Python
|
|
25
|
+
function.
|
|
26
|
+
|
|
27
|
+
Here's an example:
|
|
28
|
+
|
|
29
|
+
.. code-block:: python
|
|
30
|
+
|
|
31
|
+
from apsbits.utils.aps_functions import aps_dm_setup
|
|
32
|
+
|
|
33
|
+
aps_dm_setup("/home/dm/etc/dm.setup.sh")
|
|
34
|
+
|
|
35
|
+
Start a new workflow job
|
|
36
|
+
-----------------------
|
|
37
|
+
|
|
38
|
+
The ``dm_kickoff_workflow()`` plan can be used to start a DM workflow job. See
|
|
39
|
+
the source code for additional options (such as how often to report progress and
|
|
40
|
+
how to wait for the workflow to finish before the bluesky plan proceeds).
|
|
41
|
+
|
|
42
|
+
.. code-block:: python
|
|
43
|
+
|
|
44
|
+
from new_instrument.plans.dm_plans import dm_kickoff_workflow
|
|
45
|
+
|
|
46
|
+
# Use the run with `uid` from the catalog `cat`.
|
|
47
|
+
run = cat[uid]
|
|
48
|
+
|
|
49
|
+
# Create the dictionary of arguments for the chosen workflow.
|
|
50
|
+
argsDict = {
|
|
51
|
+
"filePath": "path/to/data/file.mda", # example
|
|
52
|
+
"experimentName": "testing-2024-11", # example
|
|
53
|
+
"workflowName": "processing", # existing workflow name
|
|
54
|
+
# ... any other items required by the workflow
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
# Start the workflow job from the command line:
|
|
58
|
+
RE(dm_kickoff_workflow(run, argsDict))
|
|
59
|
+
|
|
60
|
+
In a plan, replace the call to ``RE(...)`` with ``yield from ...``, such as:
|
|
61
|
+
|
|
62
|
+
.. code-block:: python
|
|
63
|
+
|
|
64
|
+
def a_plan():
|
|
65
|
+
# earlier steps
|
|
66
|
+
yield from dm_kickoff_workflow(run, argsDict)
|
|
67
|
+
# later steps
|
|
68
|
+
|
|
69
|
+
Start a new workflow job (Low-level)
|
|
70
|
+
----------------------------------
|
|
71
|
+
|
|
72
|
+
If the ``dm_kickoff_workflow()`` plan stub does more than you want, you might consider the ``dm_submit_workflow_job()``
|
|
73
|
+
plan stub. The ``dm_submit_workflow_job()`` plan stub is
|
|
74
|
+
a thin wrapper around DM's ``startProcessingJob()`` function.
|
|
75
|
+
The plan stub converts this DM function into a bluesky plan, and reports the DM workflow job ``id`` once the job has been submitted.
|
|
76
|
+
|
|
77
|
+
As above, you'll need the ``workflowName`` and the ``argsDict``.
|
|
78
|
+
|
|
79
|
+
From the command line: ``RE(dm_submit_workflow_job(workflowName, argsDict))``
|
|
80
|
+
|
|
81
|
+
In a plan: ``yield from dm_submit_workflow_job(workflowName, argsDict)``
|
|
82
|
+
|
|
83
|
+
References
|
|
84
|
+
----------
|
|
85
|
+
|
|
86
|
+
The `apstools` package has more support to integrate various capabilities of the DM tools.
|
|
87
|
+
|
|
88
|
+
For more information about DM, see its `API Reference <https://git.aps.anl.gov/DM/dm-docs/-/wikis/DM/Beamline-Services/API-Reference>`_.
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
Logging Configuration Guide
|
|
2
|
+
=========================
|
|
3
|
+
|
|
4
|
+
This guide explains how to configure and customize logging in the BITS package.
|
|
5
|
+
|
|
6
|
+
Overview
|
|
7
|
+
--------
|
|
8
|
+
|
|
9
|
+
The logging system provides:
|
|
10
|
+
|
|
11
|
+
* Console output for immediate feedback
|
|
12
|
+
* File logging for persistent records
|
|
13
|
+
* IPython session logging
|
|
14
|
+
* Module-specific log levels
|
|
15
|
+
* Log rotation to manage disk space
|
|
16
|
+
|
|
17
|
+
Default Configuration
|
|
18
|
+
-------------------
|
|
19
|
+
|
|
20
|
+
The default logging configuration is defined in ``src/apsbits/configs/logging.yml``:
|
|
21
|
+
|
|
22
|
+
.. code-block:: yaml
|
|
23
|
+
|
|
24
|
+
console_logs:
|
|
25
|
+
date_format: "%a-%H:%M:%S"
|
|
26
|
+
log_format: "%(levelname)-.1s %(asctime)s.%(msecs)03d: %(message)s"
|
|
27
|
+
level: info
|
|
28
|
+
root_level: bsdev
|
|
29
|
+
|
|
30
|
+
file_logs:
|
|
31
|
+
date_format: "%Y-%m-%d %H:%M:%S"
|
|
32
|
+
log_directory: .logs
|
|
33
|
+
log_filename_base: logging.log
|
|
34
|
+
log_format: "|\
|
|
35
|
+
%(asctime)s.%(msecs)03d|\
|
|
36
|
+
%(levelname)s|\
|
|
37
|
+
%(process)d|\
|
|
38
|
+
%(name)s|\
|
|
39
|
+
%(module)s|\
|
|
40
|
+
%(lineno)d|\
|
|
41
|
+
%(threadName)s| - \
|
|
42
|
+
%(message)s"
|
|
43
|
+
maxBytes: 1_000_000
|
|
44
|
+
backupCount: 9
|
|
45
|
+
level: info
|
|
46
|
+
rotate_on_startup: true
|
|
47
|
+
|
|
48
|
+
ipython_logs:
|
|
49
|
+
log_directory: .logs
|
|
50
|
+
log_filename_base: ipython_log.py
|
|
51
|
+
log_mode: rotate
|
|
52
|
+
options: -o -t
|
|
53
|
+
|
|
54
|
+
modules:
|
|
55
|
+
apstools: warning
|
|
56
|
+
bluesky-queueserver: warning
|
|
57
|
+
bluesky: warning
|
|
58
|
+
bluesky.RE: warning
|
|
59
|
+
caproto: warning
|
|
60
|
+
databroker: warning
|
|
61
|
+
ophyd: warning
|
|
62
|
+
|
|
63
|
+
Log Levels
|
|
64
|
+
---------
|
|
65
|
+
|
|
66
|
+
The package defines seven log levels in order of increasing detail:
|
|
67
|
+
|
|
68
|
+
========= ========= ==================================================
|
|
69
|
+
name severity comments
|
|
70
|
+
========= ========= ==================================================
|
|
71
|
+
CRITICAL 50 Examine immediately. **Quietest** level.
|
|
72
|
+
ERROR 40 Something has failed.
|
|
73
|
+
WARNING 30 Something needs attention.
|
|
74
|
+
INFO 20 A report that may be of interest.
|
|
75
|
+
BSDEV 15 A report of interest to developers.
|
|
76
|
+
DEBUG 10 Diagnostic. **Noisiest** level.
|
|
77
|
+
NOTSET 0 Initial setting, defaults to WARNING.
|
|
78
|
+
========= ========= ==================================================
|
|
79
|
+
|
|
80
|
+
Custom Configuration
|
|
81
|
+
------------------
|
|
82
|
+
|
|
83
|
+
To customize logging for your instrument, create an ``extra_logging.yml`` file in your instrument's config directory. The settings in this file will override the default configuration:
|
|
84
|
+
|
|
85
|
+
.. code-block:: yaml
|
|
86
|
+
|
|
87
|
+
# Custom logging configuration
|
|
88
|
+
# These settings will override the default configuration
|
|
89
|
+
console_logs:
|
|
90
|
+
level: debug # Override console log level
|
|
91
|
+
root_level: debug # Override root log level
|
|
92
|
+
|
|
93
|
+
file_logs:
|
|
94
|
+
log_directory: /custom/path/to/logs # Override log directory
|
|
95
|
+
maxBytes: 2_000_000 # Override max file size
|
|
96
|
+
backupCount: 5 # Override backup count
|
|
97
|
+
|
|
98
|
+
modules:
|
|
99
|
+
your_module: debug # Add or override module logging level
|
|
100
|
+
|
|
101
|
+
The configuration system will:
|
|
102
|
+
1. Load the default configuration from ``src/apsbits/configs/logging.yml``
|
|
103
|
+
2. If an extra configuration is provided, merge it with the default configuration:
|
|
104
|
+
* For dictionary settings (like ``console_logs``, ``file_logs``), only the specified keys are overridden
|
|
105
|
+
* For non-dictionary settings, the entire setting is replaced
|
|
106
|
+
* New settings not present in the default configuration are added
|
|
107
|
+
|
|
108
|
+
Then, in your ``startup.py``, configure logging with your custom configuration:
|
|
109
|
+
|
|
110
|
+
.. code-block:: python
|
|
111
|
+
|
|
112
|
+
from pathlib import Path
|
|
113
|
+
from apsbits.utils.logging_setup import configure_logging
|
|
114
|
+
|
|
115
|
+
# Get the path to your instrument's config directory
|
|
116
|
+
instrument_path = Path(__file__).parent
|
|
117
|
+
extra_logging_configs_path = instrument_path / "configs" / "extra_logging.yml"
|
|
118
|
+
|
|
119
|
+
# Configure logging with your custom settings
|
|
120
|
+
# The extra configuration will override the default settings
|
|
121
|
+
configure_logging(extra_logging_configs_path=extra_logging_configs_path)
|
|
122
|
+
|
|
123
|
+
Example of Configuration Override
|
|
124
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
125
|
+
|
|
126
|
+
Default configuration:
|
|
127
|
+
.. code-block:: yaml
|
|
128
|
+
|
|
129
|
+
console_logs:
|
|
130
|
+
level: info
|
|
131
|
+
root_level: bsdev
|
|
132
|
+
|
|
133
|
+
file_logs:
|
|
134
|
+
maxBytes: 1_000_000
|
|
135
|
+
backupCount: 9
|
|
136
|
+
|
|
137
|
+
Extra configuration:
|
|
138
|
+
.. code-block:: yaml
|
|
139
|
+
|
|
140
|
+
console_logs:
|
|
141
|
+
level: debug # Only overrides the level, root_level remains bsdev
|
|
142
|
+
|
|
143
|
+
file_logs:
|
|
144
|
+
maxBytes: 2_000_000 # Only overrides maxBytes, backupCount remains 9
|
|
145
|
+
|
|
146
|
+
Resulting configuration:
|
|
147
|
+
.. code-block:: yaml
|
|
148
|
+
|
|
149
|
+
console_logs:
|
|
150
|
+
level: debug # From extra config
|
|
151
|
+
root_level: bsdev # From default config
|
|
152
|
+
|
|
153
|
+
file_logs:
|
|
154
|
+
maxBytes: 2_000_000 # From extra config
|
|
155
|
+
backupCount: 9 # From default config
|
|
156
|
+
|
|
157
|
+
Error Handling
|
|
158
|
+
-------------
|
|
159
|
+
|
|
160
|
+
The logging configuration system includes error handling for common issues:
|
|
161
|
+
|
|
162
|
+
1. Invalid or Empty Configuration Files:
|
|
163
|
+
* The main logging configuration file must be valid and non-empty
|
|
164
|
+
* If the main configuration is invalid, a ``ValueError`` is raised
|
|
165
|
+
* If the extra configuration is invalid, a warning is logged and the default configuration is used
|
|
166
|
+
|
|
167
|
+
2. Missing Configuration Files:
|
|
168
|
+
* The main logging configuration file must exist
|
|
169
|
+
* Extra configuration files are optional
|
|
170
|
+
* If an extra configuration file is missing, the default configuration is used
|
|
171
|
+
|
|
172
|
+
Example error handling in your code:
|
|
173
|
+
|
|
174
|
+
.. code-block:: python
|
|
175
|
+
|
|
176
|
+
try:
|
|
177
|
+
configure_logging(extra_logging_configs_path=extra_logging_configs_path)
|
|
178
|
+
except ValueError as e:
|
|
179
|
+
logger.error("Failed to configure logging: %s", e)
|
|
180
|
+
# Handle the error appropriately
|
|
181
|
+
except Exception as e:
|
|
182
|
+
logger.exception("Unexpected error configuring logging")
|
|
183
|
+
# Handle unexpected errors
|
|
184
|
+
|
|
185
|
+
Log File Locations
|
|
186
|
+
----------------
|
|
187
|
+
|
|
188
|
+
By default, logs are stored in a ``.logs`` directory at the root of your package:
|
|
189
|
+
|
|
190
|
+
.. code-block:: text
|
|
191
|
+
|
|
192
|
+
your_package/
|
|
193
|
+
├── .logs/
|
|
194
|
+
│ ├── logging.log # Main log file
|
|
195
|
+
│ ├── logging.log.1 # Rotated logs
|
|
196
|
+
│ ├── logging.log.2
|
|
197
|
+
│ └── ipython_log.py # IPython session logs
|
|
198
|
+
├── src/
|
|
199
|
+
├── tests/
|
|
200
|
+
└── ...
|
|
201
|
+
|
|
202
|
+
You can override the log directory location by specifying ``log_directory`` in your configuration:
|
|
203
|
+
|
|
204
|
+
.. code-block:: yaml
|
|
205
|
+
|
|
206
|
+
file_logs:
|
|
207
|
+
log_directory: /custom/path/to/logs
|
|
208
|
+
log_filename_base: my_instrument.log
|
|
209
|
+
|
|
210
|
+
Log Rotation
|
|
211
|
+
-----------
|
|
212
|
+
|
|
213
|
+
Log files are automatically rotated to manage disk space:
|
|
214
|
+
|
|
215
|
+
* Files are rotated when they reach the specified size (default: 1MB)
|
|
216
|
+
* A maximum number of backup files is kept (default: 9)
|
|
217
|
+
* Logs can be rotated on startup (default: true)
|
|
218
|
+
|
|
219
|
+
Configure these settings in your logging configuration:
|
|
220
|
+
|
|
221
|
+
.. code-block:: yaml
|
|
222
|
+
|
|
223
|
+
file_logs:
|
|
224
|
+
maxBytes: 2_000_000 # 2MB
|
|
225
|
+
backupCount: 5 # Keep 5 backup files
|
|
226
|
+
rotate_on_startup: true
|
|
227
|
+
|
|
228
|
+
Using Logging in Your Code
|
|
229
|
+
------------------------
|
|
230
|
+
|
|
231
|
+
To use logging in your code:
|
|
232
|
+
|
|
233
|
+
.. code-block:: python
|
|
234
|
+
|
|
235
|
+
import logging
|
|
236
|
+
|
|
237
|
+
# Get a logger for your module
|
|
238
|
+
logger = logging.getLogger(__name__)
|
|
239
|
+
|
|
240
|
+
# Log messages at different levels
|
|
241
|
+
logger.debug("Detailed information for debugging")
|
|
242
|
+
logger.info("General information about program execution")
|
|
243
|
+
logger.warning("Warning messages for potentially problematic situations")
|
|
244
|
+
logger.error("Error messages for serious problems")
|
|
245
|
+
logger.critical("Critical messages for fatal errors")
|
|
246
|
+
logger.bsdev("Developer-specific information")
|
|
247
|
+
|
|
248
|
+
Best Practices
|
|
249
|
+
-------------
|
|
250
|
+
|
|
251
|
+
1. Use appropriate log levels:
|
|
252
|
+
* DEBUG: Detailed information for debugging
|
|
253
|
+
* INFO: General information about program execution
|
|
254
|
+
* WARNING: Potentially problematic situations
|
|
255
|
+
* ERROR: Serious problems
|
|
256
|
+
* CRITICAL: Fatal errors
|
|
257
|
+
* BSDEV: Developer-specific information
|
|
258
|
+
|
|
259
|
+
2. Include relevant context in log messages:
|
|
260
|
+
* Use string formatting for variables
|
|
261
|
+
* Include error details when catching exceptions
|
|
262
|
+
* Add module and function names for clarity
|
|
263
|
+
|
|
264
|
+
3. Configure module-specific logging levels to reduce noise:
|
|
265
|
+
* Set verbose logging for your modules
|
|
266
|
+
* Set higher levels for third-party modules
|
|
267
|
+
|
|
268
|
+
4. Use log rotation to manage disk space:
|
|
269
|
+
* Set appropriate file sizes
|
|
270
|
+
* Configure backup count based on available space
|
|
271
|
+
* Consider rotating logs on startup for clean sessions
|
|
272
|
+
|
|
273
|
+
5. Handle logging configuration errors:
|
|
274
|
+
* Always wrap logging configuration in try-except blocks
|
|
275
|
+
* Provide fallback configurations when needed
|
|
276
|
+
* Log configuration errors appropriately
|
|
277
|
+
|
|
278
|
+
References
|
|
279
|
+
----------
|
|
280
|
+
|
|
281
|
+
* `Python logging documentation <https://docs.python.org/3/library/logging.html>`_
|
|
282
|
+
* `Bluesky debugging guide <https://blueskyproject.io/bluesky/main/debugging.html>`_
|
|
283
|
+
* `Ophyd logging reference <https://blueskyproject.io/ophyd/user_v1/reference/logging.html>`_
|
|
@@ -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>`_.
|