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
blaze namespace and determine which ones are really for internal use and should not be exposed at this level--I think MongoQuery falls in this category, for example.
- For the names that are internal, ensure they aren't included in the
blaze namespace.
- 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
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 likeSparkContext,set_default_pmap,MongoQuery, etc.Proposed:
lowercase_with_underscores, etc.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.blazenamespace.evalable as much as possible. An example of surprising behavior:ping @sandhujasmine