Developer modules#
bsb.services#
Provides several services for optional dependencies.
- bsb.services.MPI = <bsb.services.mpi.MPIService object>#
MPI service
- bsb.services.MPILock = <bsb.services.mpilock.MPILockModule object>#
MPILock service
Service module. Register or access interfaces that may be provided, mocked or missing, but should always behave neatly on import.
- class bsb.services.JobPool(scaffold, listeners=None)[source]#
Bases:
object
- execute(master_event_loop=None)[source]#
Execute the jobs in the queue
In serial execution this runs all of the jobs in the queue in First In First Out order. In parallel execution this enqueues all jobs into the MPIPool unless they have dependencies that need to complete first.
- Parameters:
master_event_loop (Callable) – A function that is continuously called while waiting for the jobs to finish in parallel execution
- property owner#
- property parallel#
bsb.topology._layout module#
Internal layout module. Makes sure regions and partitions don’t mutate during layout.
- class bsb.topology._layout.Layout(data, owner=None, children=None, frozen=False)[source]#
Bases:
object
Container class for all types of partition data. The layout swaps the data of the partition with temporary layout associated data, and tries out experimental changes to the partition data, if the layout process fails, the original partition data is reinstated.
- property children#
- property data#
- class bsb.topology._layout.PartitionData[source]#
Bases:
ABC
The partition data is a class that stores the description of a partition for a partition. This allows the Partition interface to define mutating operations such as translate, rotate, scale; for a dry-run we only have to swap out the actual data with temporary data, and the mutation is prevented.
bsb._util#
Global internal utility module.
- class bsb._util.SortableByAfter[source]#
Bases:
object
- is_after_satisfied(objects)[source]#
Determine whether the
after
specification of this object is met. Any objects appearing inself.after
need to occur inobjects
before the object.- Parameters:
objects (list) – Proposed order for which the after condition is checked.
- bsb._util.ichain(iterable, /)#
Alternative chain() constructor taking a single iterable argument that evaluates lazily.
- bsb._util.listify_input(value)[source]#
Turn any non-list values into a list containing the value. Sequences will be converted to a list using list(), None will be replaced by an empty list.