Open prjemian opened 1 year ago
CI workflow steps:
- name: Checkout this repository
uses: actions/checkout@v4
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
- name: Start tiled server on host port 8019
run: |
docker pull ghcr.io/bluesky/tiled:main
docker run \
-d \
--rm \
-p 8019:8000 \
-e TILED_SINGLE_USER_API_KEY=secret \
ghcr.io/bluesky/tiled:main
NOTE: needs apstools 1.6.19 (due by March 2024)
Example python code to start a local (no network) tiled server with config for MongoDB server (which is network based):
from tiled.client import Context, from_context
from tiled.server.app import build_app_from_config
config = {
"trees": [
{
"path": "bluesky_runs",
"tree": "databroker.mongo_normalized:MongoAdapter.from_uri",
"args": {"uri": "mongodb://localhost:27017/bluesky_runs"},
}
]
}
app = build_app_from_config(config)
context = Context.from_app(app)
client = from_context(context)
As noted in an hklpy issue, we need to switch our catalog reference to use tiled server:
Tiled docs have advice about creating/storing the API key.
We'll need instructions for routine installation of a tiled server for each instrument, and reconfiguration of the instrument package for this change.
Tasks for unit testing
RE.subscribe()