Closed mferrera closed 7 months ago
Attention: 73 lines
in your changes are missing coverage. Please review.
Comparison is base (
09dadec
) 80.29% compared to head (954ae62
) 80.06%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Really nice stuff, done any import benchmarking?
Yep, as mentioned there is no notable change in import time, just a bit shorter. Here are the tuna images, only looks different because the import order was changed. Not too surprising since the entire package is still imported in multiple places... but should hopefully become easier to address once we aren't definitely importing everything everywhere.
Before
After
Does most of #1149
The goal of this effort is to work toward increasing the modularity of the code, i.e., decreasing the dependencies the major packages (cube, grid3d, etc) have between them. Being explicit about imports helps to guide us when structuring code such that the package structure is visible when adding, changing, or moving things, rather than being hidden behind
import xtgeo
and putting every sub-package and sub-module into a flat namespace. Using relative imports within subpackages help us see more clearly where we are encapsulating things, or where we might want to encapsulate things, behind a package name (namespace).This PR adds a few ugly elements, though, namely a few lazy imports when instance checks occur. These will be pulled out in a later PR.
Does not address
xtgeo.xyz
orxtgeo.grid3d
. No notable change in import time, just a bit shorter.