bug: `@load_from` and `@save_to` overwrite tags
Open
bug
- Dominant language
- Jupyter Notebook
- Stars
- 2.6k
- Forks
- 213
- PR merge metrics
- No merged PRs in 30d
Description
When developing the `@cache` decorator, which is essentially a custom `@tag` decorator, I realized that decorator order matters when used with `@load_from` or `@save_to`. Instead, we should propagate tags independently of ordering.
For instance, this will apply the `hello="world"` tag
```python
@load_from.json(path="/path/to/file")
@tag(hello="world")
def foo(data: dict) -> dict:
return foo
```
While this will make the tag disappear
```python
@tag(hello="world")
@load_from.json(path="/path/to/file")
def foo(data: dict) -> dict:
return foo
```
Contributor guide
Assessment
This issue has not been assessed yet.