apsbits 1.0.1__tar.gz → 1.0.3__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.1 → apsbits-1.0.3}/.github/workflows/code.yml +2 -2
- {apsbits-1.0.1 → apsbits-1.0.3}/.github/workflows/docs.yml +3 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/.gitignore +1 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/.pre-commit-config.yaml +8 -7
- apsbits-1.0.3/HISTORY.rst +61 -0
- {apsbits-1.0.1/apsbits.egg-info → apsbits-1.0.3}/PKG-INFO +11 -52
- apsbits-1.0.3/README.md +38 -0
- {apsbits-1.0.1 → apsbits-1.0.3/apsbits.egg-info}/PKG-INFO +11 -52
- {apsbits-1.0.1 → apsbits-1.0.3}/apsbits.egg-info/SOURCES.txt +51 -17
- apsbits-1.0.3/apsbits.egg-info/entry_points.txt +5 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/apsbits.egg-info/requires.txt +3 -0
- apsbits-1.0.3/docs/source/api/api.rst +49 -0
- apsbits-1.0.3/docs/source/api/core.rst +49 -0
- apsbits-1.0.3/docs/source/api/demo_instrument.rst +55 -0
- apsbits-1.0.3/docs/source/api/demo_qserver.rst +30 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.core.best_effort_init.rst +11 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.core.catalog_init.rst +11 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.core.run_engine_init.rst +11 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.demo_instrument.callbacks.nexus_data_file_writer.rst +17 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.demo_instrument.callbacks.rst +14 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.demo_instrument.callbacks.spec_data_file_writer.rst +19 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.demo_instrument.configs.rst +4 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.demo_instrument.devices.rst +4 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.demo_instrument.plans.dm_plans.rst +13 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.demo_instrument.plans.rst +14 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.demo_instrument.plans.sim_plans.rst +13 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.demo_instrument.rst +17 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.demo_instrument.startup.rst +4 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.demo_qserver.rst +4 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.utils.aps_functions.rst +12 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.utils.config_loaders.rst +14 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.utils.controls_setup.rst +20 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.utils.helper_functions.rst +16 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.utils.logging_setup.rst +12 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.utils.metadata.rst +12 -0
- apsbits-1.0.3/docs/source/api/generated/apsbits.utils.stored_dict.rst +11 -0
- apsbits-1.0.3/docs/source/api/index.rst +106 -0
- apsbits-1.0.3/docs/source/api/utils.rst +54 -0
- apsbits-1.0.3/docs/source/bits_overview.rst +99 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/docs/source/conf.py +7 -1
- {apsbits-1.0.1/docs/source → apsbits-1.0.3/docs/source/deprecated}/console.rst +3 -3
- apsbits-1.0.3/docs/source/deprecated/logging_config.rst +43 -0
- {apsbits-1.0.1/docs/source → apsbits-1.0.3/docs/source/deprecated}/notebook.rst +4 -11
- {apsbits-1.0.1/docs/source → apsbits-1.0.3/docs/source/deprecated}/script.rst +1 -1
- apsbits-1.0.3/docs/source/guides/creating_devices.rst +77 -0
- apsbits-1.0.3/docs/source/guides/creating_instrument.rst +19 -0
- apsbits-1.0.3/docs/source/guides/developing_bits.rst +48 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/docs/source/guides/dm.md +2 -2
- apsbits-1.0.3/docs/source/guides/index.rst +29 -0
- {apsbits-1.0.1/docs/source → apsbits-1.0.3/docs/source/guides}/qserver.rst +54 -21
- apsbits-1.0.3/docs/source/guides/qserver_service.rst +191 -0
- apsbits-1.0.3/docs/source/guides/sessions.rst +38 -0
- apsbits-1.0.3/docs/source/guides/setting_iconfig.rst +144 -0
- apsbits-1.0.3/docs/source/guides/template_creation.rst +32 -0
- apsbits-1.0.3/docs/source/history.rst +6 -0
- apsbits-1.0.3/docs/source/index.rst +55 -0
- apsbits-1.0.3/docs/source/install.rst +19 -0
- apsbits-1.0.3/docs/source/license.rst +14 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/pyproject.toml +15 -2
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/_version.py +2 -2
- apsbits-1.0.3/src/apsbits/api/__init__.py +6 -0
- apsbits-1.0.3/src/apsbits/api/delete_instrument.py +142 -0
- apsbits-1.0.3/src/apsbits/api/run_instrument.py +97 -0
- {apsbits-1.0.1/src/apsbits/demo_instrument → apsbits-1.0.3/src/apsbits}/configs/logging.yml +0 -1
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/core/catalog_init.py +3 -3
- apsbits-1.0.1/src/apsbits/utils/make_devices.py → apsbits-1.0.3/src/apsbits/core/instrument_init.py +51 -63
- apsbits-1.0.3/src/apsbits/core/run_engine_init.py +126 -0
- apsbits-1.0.3/src/apsbits/demo_instrument/__init__.py +9 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_instrument/configs/devices.yml +2 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_instrument/configs/iconfig.yml +1 -17
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_instrument/plans/sim_plans.py +1 -1
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_instrument/startup.py +22 -10
- apsbits-1.0.3/src/apsbits/demo_instrument/suspenders/__init__.py +1 -0
- apsbits-1.0.3/src/apsbits/demo_instrument/utils/__init__.py +1 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/tests/conftest.py +1 -1
- apsbits-1.0.3/src/apsbits/tests/test_delete_instrument.py +487 -0
- apsbits-1.0.3/src/apsbits/tests/test_make_devices.py +28 -0
- apsbits-1.0.3/src/apsbits/tests/test_run_instrument.py +310 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/utils/config_loaders.py +71 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/utils/controls_setup.py +2 -6
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/utils/logging_setup.py +22 -9
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/utils/metadata.py +0 -1
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/utils/sim_creator.py +0 -3
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/utils/stored_dict.py +73 -49
- apsbits-1.0.1/README.md +0 -82
- apsbits-1.0.1/apsbits.egg-info/entry_points.txt +0 -2
- apsbits-1.0.1/docs/source/api/callbacks.rst +0 -16
- apsbits-1.0.1/docs/source/api/configs.rst +0 -44
- apsbits-1.0.1/docs/source/api/core.rst +0 -19
- apsbits-1.0.1/docs/source/api/devices.rst +0 -309
- apsbits-1.0.1/docs/source/api/index.rst +0 -42
- apsbits-1.0.1/docs/source/api/plans.rst +0 -15
- apsbits-1.0.1/docs/source/api/startup.rst +0 -19
- apsbits-1.0.1/docs/source/api/utils.rst +0 -28
- apsbits-1.0.1/docs/source/guides/index.rst +0 -13
- apsbits-1.0.1/docs/source/guides/template_sync.rst +0 -133
- apsbits-1.0.1/docs/source/index.rst +0 -71
- apsbits-1.0.1/docs/source/install.rst +0 -70
- apsbits-1.0.1/docs/source/license.rst +0 -6
- apsbits-1.0.1/docs/source/logging_config.rst +0 -76
- apsbits-1.0.1/docs/source/sessions.rst +0 -15
- apsbits-1.0.1/docs/template_creation.md +0 -31
- apsbits-1.0.1/src/apsbits/core/run_engine_init.py +0 -115
- apsbits-1.0.1/src/apsbits/demo_instrument/__init__.py +0 -22
- {apsbits-1.0.1 → apsbits-1.0.3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/.github/ISSUE_TEMPLATE/other.md +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/.github/ISSUE_TEMPLATE/question-issue-template.md +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/.github/dependabot.yml +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/.github/workflows/pypi.yml +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/LICENSE +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/apsbits.egg-info/dependency_links.txt +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/apsbits.egg-info/top_level.txt +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/docs/Makefile +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/docs/make.bat +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/docs/resources/create-repository-name.webp +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/docs/resources/create-repository-owner.webp +0 -0
- {apsbits-1.0.1/docs/source → apsbits-1.0.3/docs/resources}/demo.ipynb +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/docs/resources/use-this-template-button.webp +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/docs/source/_static/.gitkeep +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/setup.cfg +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/__init__.py +0 -0
- {apsbits-1.0.1/src/apsbits/utils → apsbits-1.0.3/src/apsbits/api}/create_new_instrument.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/core/__init__.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/core/best_effort_init.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_instrument/README.md +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_instrument/callbacks/__init__.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_instrument/callbacks/nexus_data_file_writer.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_instrument/callbacks/spec_data_file_writer.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_instrument/configs/__init__.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_instrument/configs/devices_aps_only.yml +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_instrument/devices/__init__.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_instrument/plans/__init__.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_instrument/plans/dm_plans.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_qserver/qs-config.yml +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_qserver/qs_host.sh +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/demo_qserver/user_group_permissions.yaml +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/tests/__init__.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/tests/test_config.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/tests/test_device_factories.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/tests/test_general.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/tests/test_stored_dict.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/utils/__init__.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/utils/aps_functions.py +0 -0
- {apsbits-1.0.1 → apsbits-1.0.3}/src/apsbits/utils/helper_functions.py +0 -0
|
@@ -104,7 +104,7 @@ jobs:
|
|
|
104
104
|
shell: bash -l {0}
|
|
105
105
|
run: |
|
|
106
106
|
set -vxeuo pipefail
|
|
107
|
-
pip install -e .
|
|
107
|
+
pip install -e .[dev]
|
|
108
108
|
|
|
109
109
|
- name: Run tests with pytest & coverage
|
|
110
110
|
shell: bash -l {0}
|
|
@@ -136,7 +136,7 @@ jobs:
|
|
|
136
136
|
shell: bash -l {0}
|
|
137
137
|
run: |
|
|
138
138
|
set -vxeuo pipefail
|
|
139
|
-
ipython -c "from apsbits.demo_instrument.startup import
|
|
139
|
+
ipython -c "from apsbits.demo_instrument.startup import *"
|
|
140
140
|
|
|
141
141
|
# https://coveralls-python.readthedocs.io/en/latest/usage/configuration.html#github-actions-support
|
|
142
142
|
coveralls:
|
|
@@ -15,14 +15,9 @@ repos:
|
|
|
15
15
|
- id: end-of-file-fixer
|
|
16
16
|
- id: trailing-whitespace
|
|
17
17
|
- id: check-case-conflict
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
- id: check-json
|
|
19
|
+
- id: check-symlinks
|
|
20
20
|
- id: check-executables-have-shebangs
|
|
21
|
-
# Don't strip output from jupyter notebooks ATM.
|
|
22
|
-
# - repo: https://github.com/kynan/nbstripout
|
|
23
|
-
# rev: 0.7.1
|
|
24
|
-
# hooks:
|
|
25
|
-
# - id: nbstripout
|
|
26
21
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
27
22
|
rev: v0.4.8
|
|
28
23
|
hooks:
|
|
@@ -30,3 +25,9 @@ repos:
|
|
|
30
25
|
args:
|
|
31
26
|
- --fix
|
|
32
27
|
- id: ruff-format # replaces Black
|
|
28
|
+
- repo: https://github.com/sphinx-contrib/sphinx-lint
|
|
29
|
+
rev: v1.0.0
|
|
30
|
+
hooks:
|
|
31
|
+
- id: sphinx-lint
|
|
32
|
+
args:
|
|
33
|
+
- docs
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
..
|
|
2
|
+
This file describes user-visible changes between the versions.
|
|
3
|
+
At this time, there is no automation to update this file.
|
|
4
|
+
Try to describe in human terms what is relevant for each release.
|
|
5
|
+
|
|
6
|
+
Revise this file before tagging a new release.
|
|
7
|
+
|
|
8
|
+
Subsections could include these headings (in this order), omit if no content.
|
|
9
|
+
|
|
10
|
+
Notice
|
|
11
|
+
Breaking Changes
|
|
12
|
+
New Features
|
|
13
|
+
Enhancements
|
|
14
|
+
Fixes
|
|
15
|
+
Maintenance
|
|
16
|
+
Deprecations
|
|
17
|
+
New Contributors
|
|
18
|
+
|
|
19
|
+
.. _release_notes:
|
|
20
|
+
|
|
21
|
+
========
|
|
22
|
+
Releases
|
|
23
|
+
========
|
|
24
|
+
|
|
25
|
+
Brief notes describing each release and what's new.
|
|
26
|
+
|
|
27
|
+
Project `milestones <https://github.com/prjemian/hklpy2/milestones>`_
|
|
28
|
+
describe future plans.
|
|
29
|
+
|
|
30
|
+
.. Coming release content can be gathered here.
|
|
31
|
+
Some people object to publishing unreleased changes.
|
|
32
|
+
|
|
33
|
+
1.0.2
|
|
34
|
+
#####
|
|
35
|
+
|
|
36
|
+
release expected 2025-Q2
|
|
37
|
+
|
|
38
|
+
1.0.1
|
|
39
|
+
#####
|
|
40
|
+
|
|
41
|
+
released 2025-03-24
|
|
42
|
+
|
|
43
|
+
Fixes
|
|
44
|
+
-----
|
|
45
|
+
|
|
46
|
+
* Calling RE(make_devices()) twice raises a lot of errors.
|
|
47
|
+
* startup sequence needs revision
|
|
48
|
+
* make_devices() needs a 'clear 'option
|
|
49
|
+
* make_devices() is noisy
|
|
50
|
+
* Why does make_devices() add all ophyd.sim simulator objects to ophyd registry?
|
|
51
|
+
* First argument to logger.LEVEL() should not be an f-string
|
|
52
|
+
* Adjust the order of steps when creating RE
|
|
53
|
+
* bp.scan (& others) missing in queueserver
|
|
54
|
+
* QS restart does not restart when QS was running
|
|
55
|
+
|
|
56
|
+
1.0.0
|
|
57
|
+
#####
|
|
58
|
+
|
|
59
|
+
released 2025-03-21
|
|
60
|
+
|
|
61
|
+
Initial public release.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apsbits
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
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>
|
|
@@ -42,6 +42,7 @@ Requires-Dist: isort; extra == "dev"
|
|
|
42
42
|
Requires-Dist: mypy; extra == "dev"
|
|
43
43
|
Requires-Dist: pre-commit; extra == "dev"
|
|
44
44
|
Requires-Dist: pytest; extra == "dev"
|
|
45
|
+
Requires-Dist: pytest-mock; extra == "dev"
|
|
45
46
|
Requires-Dist: ruff; extra == "dev"
|
|
46
47
|
Provides-Extra: doc
|
|
47
48
|
Requires-Dist: babel; extra == "doc"
|
|
@@ -56,6 +57,8 @@ Requires-Dist: pygments; extra == "doc"
|
|
|
56
57
|
Requires-Dist: sphinx-design; extra == "doc"
|
|
57
58
|
Requires-Dist: sphinx-tabs; extra == "doc"
|
|
58
59
|
Requires-Dist: sphinx; extra == "doc"
|
|
60
|
+
Requires-Dist: graphviz; extra == "doc"
|
|
61
|
+
Requires-Dist: dot; extra == "doc"
|
|
59
62
|
Provides-Extra: all
|
|
60
63
|
Requires-Dist: apsbits[dev,doc]; extra == "all"
|
|
61
64
|
Dynamic: license-file
|
|
@@ -76,16 +79,17 @@ queueserver.
|
|
|
76
79
|
Please create a bits instrument using our template repository: https://github.com/BCDA-APS/DEMO-BITS
|
|
77
80
|
|
|
78
81
|
|
|
79
|
-
## Installing the BITS Package
|
|
82
|
+
## Installing the BITS Package
|
|
80
83
|
|
|
81
84
|
```bash
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
conda
|
|
85
|
-
|
|
86
|
-
pip install -e ."[all]"
|
|
85
|
+
export INSTALL_ENVIRONMENT_NAME=apsbits_env
|
|
86
|
+
conda create -y -n "${INSTALL_ENVIRONMENT_NAME}" python=3.11 pyepics
|
|
87
|
+
conda activate "${INSTALL_ENVIRONMENT_NAME}"
|
|
88
|
+
pip install apsbits
|
|
87
89
|
```
|
|
88
90
|
|
|
91
|
+
For development please reference our documentation
|
|
92
|
+
|
|
89
93
|
## Testing the apsbits base installation
|
|
90
94
|
|
|
91
95
|
On an ipython console
|
|
@@ -97,48 +101,3 @@ RE(sim_print_plan())
|
|
|
97
101
|
RE(sim_count_plan())
|
|
98
102
|
RE(sim_rel_scan_plan())
|
|
99
103
|
```
|
|
100
|
-
|
|
101
|
-
## Testing
|
|
102
|
-
|
|
103
|
-
Use this command to run the test suite locally:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
pytest -vvv --lf ./src
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
## Documentation
|
|
110
|
-
|
|
111
|
-
<details>
|
|
112
|
-
<summary>prerequisite</summary>
|
|
113
|
-
|
|
114
|
-
To build the documentation locally, install [`pandoc`](https://pandoc.org/) in
|
|
115
|
-
your conda environment:
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
conda install conda-forge::pandoc
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
</details>
|
|
122
|
-
|
|
123
|
-
Use this command to build the documentation locally:
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
make -C docs clean html
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Once the documentation builds, view the HTML pages using your web browser:
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
BROWSER ./docs/build/html/index.html &
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Adding to the documentation source
|
|
136
|
-
|
|
137
|
-
The documentation source is located in files and directories under
|
|
138
|
-
`./docs/source`. Various examples are provided.
|
|
139
|
-
|
|
140
|
-
Documentation can be added in these formats:
|
|
141
|
-
[`.rst`](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html)
|
|
142
|
-
(reStructured text), [`.md`](https://en.wikipedia.org/wiki/Markdown) (markdown),
|
|
143
|
-
and [`.ipynb`](https://jupyter.org/) (Jupyter notebook). For more information,
|
|
144
|
-
see the [Sphinx](https://www.sphinx-doc.org/) documentation.
|
apsbits-1.0.3/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# APSBITS: Template Package for Bluesky Instruments
|
|
2
|
+
|
|
3
|
+
| PyPI | Coverage |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
[](https://pypi.python.org/pypi/apsbits) | [](https://coveralls.io/github/BCDA-APS/BITS?branch=main) |
|
|
6
|
+
|
|
7
|
+
BITS: **B**luesky **I**nstrument **T**emplate **S**tructure
|
|
8
|
+
|
|
9
|
+
Template of a Bluesky Data Acquisition Instrument in console, notebook, &
|
|
10
|
+
queueserver.
|
|
11
|
+
|
|
12
|
+
## Production use of BITS
|
|
13
|
+
|
|
14
|
+
Please create a bits instrument using our template repository: https://github.com/BCDA-APS/DEMO-BITS
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Installing the BITS Package
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
export INSTALL_ENVIRONMENT_NAME=apsbits_env
|
|
21
|
+
conda create -y -n "${INSTALL_ENVIRONMENT_NAME}" python=3.11 pyepics
|
|
22
|
+
conda activate "${INSTALL_ENVIRONMENT_NAME}"
|
|
23
|
+
pip install apsbits
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
For development please reference our documentation
|
|
27
|
+
|
|
28
|
+
## Testing the apsbits base installation
|
|
29
|
+
|
|
30
|
+
On an ipython console
|
|
31
|
+
|
|
32
|
+
```py
|
|
33
|
+
from apsbits.demo_instrument.startup import *
|
|
34
|
+
listobjects()
|
|
35
|
+
RE(sim_print_plan())
|
|
36
|
+
RE(sim_count_plan())
|
|
37
|
+
RE(sim_rel_scan_plan())
|
|
38
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apsbits
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
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>
|
|
@@ -42,6 +42,7 @@ Requires-Dist: isort; extra == "dev"
|
|
|
42
42
|
Requires-Dist: mypy; extra == "dev"
|
|
43
43
|
Requires-Dist: pre-commit; extra == "dev"
|
|
44
44
|
Requires-Dist: pytest; extra == "dev"
|
|
45
|
+
Requires-Dist: pytest-mock; extra == "dev"
|
|
45
46
|
Requires-Dist: ruff; extra == "dev"
|
|
46
47
|
Provides-Extra: doc
|
|
47
48
|
Requires-Dist: babel; extra == "doc"
|
|
@@ -56,6 +57,8 @@ Requires-Dist: pygments; extra == "doc"
|
|
|
56
57
|
Requires-Dist: sphinx-design; extra == "doc"
|
|
57
58
|
Requires-Dist: sphinx-tabs; extra == "doc"
|
|
58
59
|
Requires-Dist: sphinx; extra == "doc"
|
|
60
|
+
Requires-Dist: graphviz; extra == "doc"
|
|
61
|
+
Requires-Dist: dot; extra == "doc"
|
|
59
62
|
Provides-Extra: all
|
|
60
63
|
Requires-Dist: apsbits[dev,doc]; extra == "all"
|
|
61
64
|
Dynamic: license-file
|
|
@@ -76,16 +79,17 @@ queueserver.
|
|
|
76
79
|
Please create a bits instrument using our template repository: https://github.com/BCDA-APS/DEMO-BITS
|
|
77
80
|
|
|
78
81
|
|
|
79
|
-
## Installing the BITS Package
|
|
82
|
+
## Installing the BITS Package
|
|
80
83
|
|
|
81
84
|
```bash
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
conda
|
|
85
|
-
|
|
86
|
-
pip install -e ."[all]"
|
|
85
|
+
export INSTALL_ENVIRONMENT_NAME=apsbits_env
|
|
86
|
+
conda create -y -n "${INSTALL_ENVIRONMENT_NAME}" python=3.11 pyepics
|
|
87
|
+
conda activate "${INSTALL_ENVIRONMENT_NAME}"
|
|
88
|
+
pip install apsbits
|
|
87
89
|
```
|
|
88
90
|
|
|
91
|
+
For development please reference our documentation
|
|
92
|
+
|
|
89
93
|
## Testing the apsbits base installation
|
|
90
94
|
|
|
91
95
|
On an ipython console
|
|
@@ -97,48 +101,3 @@ RE(sim_print_plan())
|
|
|
97
101
|
RE(sim_count_plan())
|
|
98
102
|
RE(sim_rel_scan_plan())
|
|
99
103
|
```
|
|
100
|
-
|
|
101
|
-
## Testing
|
|
102
|
-
|
|
103
|
-
Use this command to run the test suite locally:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
pytest -vvv --lf ./src
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
## Documentation
|
|
110
|
-
|
|
111
|
-
<details>
|
|
112
|
-
<summary>prerequisite</summary>
|
|
113
|
-
|
|
114
|
-
To build the documentation locally, install [`pandoc`](https://pandoc.org/) in
|
|
115
|
-
your conda environment:
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
conda install conda-forge::pandoc
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
</details>
|
|
122
|
-
|
|
123
|
-
Use this command to build the documentation locally:
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
make -C docs clean html
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Once the documentation builds, view the HTML pages using your web browser:
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
BROWSER ./docs/build/html/index.html &
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Adding to the documentation source
|
|
136
|
-
|
|
137
|
-
The documentation source is located in files and directories under
|
|
138
|
-
`./docs/source`. Various examples are provided.
|
|
139
|
-
|
|
140
|
-
Documentation can be added in these formats:
|
|
141
|
-
[`.rst`](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html)
|
|
142
|
-
(reStructured text), [`.md`](https://en.wikipedia.org/wiki/Markdown) (markdown),
|
|
143
|
-
and [`.ipynb`](https://jupyter.org/) (Jupyter notebook). For more information,
|
|
144
|
-
see the [Sphinx](https://www.sphinx-doc.org/) documentation.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.gitignore
|
|
2
2
|
.pre-commit-config.yaml
|
|
3
|
+
HISTORY.rst
|
|
3
4
|
LICENSE
|
|
4
5
|
README.md
|
|
5
6
|
pyproject.toml
|
|
@@ -21,38 +22,69 @@ apsbits.egg-info/requires.txt
|
|
|
21
22
|
apsbits.egg-info/top_level.txt
|
|
22
23
|
docs/Makefile
|
|
23
24
|
docs/make.bat
|
|
24
|
-
docs/template_creation.md
|
|
25
25
|
docs/resources/create-repository-name.webp
|
|
26
26
|
docs/resources/create-repository-owner.webp
|
|
27
|
+
docs/resources/demo.ipynb
|
|
27
28
|
docs/resources/use-this-template-button.webp
|
|
29
|
+
docs/source/bits_overview.rst
|
|
28
30
|
docs/source/conf.py
|
|
29
|
-
docs/source/
|
|
30
|
-
docs/source/demo.ipynb
|
|
31
|
+
docs/source/history.rst
|
|
31
32
|
docs/source/index.rst
|
|
32
33
|
docs/source/install.rst
|
|
33
34
|
docs/source/license.rst
|
|
34
|
-
docs/source/logging_config.rst
|
|
35
|
-
docs/source/notebook.rst
|
|
36
|
-
docs/source/qserver.rst
|
|
37
|
-
docs/source/script.rst
|
|
38
|
-
docs/source/sessions.rst
|
|
39
35
|
docs/source/_static/.gitkeep
|
|
40
|
-
docs/source/api/
|
|
41
|
-
docs/source/api/configs.rst
|
|
36
|
+
docs/source/api/api.rst
|
|
42
37
|
docs/source/api/core.rst
|
|
43
|
-
docs/source/api/
|
|
38
|
+
docs/source/api/demo_instrument.rst
|
|
39
|
+
docs/source/api/demo_qserver.rst
|
|
44
40
|
docs/source/api/index.rst
|
|
45
|
-
docs/source/api/plans.rst
|
|
46
|
-
docs/source/api/startup.rst
|
|
47
41
|
docs/source/api/utils.rst
|
|
42
|
+
docs/source/api/generated/apsbits.core.best_effort_init.rst
|
|
43
|
+
docs/source/api/generated/apsbits.core.catalog_init.rst
|
|
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
|
|
46
|
+
docs/source/api/generated/apsbits.demo_instrument.callbacks.rst
|
|
47
|
+
docs/source/api/generated/apsbits.demo_instrument.callbacks.spec_data_file_writer.rst
|
|
48
|
+
docs/source/api/generated/apsbits.demo_instrument.configs.rst
|
|
49
|
+
docs/source/api/generated/apsbits.demo_instrument.devices.rst
|
|
50
|
+
docs/source/api/generated/apsbits.demo_instrument.plans.dm_plans.rst
|
|
51
|
+
docs/source/api/generated/apsbits.demo_instrument.plans.rst
|
|
52
|
+
docs/source/api/generated/apsbits.demo_instrument.plans.sim_plans.rst
|
|
53
|
+
docs/source/api/generated/apsbits.demo_instrument.rst
|
|
54
|
+
docs/source/api/generated/apsbits.demo_instrument.startup.rst
|
|
55
|
+
docs/source/api/generated/apsbits.demo_qserver.rst
|
|
56
|
+
docs/source/api/generated/apsbits.utils.aps_functions.rst
|
|
57
|
+
docs/source/api/generated/apsbits.utils.config_loaders.rst
|
|
58
|
+
docs/source/api/generated/apsbits.utils.controls_setup.rst
|
|
59
|
+
docs/source/api/generated/apsbits.utils.helper_functions.rst
|
|
60
|
+
docs/source/api/generated/apsbits.utils.logging_setup.rst
|
|
61
|
+
docs/source/api/generated/apsbits.utils.metadata.rst
|
|
62
|
+
docs/source/api/generated/apsbits.utils.stored_dict.rst
|
|
63
|
+
docs/source/deprecated/console.rst
|
|
64
|
+
docs/source/deprecated/logging_config.rst
|
|
65
|
+
docs/source/deprecated/notebook.rst
|
|
66
|
+
docs/source/deprecated/script.rst
|
|
67
|
+
docs/source/guides/creating_devices.rst
|
|
68
|
+
docs/source/guides/creating_instrument.rst
|
|
69
|
+
docs/source/guides/developing_bits.rst
|
|
48
70
|
docs/source/guides/dm.md
|
|
49
71
|
docs/source/guides/index.rst
|
|
50
|
-
docs/source/guides/
|
|
72
|
+
docs/source/guides/qserver.rst
|
|
73
|
+
docs/source/guides/qserver_service.rst
|
|
74
|
+
docs/source/guides/sessions.rst
|
|
75
|
+
docs/source/guides/setting_iconfig.rst
|
|
76
|
+
docs/source/guides/template_creation.rst
|
|
51
77
|
src/apsbits/__init__.py
|
|
52
78
|
src/apsbits/_version.py
|
|
79
|
+
src/apsbits/api/__init__.py
|
|
80
|
+
src/apsbits/api/create_new_instrument.py
|
|
81
|
+
src/apsbits/api/delete_instrument.py
|
|
82
|
+
src/apsbits/api/run_instrument.py
|
|
83
|
+
src/apsbits/configs/logging.yml
|
|
53
84
|
src/apsbits/core/__init__.py
|
|
54
85
|
src/apsbits/core/best_effort_init.py
|
|
55
86
|
src/apsbits/core/catalog_init.py
|
|
87
|
+
src/apsbits/core/instrument_init.py
|
|
56
88
|
src/apsbits/core/run_engine_init.py
|
|
57
89
|
src/apsbits/demo_instrument/README.md
|
|
58
90
|
src/apsbits/demo_instrument/__init__.py
|
|
@@ -64,28 +96,30 @@ src/apsbits/demo_instrument/configs/__init__.py
|
|
|
64
96
|
src/apsbits/demo_instrument/configs/devices.yml
|
|
65
97
|
src/apsbits/demo_instrument/configs/devices_aps_only.yml
|
|
66
98
|
src/apsbits/demo_instrument/configs/iconfig.yml
|
|
67
|
-
src/apsbits/demo_instrument/configs/logging.yml
|
|
68
99
|
src/apsbits/demo_instrument/devices/__init__.py
|
|
69
100
|
src/apsbits/demo_instrument/plans/__init__.py
|
|
70
101
|
src/apsbits/demo_instrument/plans/dm_plans.py
|
|
71
102
|
src/apsbits/demo_instrument/plans/sim_plans.py
|
|
103
|
+
src/apsbits/demo_instrument/suspenders/__init__.py
|
|
104
|
+
src/apsbits/demo_instrument/utils/__init__.py
|
|
72
105
|
src/apsbits/demo_qserver/qs-config.yml
|
|
73
106
|
src/apsbits/demo_qserver/qs_host.sh
|
|
74
107
|
src/apsbits/demo_qserver/user_group_permissions.yaml
|
|
75
108
|
src/apsbits/tests/__init__.py
|
|
76
109
|
src/apsbits/tests/conftest.py
|
|
77
110
|
src/apsbits/tests/test_config.py
|
|
111
|
+
src/apsbits/tests/test_delete_instrument.py
|
|
78
112
|
src/apsbits/tests/test_device_factories.py
|
|
79
113
|
src/apsbits/tests/test_general.py
|
|
114
|
+
src/apsbits/tests/test_make_devices.py
|
|
115
|
+
src/apsbits/tests/test_run_instrument.py
|
|
80
116
|
src/apsbits/tests/test_stored_dict.py
|
|
81
117
|
src/apsbits/utils/__init__.py
|
|
82
118
|
src/apsbits/utils/aps_functions.py
|
|
83
119
|
src/apsbits/utils/config_loaders.py
|
|
84
120
|
src/apsbits/utils/controls_setup.py
|
|
85
|
-
src/apsbits/utils/create_new_instrument.py
|
|
86
121
|
src/apsbits/utils/helper_functions.py
|
|
87
122
|
src/apsbits/utils/logging_setup.py
|
|
88
|
-
src/apsbits/utils/make_devices.py
|
|
89
123
|
src/apsbits/utils/metadata.py
|
|
90
124
|
src/apsbits/utils/sim_creator.py
|
|
91
125
|
src/apsbits/utils/stored_dict.py
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.. _api.api:
|
|
2
|
+
|
|
3
|
+
API
|
|
4
|
+
===
|
|
5
|
+
|
|
6
|
+
The API module provides command-line interfaces for instrument management:
|
|
7
|
+
|
|
8
|
+
.. autosummary::
|
|
9
|
+
:toctree: generated
|
|
10
|
+
:recursive:
|
|
11
|
+
|
|
12
|
+
apsbits.api.create_new_instrument
|
|
13
|
+
apsbits.api.delete_instrument
|
|
14
|
+
apsbits.api.run_instrument
|
|
15
|
+
|
|
16
|
+
These command-line tools help with:
|
|
17
|
+
|
|
18
|
+
1. Creating new instruments from templates
|
|
19
|
+
2. Deleting instruments and their associated qserver configurations
|
|
20
|
+
3. Running instruments and retrieving their ophyd registry information
|
|
21
|
+
|
|
22
|
+
Example Usage
|
|
23
|
+
-------------
|
|
24
|
+
|
|
25
|
+
Create a new instrument:
|
|
26
|
+
|
|
27
|
+
.. code-block:: bash
|
|
28
|
+
|
|
29
|
+
create-bits --name my_instrument --path /path/to/instrument
|
|
30
|
+
|
|
31
|
+
Delete an instrument:
|
|
32
|
+
|
|
33
|
+
.. code-block:: bash
|
|
34
|
+
|
|
35
|
+
delete-bits --name my_instrument --path /path/to/instrument
|
|
36
|
+
|
|
37
|
+
Run an instrument:
|
|
38
|
+
|
|
39
|
+
.. code-block:: bash
|
|
40
|
+
|
|
41
|
+
run-bits --name my_instrument --path /path/to/instrument
|
|
42
|
+
|
|
43
|
+
API Reference
|
|
44
|
+
-------------
|
|
45
|
+
|
|
46
|
+
.. automodule:: apsbits.api
|
|
47
|
+
:members:
|
|
48
|
+
:undoc-members:
|
|
49
|
+
:show-inheritance:
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.. _api.core:
|
|
2
|
+
|
|
3
|
+
Core Components
|
|
4
|
+
===============
|
|
5
|
+
|
|
6
|
+
The core module provides fundamental components for building a Bluesky data acquisition system.
|
|
7
|
+
|
|
8
|
+
.. currentmodule:: apsbits.core
|
|
9
|
+
|
|
10
|
+
.. autosummary::
|
|
11
|
+
:toctree: generated
|
|
12
|
+
:recursive:
|
|
13
|
+
|
|
14
|
+
best_effort_init
|
|
15
|
+
catalog_init
|
|
16
|
+
run_engine_init
|
|
17
|
+
|
|
18
|
+
These components are used to:
|
|
19
|
+
|
|
20
|
+
1. Initialize the Run Engine
|
|
21
|
+
2. Set up data catalogs
|
|
22
|
+
3. Configure best-effort callbacks
|
|
23
|
+
4. Establish baseline configurations
|
|
24
|
+
|
|
25
|
+
Example Usage
|
|
26
|
+
-------------
|
|
27
|
+
|
|
28
|
+
Here's how to initialize the Run Engine, set up data catalogs, and configure best-effort callbacks:
|
|
29
|
+
|
|
30
|
+
.. code-block:: python
|
|
31
|
+
|
|
32
|
+
from apsbits.core import run_engine_init, catalog_init, best_effort_init
|
|
33
|
+
|
|
34
|
+
# Initialize the Run Engine
|
|
35
|
+
RE = run_engine_init()
|
|
36
|
+
|
|
37
|
+
# Set up data catalogs
|
|
38
|
+
cat = catalog_init()
|
|
39
|
+
|
|
40
|
+
# Configure best-effort callbacks
|
|
41
|
+
bec = best_effort_init(RE)
|
|
42
|
+
|
|
43
|
+
API Reference
|
|
44
|
+
-------------
|
|
45
|
+
|
|
46
|
+
.. automodule:: apsbits.core
|
|
47
|
+
:members:
|
|
48
|
+
:undoc-members:
|
|
49
|
+
:show-inheritance:
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.. _api.demo_instrument:
|
|
2
|
+
|
|
3
|
+
Demo Instrument
|
|
4
|
+
===============
|
|
5
|
+
|
|
6
|
+
.. currentmodule:: apsbits.demo_instrument
|
|
7
|
+
|
|
8
|
+
.. autosummary::
|
|
9
|
+
:toctree: generated
|
|
10
|
+
:recursive:
|
|
11
|
+
|
|
12
|
+
startup
|
|
13
|
+
callbacks
|
|
14
|
+
devices
|
|
15
|
+
plans
|
|
16
|
+
|
|
17
|
+
Example Usage
|
|
18
|
+
-------------
|
|
19
|
+
|
|
20
|
+
.. code-block:: py
|
|
21
|
+
|
|
22
|
+
from apsbits.demo_instrument.startup import *
|
|
23
|
+
|
|
24
|
+
Components
|
|
25
|
+
----------
|
|
26
|
+
|
|
27
|
+
The demo instrument is organized into several components:
|
|
28
|
+
|
|
29
|
+
callbacks
|
|
30
|
+
~~~~~~~~~
|
|
31
|
+
|
|
32
|
+
.. autosummary::
|
|
33
|
+
:toctree: generated
|
|
34
|
+
:recursive:
|
|
35
|
+
|
|
36
|
+
callbacks.nexus_data_file_writer
|
|
37
|
+
callbacks.spec_data_file_writer
|
|
38
|
+
|
|
39
|
+
devices
|
|
40
|
+
~~~~~~~
|
|
41
|
+
|
|
42
|
+
.. autosummary::
|
|
43
|
+
:toctree: generated
|
|
44
|
+
:recursive:
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
plans
|
|
48
|
+
~~~~~
|
|
49
|
+
|
|
50
|
+
.. autosummary::
|
|
51
|
+
:toctree: generated
|
|
52
|
+
:recursive:
|
|
53
|
+
|
|
54
|
+
plans.dm_plans
|
|
55
|
+
plans.sim_plans
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.. _api.demo_qserver:
|
|
2
|
+
|
|
3
|
+
Demo Queue Server
|
|
4
|
+
=================
|
|
5
|
+
|
|
6
|
+
.. currentmodule:: apsbits.demo_qserver
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Starting the Server
|
|
11
|
+
===================
|
|
12
|
+
|
|
13
|
+
.. code-block:: bash
|
|
14
|
+
|
|
15
|
+
./qs_host.sh
|
|
16
|
+
|
|
17
|
+
Configuration
|
|
18
|
+
-------------
|
|
19
|
+
|
|
20
|
+
.. code-block:: yaml
|
|
21
|
+
|
|
22
|
+
# qs-config.yml
|
|
23
|
+
host: localhost
|
|
24
|
+
port: 8080
|
|
25
|
+
name: demo_qserver
|
|
26
|
+
log_level: INFO
|
|
27
|
+
|
|
28
|
+
The demo queue server provides an example implementation of a Bluesky Queue Server using APSBITS.
|
|
29
|
+
|
|
30
|
+
For more details on using the Queue Server, see :doc:`../guides/qserver_service`.
|