Closed corranwebster closed 3 years ago
Coverage report on naming
from running the full test suite:
Offline discussion: apptools.naming
will be kept (at least for the next release: 5.0) as it is being used downstream (e.g. mayavi).
it has its own adapter system; this should be converted to use standard Traits adaptation
That adapter system is removed as part of #219
Offline discussion: apptools.naming will be kept (at least for the next release: 5.0) as it is being used downstream (e.g. mayavi).
I think when we drew this conclusion, we had not explored in details the functionality offered by apptools.naming.ui.api.explore
.
Through #219, we now have a better understanding as to what apptools.naming.ui.api.explore
does.
From Mayavi2 in a Python 2.7 + wxPython 3 environment (the explore
function does not work with wxPython4 or Qt as of pyface 7.1.0):
The definitions of the objects can be seen in the Python shell behind the top window. The top window is launched when I type explore(person)
.
Instead of seeing the value directly, I need to drag and drop a node onto the Python prompt to see the value. But say I drag and drop child
, which is supposed to be an instance of Child
on Person
, I get a PyContext
object instead of an instance of Child
. The mapping
dictionary is also confusing to read, neither does it show all the nested values, because the adapter for trait dict is not actually applied.
Personally I find the functionality somewhat underwhelming, but maybe there are other useful capabilities yet to be found.
Further offline discussion:
apptools.naming.ui
can be removed because only the explore
function is used in mayavi and nowhere else. The import in mayavi has import errors being guarded against such that removing explore
won't break the application. As mentioned above, its utility is also questionable.apptools.naming
are depended on in other places via imports, e.g. (not exhaustive) here, here, so they have to be kept (for now at least).Closing this issue now as the fate of apptools.naming
has been decided and apptools.naming.ui
has been removed.
This is an implementation of the Java Naming and Directory Interface - or at least the naming part of that - with specific implementations for a hierarchy of Python objects and for file system stores. It is used by Mayavi, but possibly only as part of the Wx backend.
It is intended to provide a standard API for hierarchical namespaces that standard interfaces can then build on top of, but I have a suspicion that at least some of the code that duplicates the Java APIs is over-engineered for Python (eg. the
InitialContextFactory
object feels very much like it could just be a callable).If it is to be kept, then there are some improvements that should be made: