feat: add support for aarebec #11
No files matched your search
+34
-2
@@ -1,6 +1,7 @@
|
||||
name: CI for pxi_bec
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
@@ -24,6 +25,11 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: "main"
|
||||
MX_BEC_REPO_BRANCH:
|
||||
description: "Branch of the mx_bec core repo to install"
|
||||
required: false
|
||||
type: string
|
||||
default: "main"
|
||||
PYTHON_VERSION:
|
||||
description: "Python version to use"
|
||||
required: false
|
||||
@@ -46,6 +52,29 @@ jobs:
|
||||
with:
|
||||
python-version: "${{ inputs.PYTHON_VERSION || '3.12' }}"
|
||||
|
||||
# Use the same-named branch of mx_bec if it exists (e.g. a feature developed in both repos), otherwise main.
|
||||
- name: Resolve mx_bec branch
|
||||
id: mx_bec
|
||||
shell: bash
|
||||
run: |
|
||||
ref="${{ inputs.MX_BEC_REPO_BRANCH || github.head_ref || github.ref_name }}"
|
||||
auth="$(printf 'x-access-token:%s' '${{ github.token }}' | base64 -w0)"
|
||||
if git -c "http.extraheader=Authorization: Basic ${auth}" ls-remote --exit-code --heads \
|
||||
"${{ github.server_url }}/bec/mx_bec.git" "refs/heads/${ref}" >/dev/null; then
|
||||
echo "Using mx_bec branch '${ref}'"
|
||||
else
|
||||
echo "mx_bec has no branch '${ref}', using main"
|
||||
ref=main
|
||||
fi
|
||||
echo "ref=${ref}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Checkout MX BEC Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: bec/mx_bec
|
||||
ref: "${{ steps.mx_bec.outputs.ref }}"
|
||||
path: ./mx_bec
|
||||
|
||||
- name: Checkout BEC Plugin Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -94,8 +123,11 @@ jobs:
|
||||
uv pip install --system -e ./bec/bec_lib[dev]
|
||||
uv pip install --system -e ./bec/bec_ipython_client
|
||||
uv pip install --system -e ./bec/bec_server[dev]
|
||||
uv pip install --system -e ./bec_widgets[dev,pyside6]
|
||||
uv pip install --system -e ./pxi_bec[dev]
|
||||
uv pip install --system -e ./bec_widgets[dev]
|
||||
# mx_bec pins its MX-internal dependencies (aarecommon, aare_config, ...) as direct URLs
|
||||
# to the gitea registry. uv only accepts URL dependencies from packages named on the
|
||||
# command line, so mx_bec must be installed together with the plugin which depends on it.
|
||||
uv pip install --system -e ./mx_bec[dev] -e ./pxi_bec[dev]
|
||||
|
||||
- name: Run Tests with Coverage
|
||||
id: coverage
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
from mx_bec.bec_widgets.widgets.aare_bec.actors_config import MxActorConfigWidget
|
||||
from mx_bec.bec_widgets.widgets.aare_bec.task_panel import MxTaskPanel
|
||||
from mx_bec.bec_widgets.widgets.aare_bec.task_queue import MxTaskQueueWidget
|
||||
|
||||
__all__ = ["MxActorConfigWidget", "MxTaskPanel", "MxTaskQueueWidget"]
|
||||
@@ -27,7 +27,7 @@ base_config:
|
||||
|
||||
# smargon:
|
||||
# description: REST-based device which connects to Smargopolo
|
||||
# deviceClass: pxi_bec.devices.smargopolo_smargon.Smargon
|
||||
# deviceClass: pxi_bec.devices.Smargon
|
||||
# deviceConfig: {prefix: 'http://x06sa-smargopolo.psi.ch:3000'}
|
||||
# onFailure: buffer
|
||||
# enabled: True
|
||||
@@ -40,7 +40,7 @@ base_config:
|
||||
|
||||
# aerotech:
|
||||
# description: REST-based device which connects to AareScan and Aerotech
|
||||
# deviceClass: pxii_bec.devices.aerotech.Aerotech
|
||||
# deviceClass: pxi_bec.devices.Aerotech
|
||||
# deviceConfig: {prefix: 'http://mx-x06sa-queue-01:5234'}
|
||||
# onFailure: buffer
|
||||
# enabled: True
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
from mx_bec.devices.aerotech import Aerotech
|
||||
from mx_bec.devices.sim_sample_changer import SimSampleChanger
|
||||
from mx_bec.devices.sim_stages import SimAerotechStage, SimGoniometer
|
||||
from mx_bec.devices.smargopolo_smargon import Smargon
|
||||
|
||||
__all__ = ["Aerotech", "SimAerotechStage", "SimGoniometer", "SimSampleChanger", "Smargon"]
|
||||
+4
-1
@@ -12,7 +12,7 @@ classifiers = [
|
||||
"Programming Language :: Python :: 3",
|
||||
"Topic :: Scientific/Engineering",
|
||||
]
|
||||
dependencies = ["pandas~=2.0", "matplotlib"]
|
||||
dependencies = ["mx_bec", "pandas~=2.0", "matplotlib"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
@@ -58,6 +58,9 @@ plugin_widgets_update = "pxi_bec.bec_widgets.auto_updates"
|
||||
[project.entry-points."bec.widgets.user_widgets"]
|
||||
plugin_widgets = "pxi_bec.bec_widgets.widgets"
|
||||
|
||||
[project.entry-points."bec.messages"]
|
||||
plugin_messages = "pxi_bec.messages"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
include = ["*"]
|
||||
|
||||
|
||||
Reference in new issue
Block a user