Closed gilesknap closed 1 month ago
Next I need to make this actually render the sub Entities and make some tests to demo this. The tests will feature a vacuum space example.
Next I need to make this actually render the sub Entities and make some tests to demo this. The tests will feature a vacuum space example.
Can we do the tetramm example please? I think we decided that vacuum space doesn't actually use CollectionDefinition
, just Definition
with multiple databases...
Will do tetramm.
But I am Currently working on making the vac space example. It turns out that default objects nearly but not quite work.
Collections have been retired in favour of Definitions that may declare SubEntities.
This pull request will add the ability to create 'sub-entities' by making the support object 'defs' a list of Union of Definitions (as it previously was) or 'CollectionDefinitions'.
CollectionDefinitions will have a set of arguments, just like definitions but instead of database / pre_init etc. will list a set of Entities to instantiate as sub objects.
The first pass of this PR is just a restructure to provide the above Union in the defs list. The support.py module needed breaking apart so that there were no circular dependencies. This new structure is probably tidier than it was before - the modules are now more concise and target a specific feature.