forked from iterative/dvc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We wrap every data to one of the `Node` object. But, since we were passing `self.data` instead of `self`, it was skipping the conversion and instead was just trying to set data as-is, which would have make our latter assumptions incorrect, as other codebases assume it to be a `Node`. I have added asserts in a few places. Also, I noticed that, on a few test assumptions, when `resolving`, we were not converting values back to it's original form (`CtxDict` -> `dict`, `CtxList` -> `list` and `Value` -> _). So, I have added `node.value` property, as it is a complement of the above fix. This caused a ripple effect for the changes in the API as `foreach` now resolved and changed the data to the original form, which prevents us from tracking the data later in the "field". So, `resolve`/`select` got a real `unwrap` option that should reliably work for all kinds of `Node` objects.
- Loading branch information
Showing
5 changed files
with
189 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.