DiamondLightSource / DiamondLightSource/scanpointgenerator

Decouple CompoundGenerator behaviours

Open
#76 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6
Forks
6
PR merge metrics
No merged PRs in 30d

Description

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'

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.