Potential mutability of model objects is sometimes causing unexpected behavior. All model objects should be immutable, including Cube. All setters should be removed.
The problem is Cube creation and linking. Currently the cube is created in two steps:
# In Provider
cube = Cube.from_metadata(metadata)
link_cube(cube, locale, provider, namespace)
Replace that with a dimension finder that will be passed into the Cube:
# Somewhere in workspace
finder = DimensionFinder(root_namespace)
# In Provider
cube = Cube.from_metadata(metadata, finder)
finder might act as a dictionary object with dictionary item getters.
Expect Cube.__init__ to receive final list of linked dimensions.
Potential mutability of model objects is sometimes causing unexpected behavior. All model objects should be immutable, including Cube. All setters should be removed.
The problem is Cube creation and linking. Currently the cube is created in two steps:
Replace that with a dimension finder that will be passed into the Cube:
finder
might act as a dictionary object with dictionary item getters.Expect
Cube.__init__
to receive final list of linked dimensions.