Closed williehallock802 closed 5 years ago
Thanks, I'll try to take a look.
Same issue here. Removing that underscore before the get solves the issue... and outputs
column value
0 ColA w
1 ColA w
2 ColA w
3 ColA q
4 ColA q
But maybe what's missing is an instance test like in data.py:35
if isinstance(context, dict):
datasets = context.get('datasets', {})
else:
datasets = context._get('datasets', {})
That would work. This is an instance of general confusion throughout the codebase about whether inputs are dicts or schema objects. I went through a while ago and tried to address most of it, but this is one of the instances I missed (there may be others).
I think rather than an isinstance check each time we need to get an attribute, it would be better to normalize inputs so that we know what they are, and know what methods can be used on them.
Are you interested in working on this?
So looking at this, we've already pre-converted the input to a dict, so just using transform.get()
directly should be sufficient. The reason this was not caught is because there is no test of the fold transform (I'm certain I wrote the test when I wrote the code, but I'm not sure what happened to it).
I don't think there's much else to do here. :o)
TODO list:
Thank you for your offer. Unfortunately I didn't know enough about tests to be helpful, sorry.
Now, looking your solution, will help for next time.
generates the error: