Datatamer / tamr-client

Programmatically interact with Tamr
https://tamr-client.readthedocs.io
Apache License 2.0
11 stars 25 forks source link

Confusion between from_data and from_json (and arguments resource_json and data) #81

Closed DerrickRice closed 5 years ago

DerrickRice commented 5 years ago

๐Ÿ› bug report

JSON is a string. Data (in the way it is used here), is a dictionary.

In many cases, from_json is actually taking a dictionary as an argument named resource_json.

๐Ÿค” Expected Behavior

An argument or method referring to json should be working with strings. If it is only working with structured data (that may or may not have once been a string), it should not be referred to as "json".

๐Ÿ˜ฏ Current Behavior

๐Ÿ’ Possible Solution

I'm fairly certain that all from_json methods can be removed, and calls to them can be changed to from_data (which is already a @classmethod, and so cls will be set to the subclass that it is invoked upon, without that subclass explicitly redefining from_data)

๐Ÿ”ฆ Context

I got confused.

๐ŸŒ Your Environment

Software Version(s)
tamr-unify-client 4.0-dev
Tamr Unify server n/a
Python n/a
Operating System n/a
nbateshaus commented 5 years ago

Resolved by #238