iris
iris copied to clipboard
Proposal: move iris.cube.Cube to iris.Cube
I find myself constructing a lot of cubes and cubelists manually when I implement new functions to manipulate cubes.
Since these are core API objects, I suggest they should be moved from iris.cube.Cube
and iris.cube.CubeList
to iris.Cube
and iris.CubeList
(via an import statement in /lib/iris/__init__.py
). This would be consistent with many other Python libraries (e.g., Pandas), for which the core API is also usually exposed at the top level.
As a library user, it's just easier not to need to know about the structure of Iris's code to find a class or function. I can see a case for consolidating other functions into a broader namespace as well, but Cube and CubeList are the worse offenders (in my view). In my view, exposing submodules in a library's API should be done with caution, and only when it is clearly easier for library users.