Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

The autoconfig does not take into account certain hints. #2

@drodarie

Description

@drodarie

May be related to #1.
I want to generate the automatic configuration for the following bsb class:

@config.node
class ShapesComposition:
    shapes = config.list(
        type=GeometricShape,
        required=types.same_size("shapes", "labels", required=True),
        hint=[{"type": "sphere", "radius": 40.0, "center": [0.0, 0.0, 0.0]}],
    )
    labels = config.list(
        type=types.list(),
        required=types.same_size("shapes", "labels", required=True),
        hint=[["soma", "dendrites", "axon"]],
    )
    voxel_size = config.attr(type=float, required=False, default=1.0)

In the sphinx rst file:

.. autoconfig:: bsb.connectivity.point_cloud.ShapesComposition
   :no-imports:
   :max-depth: 2

Results in the following generated python config:

from bsb.connectivity.point_cloud.geometric_shapes import ShapesComposition

ShapesComposition(
  shapes=[
    {
      'epsilon': 0.001,
      'type': 'shape',
    },
  ],
  labels=[
    {
  ],
  voxel_size=1.0,
)

The shapes and labels hint fields are not used for the final config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions