cubes
cubes copied to clipboard
Make all model objects immutable
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.
Other mutable methods:
-
Attribute.dimension - localization methods that edit object in-place
This needs to be reviewed and updated.