Closed thetorpedodog closed 1 year ago
Another little note as I do some follow-up work:
Another thing I have found the ephemeral types useful for is to validate the type hierarchy and make sure generics work as I expect. I also think in the future they could be more useful in testing if we had in-memory dataframes/ndarrays that wrapped pandas dataframes / numpy ndarrays and provided appropriate methods; experimentquery could be tested entirely in isolation (but that is a future thing, if ever).
The meaning and usage of the various
SimpleWhatever
collections was unclear with them colocated with the abstract implementation. Moving them to their ownephemeral
module and not having them in the mainsomacore
namespace will make them less attractive. They still have value in being the most basic possible implementation of a collection, and are useful in tests for this package.In the process of removing the
SimpleCollection
export from the package root, also changes the__init__.py
to just import module members rather than the module itself. Since this is at the top level and is exclusively for re-export, this does not have the same potential circular dependency problems as doing so within internal modules, while reducing repetition and the possibility of errors.