dbbs-lab / bsb-core

The Brain Scaffold Builder
https://bsb.readthedocs.io
GNU General Public License v3.0
22 stars 16 forks source link

Component plugin type #784

Closed Helveg closed 8 months ago

Helveg commented 11 months ago

Add a new plugin category bsb.components that loads a module for eager/lazy loading of components.

Eager loading

To eager load a component, simply include the class inside of a module that is loaded.

Lazy loading

To lazy load a component, the plugin must return a dictionary, the items in a dictionary will be added to a new registry that should be consulted when resolving class maps:

__plugin__ = {
  "bsb.topology.partition.Partition": {
    "cone": "my_module.partitions.Cone"
  }
}