Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Move model creation defaults into a utility function #8
"Explicit is better than implicit."
Current state: During creation of model objects, such as dimensions or cubes, some defaults are applied. For example in the dimension:
This should not be enforced, as some users might not expect that. Also it might come into a conflict later. This should be moved to some utility function/method:
Model objects should be kept in their state as created by user, having the model valid or not. That's what model validation is there for. And after using model.apply_defaults() model should be valid, only if there are really serious issues.