Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b6ab385
try updated startup
ddkohler Apr 18, 2026
d99b260
Update test-docker-compose.yml
ddkohler Apr 18, 2026
0b60f19
Update requirements.txt
ddkohler Apr 18, 2026
37d4957
Update dependabot.yml
ddkohler Apr 18, 2026
11006b5
Update test-docker-compose.yml
ddkohler Apr 18, 2026
173cddd
hwproxy versions
ddkohler Apr 18, 2026
4416ba4
re: use latest numpy
ddkohler Apr 18, 2026
37c7af7
try to fix numpy issue
ddkohler Apr 18, 2026
94b66c5
Update test-docker-compose.yml
ddkohler Apr 18, 2026
e7e5635
Update test-docker-compose.yml
ddkohler Apr 18, 2026
d758525
check workspace var
ddkohler Apr 19, 2026
2f46048
don't hardcode absolute paths
ddkohler Apr 19, 2026
355242c
some cleanup
ddkohler Apr 22, 2026
76aad36
mwe attempt
ddkohler Apr 23, 2026
d0d248c
Update test-np-import.yml
ddkohler Apr 23, 2026
5cafd6e
Update test-np-import.yml
ddkohler Apr 23, 2026
5b1eb0c
Update test-np-import.yml
ddkohler Apr 23, 2026
2518f02
Update test-np-import.yml
ddkohler Apr 23, 2026
e1d9ee7
rename dockerfile
ddkohler Apr 23, 2026
0352fd1
Update test-np-import.yml
ddkohler Apr 23, 2026
03209e6
Update test-np-import.yml
ddkohler Apr 23, 2026
42c3076
Create user_group_permissions.yaml
ddkohler Apr 23, 2026
3b368c9
remove happi
ddkohler Apr 23, 2026
30650c8
startup needed?
ddkohler Apr 23, 2026
705a013
reinsert some startup code
ddkohler Apr 23, 2026
e73554a
remove wright_plans
ddkohler Apr 23, 2026
3f5088e
Update startup.py
ddkohler Apr 23, 2026
f6efc4a
Update startup.py
ddkohler Apr 23, 2026
d3e5924
Update startup.py
ddkohler Apr 23, 2026
6e86feb
simplify requirements
ddkohler Apr 23, 2026
d3d0df5
Update Dockerfile
ddkohler Apr 23, 2026
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
5 changes: 0 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,5 @@ updates:
- package-ecosystem: "pip"
directories:
- "**/*"
ignore:
- dependency-name: "bluesky"
versions: [ ">1.10.0" ]
- dependency-name: "bluesky-queueserver"
versions: [ ">0.0.20" ]
schedule:
interval: "weekly"
8 changes: 5 additions & 3 deletions .github/workflows/test-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,26 @@ jobs:
steps:
-
name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
-
name: Set up Docker Compose
uses: docker/setup-compose-action@v2
-
name: Set up environment
run: |
cp -r ./tests/test.env .env
echo "HAPPI_DB_PATH= $GITHUB_WORKSPACE/tests/happi_db.json" >> .env
echo "WT5_DATA_PATH= $GITHUB_WORKSPACE/bluesky-cmds-data" >> .env
mkdir bluesky-cmds-data
ls
-
name: Designate file permissions
run: chmod +x ./re-manager/start_re.sh
-
name: Build and start Docker images
run: |
docker compose up -d
sleep 30
sleep 5
docker compose ps --all
-
name: Stop Docker images
if: always()
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/test-np-import.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: numpy-import-test

on:
push:

jobs:
compose:
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@v5
-
name: Set up environment
run: |
cp -r ./tests/numpy-test/* ./
cp -r ./tests/test.env .env
echo "HAPPI_DB_PATH= $GITHUB_WORKSPACE/tests/happi_db.json" >> .env
-
name: Build image
run: |
ls
docker build -t test .
-
name: Run container
run: docker run test
2 changes: 1 addition & 1 deletion hwproxy/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
attune==0.5.1
bluesky==1.10.0 # ignore
bluesky==1.15.0 # ignore
bluesky-hwproxy==2022.8.0
bluesky-queueserver==0.0.24
happi==3.0.1
Expand Down
8 changes: 8 additions & 0 deletions hwproxy/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@
run_holistic,
)

from bluesky import RunEngine
from bluesky.plans import count
from bluesky.plan_stubs import mv, sleep
from bluesky.preprocessors import baseline_decorator
from bluesky.protocols import Movable
from bluesky.callbacks.zmq import Publisher

happi_client = happi.Client(database=happi.backends.backend("/happi_db.json"))

Expand All @@ -37,6 +40,11 @@
except socket.gaierror:
host = "172.17.0.1" # Default host ip on Linux

# 0MQ
zmq = Publisher(f"{host}:5567")
RE = RunEngine({})
RE.subscribe(zmq)

for device in happi_client.all_items:
# Skip devices marked inactive in happi
if not device.active:
Expand Down
7 changes: 0 additions & 7 deletions re-manager/databroker-config.yml

This file was deleted.

3 changes: 1 addition & 2 deletions re-manager/dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bookworm
FROM debian:trixie

# python
RUN apt update
Expand All @@ -7,7 +7,6 @@ RUN apt install librdkafka-dev -y
RUN apt install python3-pip -y
RUN apt install python3-venv -y

COPY ./databroker-config.yml /usr/local/share/intake/catalog.yml
COPY ./happi.ini /happi.ini
COPY ./startup.py ./startup.py
COPY ./start_re.sh ./start_re.sh
Expand Down
6 changes: 3 additions & 3 deletions re-manager/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
attune==0.5.1
bluesky==1.10.0 # ignore
bluesky-queueserver==0.0.20 # ignore
bluesky==1.15.0 # ignore
bluesky-queueserver==0.0.22 # ignore
happi==3.0.1
numpy < 2.4 # ignore
numpy<2.4 # ignore
pint==0.25.3
wright-plans==2022.7.0
yaqc-bluesky==2023.8.0
2 changes: 1 addition & 1 deletion re-manager/start_re.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh

qserver-list-plans-devices --startup-script startup.py
start-re-manager --startup-script=./startup.py --existing-plans-devices=./existing_plans_and_devices.yaml --user-group-permissions=./user_group_permissions.yaml --zmq-data-proxy-addr zmq-proxy:5567 --redis-addr redis:6379 --zmq-publish-console ON
start-re-manager --startup-script=./startup.py --existing-plans-devices=./existing_plans_and_devices.yaml --user-group-permissions=./user_group_permissions.yaml --redis-addr redis:6379 --zmq-publish-console ON
7 changes: 7 additions & 0 deletions re-manager/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
run_holistic,
)

from bluesky import RunEngine
from bluesky.plans import count
from bluesky.plan_stubs import mv, sleep
from bluesky.preprocessors import baseline_decorator
from bluesky.protocols import Movable
from bluesky.callbacks.zmq import Publisher

happi_client = happi.Client(database=happi.backends.backend("/happi_db.json"))

Expand All @@ -38,6 +40,11 @@
except socket.gaierror:
host = "172.17.0.1" # Default host ip on Linux

# 0MQ
zmq = Publisher(f"{host}:5567")
RE = RunEngine({})
RE.subscribe(zmq)

for device in happi_client.all_items:
# Skip devices marked inactive in happi
if not device.active:
Expand Down
23 changes: 23 additions & 0 deletions tests/numpy-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM debian:trixie

# python
RUN apt update
RUN apt install git -y
RUN apt install librdkafka-dev -y
RUN apt install python3-pip -y
RUN apt install python3-venv -y

COPY ./startup.py ./startup.py
COPY ./user_group_permissions.yaml ./user_group_permissions.yaml
COPY ./requirements.txt /requirements.txt

# Create a virtual environment
RUN python3 -m venv /opt/venv

# Activate the virtual environment
ENV PATH="/opt/venv/bin:$PATH"

# Install dependencies
RUN python3 -m pip install -r requirements.txt

RUN qserver-list-plans-devices --startup-script startup.py
Empty file added tests/numpy-test/happi_db.json
Empty file.
3 changes: 3 additions & 0 deletions tests/numpy-test/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bluesky==1.15.0 # ignore
bluesky-queueserver==0.0.24 # ignore
numpy==2.4.4 # ignore
2 changes: 2 additions & 0 deletions tests/numpy-test/startup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# from bluesky.plans import count
from bluesky.preprocessors import baseline_decorator
19 changes: 19 additions & 0 deletions tests/numpy-test/user_group_permissions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
user_groups:
root: # The group includes all available plan and devices
allowed_plans:
- null # Allow all
forbidden_plans:
- ":^_" # All plans with names starting with '_'
allowed_devices:
- null # Allow all
forbidden_devices:
- ":^_" # All devices with names starting with '_'
admin: # The group includes beamline staff, includes all or most of the plans and devices
allowed_plans:
- ":.*" # A different way to allow all
forbidden_plans:
- null # Nothing is forbidden
allowed_devices:
- ":.*:?.*" # A different way to allow all
forbidden_devices:
- null # Nothing is forbidden
2 changes: 0 additions & 2 deletions tests/test.env
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
HAPPI_DB_PATH= /home/runner/work/bluesky-in-a-box/bluesky-in-a-box/tests/happi_db.json
WT5_DATA_PATH= /home/runner/work/bluesky-in-a-box/bluesky-in-a-box/bluesky-cmds-data
TZ=America/Chicago
5 changes: 1 addition & 4 deletions zmq-proxy/dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
FROM python:3.14-trixie
COPY ./requirements.txt ./
RUN python3 -m pip install -r requirements.txt
CMD ["bluesky-0MQ-proxy", "5567", "5568"]



CMD ["bluesky-0MQ-proxy", "--in-address", "5567", "--out-address", "5568"]
2 changes: 1 addition & 1 deletion zmq-proxy/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
bluesky==1.10.0 # ignore
bluesky==1.15.0 # ignore
pyzmq==27.1.0
Loading