Pattern for modifying workflows using `map` and `reduce`?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1
- Forks
- 3
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 17
Description
Context
Using Sciline's (Cycleban's) map/reduce we modify workflows. See scipp/esssans#135 and https://github.com/scipp/esssans/pull/135#discussion_r1629386269 for an example. The use of helper functions is not great UX (example: workflow = sans.with_banks(workflow, banks=[...])).
We should gain some more experience and get "data" on how well this works, then consider the alternatives below (or find more alternatives)
Alternatives
- Make this arguments of the workflow creation,
LokiWorkflow(sample_runs=..., ...). - Turn
LokiWorkflowinto a builder (using builder pattern):workflow = LokiWorkflow() workflow.set_sample_runs([...]) workflow.build() # or build automatically in `workflow.compute()`, by making this a wrapper. - Turn
LokiWorkflowinto a wrapper, with internal reference to the pipeline. Dedicated methods can set and update the internal workflow.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the map/reduce workflow example in scipp/esssans#135 and its linked pull-request discussion. Compare the current helper-function approach with the LokiWorkflow constructor, builder, and wrapper alternatives, or identify further options. The issue is complete when experience and data support a documented direction for the workflow-modification API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100