dbbs-lab / bsb-core

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

fix: Add morphologies branch to default config #895

Closed filimarc closed 1 month ago

filimarc commented 1 month ago

Describe the work done

The default configuration missed the morphologies branch, now should be ok.

Helveg commented 1 month ago

Is morphologies a required attribute? Could you give an example of an error this caused?

filimarc commented 1 month ago

It should not be a required attribute, but we found that when using a default configuration the __tree__() method ignore morphologies branch. So i thought it will be a quick fix for it...

Helveg commented 1 month ago

the tree() method ignore morphologies branch

The tree method intentionally leaves out any key that the user does not give. Can you clarify the problem some more? Here is what should happen:

Please show me with code examples if the current behaviour deviates from this description.

If you want to create a configuration that you can __tree__ to produce [] as output for morphologies (which is what your PR proposes to do by default, but I disagree with) then you can do the following:

from bsb import format_configuration_content, Configuration

format_configuration_content("json", Configuration.default(morphologies=[]))

Feel free to reopen this PR if you still feel like we should always add an empty morphologies array to the default configuration.