Decouple CompoundGenerator behaviours
还没有人认领这个 Issue。
评估
调研方向
首先阅读 CompoundGenerator 以及 issue 中提到的 Zip 和 Concat 生成器,然后追踪嵌套与点创建目前是如何交互的。在决定如何分离职责之前,先对应整理针对 Python 和 Java 描述的 Generator 概念。完成的标准是 CompoundGenerator 的行为与普通 Generator 一致,可以被 Zip 或 Concat 包装,并且无需包装生成器即可填充模型。
由索引模型根据 Issue 内容生成。
描述
CompoundGenerator performs 2 functions: nesting generators and creating all the points for a scan.
With the addition of Zip and Concat generators, the nesting behaviour should be removed from the the creating points generators, as these generators must work on Generators (which a CompoundGenerator is not). These models also hint that there could be further ways of combining two generators (although I'm struggling to think of geometries other than a inside b, a alongside b, a after b)
This would allow CompoundGenerator to become another normal Generator, which can be wrapped by a Zip/Concat, and could allow a model to be populated with points without a wrapping generator, which would make the matching of Java and Python concepts of generators in GDA a little simpler.
Cons: pretty large rework
Pros: separation of concerns, allows nesting Compounded models within other 'Multimodels'
- 主要语言
- Python
- 星标
- 6
- 派生
- 6
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DiamondLightSource/scanpointgenerator 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 30/100
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 5/5 一周以上 新手友好度 30/100
查看 DiamondLightSource/scanpointgenerator 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
PedestrianDynamics/pyFDS-Evac#343 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
theskumar/python-dotenv#708 ·
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 2 天内回复
-
Docs Timedelta
难度 2/5 1-3 小时 新手友好度 72/100
pandas-dev/pandas#69919 ·
维护者通常 1 天内回复
-
API documentation
难度 2/5 1-3 小时 新手友好度 72/100
zephyrproject-rtos/west#1009 · 2 条评论 ·
维护者通常 3 天内回复