Batches from Python generator objects
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reading the implementation of Load.batch() and the related iterate() method. Reproduce the example using a generator of temporary iterator objects, then determine how batching currently handles those objects. Done means altdss.Load.batch(objs=selected_load_objs) works without copy() while preserving the intended lightweight behavior.
Written by the indexing model from the issue text.
Description
Generating batches from Python generator objects would allow users to use complex and custom filtering in Python to create a high-performance batch object as a result.
This couples well with the new iterate() method, which reuses Python-side objects. This currently doesn't work without the copy:
from copy import copy
# Python generator object
selected_load_objs = (copy(load) for load in altdss.Load.iterate() if predicate_function(load))
selected_load_batch = altdss.Load.batch(objs=selected_load_objs)
The idea is to allow using the temporary iterator objects directly, since they are lightweight.
- Dominant language
- Python
- Stars
- 19
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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.
More from dss-extensions/AltDSS-Python
-
documentation
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dss-extensions/AltDSS-Python#8 · 3 comments ·
-
documentation
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 20/100
dss-extensions/AltDSS-Python#6 · 1 reaction ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 28/100
All issues in dss-extensions/AltDSS-Python
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
stephrobert/dsoxlab#238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
sublimehq/package_control#1780 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nwg-piotr/nwg-displays#145 ·