Have an error if a device composite is not found in the blueapi context

未关闭
#1,526 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
python
领域
api, backend

调研方向

首先复现 issue 中描述的 missing-device-composite 情况,然后检查 hyperion 使用的 planFunctions 模块以及相关的 blueapi 上下文注入路径。完成的标准是,失败信息报告 composite 缺失或无法发现,而不是暴露令人困惑的 PydanticInvalidForJsonSchema 错误。

由索引模型根据 Issue 内容生成。

描述

needs clarification

When injecting a device composite instead of a single device, if the composite has not been added to the module and not discoverable by blueapi, the only error that will show up on the blueapi logs is a PydanticInvalidForJsonSchema pointing to the first device in the composite, eg

raise self._value
pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.IsInstanceSchema (<class 'dodal.devices.beamlines.i19.diffractometer.FourCircleDiffractometer'>)

This is a bit confusing because it doesn't really give any information about where the error might be - in particular when the device otherwise connects and is used in other plans.

Related to #1525 . Run into this while testing on I19 and couldn't figure out what was missing until I took a look at the planFunctions module used in hyperion.

主要语言
Python
星标
13
派生
14
平均合并
1 天 16 小时
30 天内合并 PR
18

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DiamondLightSource/blueapi 的其他 Issue

查看 DiamondLightSource/blueapi 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。