Ensure that adapters can be constructed in a simpler manner than they are currently
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 441
- Forks
- 90
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 5
Description
1. Adapters + Impls where the Impl is tiny:
MyPullAdapter = py_pull_adapter_def("MyPullAdapter", MyPullAdapterImpl, ts[int], interval=timedelta, num_ticks=int)
One would expect we could do this via type annotations in some form or another, or something like pydantic since the py_pull_adapter_def mostly serves to wrap the impl inputs.
2. Minimal Managers / other places where excess classes are needed
https://github.com/Point72/csp/blob/234f94cfd9924ca479485b97d56f7cc91141f3d2/examples/04_writing_adapters/e3_adaptermanager_pullinput.py
https://github.com/Point72/csp/blob/main/examples/04_writing_adapters/e5_adaptermanager_pushinput.py
These examples requires 4+ classes (!!):
- MyAdapterManager
- MyAdapterManagerImpl
- MyManagedSimAdapterImpl
- MyManagedSimAdapter
This is pretty bad UX/design.
3. Automatic py_push_adapter_def / py_output_adapter_def, etc
Similar to the above, we often create these "anonymous" objects for binding the adapter-specific code to the engine wrapping necessary, I think we can consolidate this in some form
https://github.com/Point72/csp/blob/234f94cfd9924ca479485b97d56f7cc91141f3d2/csp/adapters/kafka.py#L187
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.
Research direction
Start by comparing the adapter patterns in examples/04_writing_adapters/e2_pullinput.py, e3_adaptermanager_pullinput.py, and e5_adaptermanager_pushinput.py, then inspect csp/adapters/kafka.py for the anonymous wrapper pattern. Done means proposing and implementing a coherent simpler construction approach that covers pull adapters, managed adapters, and push/output adapter definitions while reducing unnecessary classes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience, stream-processing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100