Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Decouple CompoundGenerator behaviours

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

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
重构
描述清晰度
需要澄清
活跃度
停滞
技术栈
python
领域
backend

调研方向

首先阅读 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

环境准备

从这里开始

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

DiamondLightSource/scanpointgenerator 的其他 Issue

查看 DiamondLightSource/scanpointgenerator 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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