Skip to content
Snippets Groups Projects
  1. Sep 22, 2020
    • Benjamin Cumming's avatar
      Move region/locset S-expr evaluation from python lib to Arbor lib. (#1157) · 3ba5f437
      Benjamin Cumming authored
      * Move label and s-expr parsing code and unit tests from Python to arbor C++ library.
      * Update `locset` and `region` constructors that take string arguments to parse strings as s-expressions or "quoted" labels.
      * Modify the input stream modifier used to parse asc files to use a lookup table for substitutions, renamed it transmogrifier.                                                             
      * Replace `hopefully` type implemented in python headers with an `arb::util::expected`.
      * Add `ARBDEV_COLOR` CMake option that forces gcc and clang to always output color output.
      * Allow arbitrary strings in labels in region and locset expressions.
      * Add `parse_region_expression` and `parse_locset_expression` functions alongside the existing `parse_label_expression` function for use when a region or locset is expected. These calls will promote a quoted string `"label"` to `(region "label")` or 
       `(locset "label")` respectively.
      * Add user-defined string literals for labels so that the C++ interface can use `"soma"_lab` instead of awkward escaping `"\"soma\""`.
      * Simplify Python wrapper code.
  2. Sep 14, 2020
  3. Feb 04, 2020
    • Benjamin Cumming's avatar
      Python Interface (#948) · cfad427a
      Benjamin Cumming authored
      A big update that wraps over 90% of the public C++ API, with enough functionality to let Python users to perform useful modelling.
      
      Key features
      - wrapping of cable cell functionality
        - user-defined explicit compartmentalisation not supported
      - `single_cell_model` abstraction unique to the Python wrapper that simplifies developing and testing single cell models
      - one-dimensional cell builder for Python wrapper that simplfies building cells that 
        - in and of itself limited in scope, but a very useful example of mapping a richer morphology builder onto `sample_tree`s.
      - parsing of region and location expressions from strings
        - implements a generic s-expression parser that we can use for other purposes later
  4. Oct 02, 2019
    • akuesters's avatar
      Python wrapper: thread safe recipe (#882) · f30c4204
      akuesters authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Ensure that errors in Python callbacks that are called from multithreaded C++ code propogate the correct Python error back to the parent Python callback site, and that no callbacks are called from other threads if an error has already ocurred.
      - protects each recipe callback with a mutex, stores python exception, catches and throws python exception if occured
      - methods calling recipe (in simulation and partition_load_balance) are protected as well by try catch, resets and rethrows python exception (if occured) or else throws C++ exception
      
      fixes #792
      f30c4204
  5. Jun 05, 2019
  6. May 09, 2019