Repository: BlueBrain/libsonata (language: python)

Issue:
Default edge type is `"chemical_synapse"`.
It appears that the default type of an edge is `"chemical_synapse"`, i.e.
```
{
  "manifest": {
    "$BASE_DIR": ".",
    "$COMPONENT_DIR": "$BASE_DIR",
    "$NETWORK_DIR": "$BASE_DIR"
  },
  "components": {
    "morphologies_dir": "$COMPONENT_DIR/ascii_sonata",
    "biophysical_neuron_models_dir": "not_used"
  },
  "node_sets_file": "not_used",
  "networks": {
    "nodes": [
      {
        "nodes_file": "$NETWORK_DIR/nodes.h5",
        "node_types_file": null,

        "populations": {
          "All": {}
        }
      }
    ],
    "edges": [
      {
        "edges_file": "$NETWORK_DIR/edges_2k.h5",
        "edge_types_file": null,

        "populations": {
          "All": {}
        }
      }
    ]
  }
}
```

will return `"chemical_synapse"` as the type of `All`. This can be reproduced via:
```
>>> c = libsonata.CircuitConfig.from_file("circuit_config.json")
>>> c.edge_population_properties("All").type
'chemical_synapse'
```

The specification prescribes the values `"chemical"` in the config file. Would it make sense to use that value instead?


Discussion / hints:

Fix patch:
diff --git a/src/config.cpp b/src/config.cpp
index dec44031..c00f7fc3 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -747,7 +747,7 @@ CircuitConfig::CircuitConfig(const std::string& contents, const std::string& bas
             }
         };
     updateDefaultProperties(_nodePopulationProperties, "biophysical");
-    updateDefaultProperties(_edgePopulationProperties, "chemical_synapse");
+    updateDefaultProperties(_edgePopulationProperties, "chemical");
 
     checkBiophysicalPopulations(_nodePopulationProperties);
 }


Test patch:
diff --git a/python/tests/test_config.py b/python/tests/test_config.py
index cd010aa6..31d01840 100644
--- a/python/tests/test_config.py
+++ b/python/tests/test_config.py
@@ -49,7 +49,7 @@ def test_get_population_properties(self):
         self.assertTrue(node_prop.elements_path.endswith('tests/data/nodes1.h5'))
 
         edge_prop = self.config.edge_population_properties('edges-AC')
-        self.assertEqual(edge_prop.type, 'chemical_synapse')
+        self.assertEqual(edge_prop.type, 'chemical')
         self.assertTrue(edge_prop.morphologies_dir.endswith('morphologies'))
         self.assertTrue(edge_prop.biophysical_neuron_models_dir.endswith('biophysical_neuron_models'))
         self.assertEqual(edge_prop.alternate_morphology_formats, {})
diff --git a/tests/test_config.cpp b/tests/test_config.cpp
index c001367f..f4d92989 100644
--- a/tests/test_config.cpp
+++ b/tests/test_config.cpp
@@ -44,7 +44,7 @@ TEST_CASE("CircuitConfig") {
         CHECK(endswith(config.getNodePopulationProperties("nodes-A").typesPath, ""));
         CHECK(endswith(config.getNodePopulationProperties("nodes-A").elementsPath, "tests/data/nodes1.h5"));
 
-        CHECK(config.getEdgePopulationProperties("edges-AB").type == "chemical_synapse");
+        CHECK(config.getEdgePopulationProperties("edges-AB").type == "chemical");
         CHECK(endswith(config.getEdgePopulationProperties("edges-AB").typesPath, ""));
         CHECK(endswith(config.getEdgePopulationProperties("edges-AB").elementsPath, "tests/data/edges1.h5"));