Skip to content

Commit

Permalink
libsonata has in the process of refactoring its module (#123)
Browse files Browse the repository at this point in the history
* make this forwards and backwards compatible
  • Loading branch information
mgeplf authored Feb 5, 2024
1 parent 31bcdfa commit cbdac33
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bluecellulab/circuit/config/sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@
from pydantic import field_validator, Field
from pydantic.dataclasses import dataclass

from libsonata._libsonata import Conditions as LibSonataConditions
import neuron

import bluecellulab

# libsonata reorganized it's module layout; maintain compatibility with both:
# https://github.com/BlueBrain/libsonata/pull/345
try:
from libsonata._libsonata import Conditions as LibSonataConditions
except ImportError:
from libsonata._libsonata import SimulationConfig
LibSonataConditions = SimulationConfig.Conditions


def string_to_bool(value: str) -> bool:
"""Convert a string to a boolean."""
Expand Down

0 comments on commit cbdac33

Please sign in to comment.