Add `target` parameter to `pipe_input`
Open
decorators
- Dominant language
- Jupyter Notebook
- Stars
- 2.6k
- Forks
- 213
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
Currently it assumes the first parameter. But that's a bit silly, we should use a target parameter. That would also allow pipe_input to work with other decorators cleanly.
**Describe the solution you'd like**
```python
@pipe_input(
step(...),
step(...),
target="b" # applies to parameter `b`
)
def foo(a: int, b: int) -> int:
...
```
**Describe alternatives you've considered**
Not doing this or just reordering parameters for the user.
**Additional context**
Tangentially related to this: https://github.com/DAGWorks-Inc/hamilton/pull/1160
Contributor guide
Assessment
This issue has not been assessed yet.