Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No dls bluesky #645

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

Lightweight bluesky-as-a-service wrapper application. Also usable as a library.

Source | <https://github.com/DiamondLightSource/blueapi>
:---: | :---:
PyPI | `pip install blueapi`
Docker | `docker run ghcr.io/diamondlightsource/blueapi:latest`
Documentation | <https://diamondlightsource.github.io/blueapi>
Releases | <https://github.com/DiamondLightSource/blueapi/releases>
| Source | <https://github.com/DiamondLightSource/blueapi> |
| :-----------: | :------------------------------------------------------: |
| PyPI | `pip install blueapi` |
| Docker | `docker run ghcr.io/diamondlightsource/blueapi:latest` |
| Documentation | <https://diamondlightsource.github.io/blueapi> |
| Releases | <https://github.com/DiamondLightSource/blueapi/releases> |

This module wraps [bluesky](https://blueskyproject.io/bluesky) plans and devices
inside a server and exposes endpoints to send commands/receive data. Useful for
Expand All @@ -30,7 +30,7 @@ type-annotated plans. For example, take the following plan:

```python
import bluesky.plans as bp
from blueapi.core import MsgGenerator
from bluesky.utils import MsgGenerator

def my_plan(foo: str, bar: int) -> MsgGenerator:
yield from bp.scan(...)
Expand Down
120 changes: 54 additions & 66 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
accessible-pygments==0.0.5
aioca==1.7
aiofiles==24.1.0
aiohappyeyeballs==2.4.0
aiohttp==3.10.5
aiohappyeyeballs==2.4.3
aiohttp==3.10.9
aiosignal==1.3.1
alabaster==1.0.0
annotated-types==0.7.0
anyio==4.4.0
anyio==4.6.0
appdirs==1.4.4
asciitree==0.3.3
asttokens==2.4.1
async-timeout==4.0.3
attrs==24.2.0
babel==2.16.0
beautifulsoup4==4.12.3
bidict==0.23.1
bluesky==1.13.0a4
bluesky==1.13
bluesky-kafka==0.10.0
bluesky-live==0.0.8
bluesky-stomp==0.1.2
boltons==24.0.0
bump-pydantic==0.8.0
cachetools==5.5.0
caproto==1.1.1
certifi==2024.8.30
cfgv==3.4.0
charset-normalizer==3.3.2
charset-normalizer==3.4.0
click==8.1.7
cloudpickle==3.0.0
colorama==0.4.6
Expand All @@ -35,73 +33,68 @@ compress-pickle==2.1.0
confluent-kafka==2.5.3
contourpy==1.3.0
copier==9.3.1
coverage==7.6.1
coverage==7.6.2
cycler==0.12.1
dask==2024.9.0
dask==2024.9.1
databroker==1.2.5
dataclasses-json==0.6.7
decorator==5.1.1
deepdiff==8.0.1
deepmerge==2.0
distlib==0.3.8
Deprecated==1.2.14
distlib==0.3.9
dls-bluesky-core==0.0.4
dls-dodal==1.31.1
dnspython==2.6.1
dls-dodal==1.33.0
dnspython==2.7.0
docopt==0.6.2
doct==1.1.0
docutils==0.21.2
dunamai==1.22.0
email_validator==2.2.0
entrypoints==0.4
epicscorelibs==7.0.7.99.0.2
epicscorelibs==7.0.7.99.1.1
event-model==1.21.0
exceptiongroup==1.2.2
executing==2.1.0
fastapi==0.114.2
fastapi-cli==0.0.5
fastapi==0.115.0
fasteners==0.19
filelock==3.16.0
filelock==3.16.1
flexcache==0.3
flexparser==0.3.1
fonttools==4.53.1
fonttools==4.54.1
frozenlist==1.4.1
fsspec==2024.9.0
funcy==2.0
gitdb==4.0.11
GitPython==3.1.43
graypy==2.1.0
h11==0.14.0
h5py==3.11.0
h5py==3.12.1
HeapDict==1.0.1
historydict==1.2.6
httpcore==1.0.5
httptools==0.6.1
httpcore==1.0.6
httpx==0.27.2
humanize==4.10.0
humanize==4.11.0
identify==2.6.1
idna==3.10
imageio==2.35.1
imagesize==1.4.1
importlib_metadata==8.5.0
importlib_metadata==8.4.0
importlib_resources==6.4.5
iniconfig==2.0.0
intake==0.6.4
ipython==8.18.0
ipywidgets==8.1.5
itsdangerous==2.2.0
jedi==0.19.1
Jinja2==3.1.4
jinja2-ansible-filters==1.3.2
jsonschema==4.23.0
jsonschema-specifications==2023.12.1
jsonschema-specifications==2024.10.1
jupyterlab_widgets==3.0.13
kiwisolver==1.4.7
ldap3==2.9.1
libcst==1.4.0
livereload==2.7.0
locket==1.0.0
lz4==4.3.3
markdown-it-py==3.0.0
MarkupSafe==2.1.5
MarkupSafe==3.0.1
marshmallow==3.22.0
matplotlib==3.9.2
matplotlib-inline==0.1.7
Expand All @@ -119,16 +112,18 @@ myst-parser==4.0.0
networkx==3.3
nodeenv==1.9.1
nose2==0.15.1
nslsii==0.10.3
numcodecs==0.13.0
nslsii==0.10.5
numcodecs==0.13.1
numpy==1.26.4
opencv-python-headless==4.10.0.84
opentelemetry-api==1.27.0
ophyd==1.9.0
ophyd-async==0.5.2
ophyd-async==0.6.0
orderly-set==5.2.2
orjson==3.10.7
p4p==4.1.12
p4p==4.2.0
packaging==24.1
pandas==2.2.2
pandas==2.2.3
parso==0.8.4
partd==1.4.2
pathlib2==2.3.7.post1
Expand All @@ -139,64 +134,61 @@ pika==1.3.2
pillow==10.4.0
PIMS==0.7
Pint==0.24.3
pipdeptree==2.23.3
platformdirs==4.3.3
pipdeptree==2.23.4
platformdirs==4.3.6
pluggy==1.5.0
plumbum==1.8.3
plumbum==1.9.0
ply==3.11
pre-commit==3.8.0
pre_commit==4.0.1
prettytable==3.11.0
prompt-toolkit==3.0.36
propcache==0.2.0
psutil==6.0.0
ptyprocess==0.7.0
pure_eval==0.2.3
pvxslibs==1.3.1
pvxslibs==1.3.2
py==1.11.0
pyasn1==0.6.1
pycryptodome==3.20.0
pydantic==2.9.1
pydantic-extra-types==2.9.0
pycryptodome==3.21.0
pydantic==2.9.2
pydantic-settings==2.5.2
pydantic_core==2.23.3
pydantic_core==2.23.4
pydantic_numpy==5.0.2
pydata-sphinx-theme==0.15.4
pyepics==3.5.7
Pygments==2.18.0
pymongo==4.8.0
pymongo==4.10.1
pyOlog==4.5.0
pyparsing==3.1.4
pytest==8.3.3
pytest-asyncio==0.24.0
pytest-cov==5.0.0
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-multipart==0.0.9
pytz==2024.2
PyYAML==6.0.2
pyyaml-include==2.1
questionary==2.0.1
redis==5.0.8
redis-json-dict==0.2.0
redis==5.1.1
redis-json-dict==0.2.1
referencing==0.35.1
requests==2.32.3
responses==0.25.3
rich==13.7.1
rpds-py==0.20.0
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8
ruff==0.6.5
ruff==0.6.9
scanspec==0.7.2
semver==3.0.2
setuptools==75.1.0
setuptools-dso==2.11
shellingham==1.5.4
six==1.16.0
slicerator==1.1.0
smmap==5.0.1
sniffio==1.3.1
snowballstemmer==2.2.0
soupsieve==2.6
Sphinx==8.0.2
sphinx-autobuild==2024.9.3
sphinx-autobuild==2024.10.3
sphinx-click==6.0.0
sphinx-copybutton==0.5.2
sphinx_design==0.6.1
Expand All @@ -210,43 +202,39 @@ sphinxcontrib-openapi==0.8.4
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
stack-data==0.6.3
starlette==0.38.5
starlette==0.38.6
stomp-py==8.1.2
suitcase-mongo==0.6.0
suitcase-msgpack==0.3.0
suitcase-utils==0.5.4
super-state-machine==2.0.2
tifffile==2024.8.30
tomli==2.0.1
toolz==0.12.1
tornado==6.4.1
tifffile==2024.9.20
toolz==1.0.0
tox==3.28.0
tox-direct==0.4
tqdm==4.66.5
traitlets==5.14.3
typer==0.12.4
types-mock==5.1.0.20240425
types-PyYAML==6.0.12.20240917
types-requests==2.32.0.20240914
types-urllib3==1.26.25.14
typing-inspect==0.9.0
typing_extensions==4.12.2
tzdata==2024.1
tzdata==2024.2
tzlocal==5.2
ujson==5.10.0
urllib3==2.2.3
uvicorn==0.30.6
uvloop==0.19.0
virtualenv==20.26.4
uvicorn==0.31.1
virtualenv==20.26.6
watchfiles==0.24.0
wcwidth==0.2.13
websocket-client==1.8.0
websockets==13.0.1
websockets==13.1
widgetsnbextension==4.0.13
workflows==2.27
wrapt==1.16.0
xarray==2024.9.0
yarl==1.11.1
yarl==1.14.0
zarr==2.18.3
zict==2.2.0
zipp==3.20.2
zocalo==1.1.0
zocalo==1.1.1
4 changes: 2 additions & 2 deletions docs/explanations/lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ of being written, loaded and run. Take the following plan.
from typing import Any, List, Mapping, Optional, Union

import bluesky.plans as bp
from blueapi.core import MsgGenerator
from dls_bluesky_core.core import inject
from bluesky.utils import MsgGenerator
from dodal.common import inject
from bluesky.protocols import Readable


Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/add-plans-and-devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Plans in Python files look like this:
> **_NOTE:_** The type annotations (e.g. `: str`, `: int`, `-> MsgGenerator`) are required as blueapi uses them to generate an API! You can define as many plans as you like in a single Python file or spread them over multiple files.
```
from bluesky.protocols import Readable, Movable
from blueapi.core import MsgGenerator
from bluesky.utils import MsgGenerator
from typing import Mapping, Any

def my_plan(
Expand Down
8 changes: 2 additions & 6 deletions helm/blueapi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,9 @@ worker:
env:
sources:
- kind: deviceFunctions
module: blueapi.startup.example_devices
module: blueapi.startup
- kind: planFunctions
module: blueapi.startup.example_plans
- kind: planFunctions
module: dls_bluesky_core.plans
- kind: planFunctions
module: dls_bluesky_core.stubs
module: blueapi.startup
stomp:
auth:
username: guest
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ dependencies = [
"fastapi>=0.112.0",
"uvicorn",
"requests",
"dls-bluesky-core", #requires ophyd-async
"dls-dodal>=1.31.0",
"super-state-machine", # See GH issue 553
"GitPython",
Expand Down Expand Up @@ -144,5 +143,5 @@ extend-immutable-calls = [
"fastapi.Depends",
"fastapi.Body",
"fastapi.Task",
"dls_bluesky_core.core.inject",
"dodal.common.inject",
]
8 changes: 2 additions & 6 deletions src/blueapi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,8 @@ class EnvironmentConfig(BlueapiBaseModel):
"""

sources: list[Source] = [
Source(
kind=SourceKind.DEVICE_FUNCTIONS, module="blueapi.startup.example_devices"
),
Source(kind=SourceKind.PLAN_FUNCTIONS, module="blueapi.startup.example_plans"),
Source(kind=SourceKind.PLAN_FUNCTIONS, module="dls_bluesky_core.plans"),
Source(kind=SourceKind.PLAN_FUNCTIONS, module="dls_bluesky_core.stubs"),
Source(kind=SourceKind.DEVICE_FUNCTIONS, module="blueapi.startup"),
Source(kind=SourceKind.PLAN_FUNCTIONS, module="blueapi.startup"),
]
events: WorkerEventConfig = Field(default_factory=WorkerEventConfig)

Expand Down
4 changes: 0 additions & 4 deletions src/blueapi/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
BLUESKY_PROTOCOLS,
DataEvent,
Device,
MsgGenerator,
Plan,
PlanGenerator,
WatchableStatus,
is_bluesky_compatible_device,
is_bluesky_compatible_device_type,
Expand All @@ -16,8 +14,6 @@

__all__ = [
"Plan",
"PlanGenerator",
"MsgGenerator",
"Device",
"BLUESKY_PROTOCOLS",
"BlueskyContext",
Expand Down
Loading
Loading