Ensure that adapters can be constructed in a simpler manner than they are currently
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
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.
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
- Dominant language
- Python
- Stars
- 450
- Forks
- 91
- Avg merge
- 18h 8m
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 Point72/csp
-
Add docs about transitioning from replay to realtime by setting start date in the pastPossibly taken @russlan23 claimed this 99 days ago. Openpart: documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
RuntimeWarning: non-string key in the __dict__ of class OutputsMay be free again A pull request for this issue was closed without being merged. Opentype: bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
type: bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
csp::Struct leaks one StructMeta reference per constructionPossibly taken @jieya907 claimed this 36 days ago. Opengood first issue type: bug
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
csp.output does not support dict unpackingPossibly taken @aadya940 claimed this 107 days ago. Opentype: feature
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
Similar issues
-
[BUG] HTTP lifecycle dispatch treats a NO_PROXY-only environment as corporate egress and skips the resolve-and-pinned sessionPossibly taken @bodapatisaikrishna claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
external
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
langchain-ai/docs#7652 ·
Maintainers usually reply within 1 day
-
[oblt-aw][autodoc] Document new e2e-secret-leak-artifacts workflow and update e2e-all leaf listOpen
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
elastic/oblt-aw#2513 · 1 comment ·
Maintainers usually reply within 1 day
-
bug p2
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 75/100
NCAR/CLM-Tutorial#113 · 1 comment ·
Maintainers usually reply within 1 day