-
Notifications
You must be signed in to change notification settings - Fork 391
Open
Milestone
Description
One common source of confusion for newcomers to Blaze is the top-level API. Some callables have two versions--symbol / Symbol, data / Data (this will be resolved in 0.11), tensordot / TensorDot, server / Server, Transpose / transpose--which makes it hard to know what is the recommended way to use these components. There are also a lot of other names in the top level namespace that don't feel like they belong, things like SparkContext, set_default_pmap, MongoQuery, etc.
Proposed:
- for expression callables, ensure that everything is consistent at the top level namespace--all
lowercase_with_underscores, etc. - Audit the current names in the
blazenamespace and determine which ones are really for internal use and should not be exposed at this level--I thinkMongoQueryfalls in this category, for example. - For the names that are internal, ensure they aren't included in the
blazenamespace. - Ensure that the string form of expressions use names consistent with themselves and consistent with the top-level namespace names, to make them
evalable as much as possible. An example of surprising behavior:
In [19]: d = bz.data([['Alice', 1], ['Bob', 2]], fields=['name', 'id'])
In [20]: t = bz.transform(d, sq=d.id ** 2)
In [21]: str(t)
Out[21]: "Merge(_child=_2, children=(_2, label(_2.id ** 2, 'sq')))"- Audit the docs for inconsistencies and update accordingly.
ping @sandhujasmine
sandhujasmine