From 7c064172377d7c8db965f770c3864657c8b088ff Mon Sep 17 00:00:00 2001
From: Pooja Babu
Date: Tue, 9 Jan 2024 15:53:29 +0100
Subject: [PATCH] Fix templates
---
.../resources_nest/point_neuron/common/NeuronClass.jinja2 | 4 ++--
.../resources_nest/point_neuron/common/NeuronHeader.jinja2 | 4 ++--
.../resources_nest/point_neuron/common/SynapseHeader.h.jinja2 | 4 ++--
.../point_neuron/setup/@MODULE_NAME@.cpp.jinja2 | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/pynestml/codegeneration/resources_nest/point_neuron/common/NeuronClass.jinja2 b/pynestml/codegeneration/resources_nest/point_neuron/common/NeuronClass.jinja2
index 765c67bca..bb9036f10 100644
--- a/pynestml/codegeneration/resources_nest/point_neuron/common/NeuronClass.jinja2
+++ b/pynestml/codegeneration/resources_nest/point_neuron/common/NeuronClass.jinja2
@@ -69,8 +69,8 @@ along with NEST. If not, see .
#include "{{neuronName}}.h"
-{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or (nest_version.startswith("v3.1") or nest_version.startswith("v3.2")
- or nest_version.startswith("v3.3") or nest_version.startswith("v3.4") or nest_version.startswith("v3.5") or nest_version.startswith("v3.6") %}
+{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or nest_version.startswith("v3.1") or nest_version.startswith("v3.2")
+ or nest_version.startswith("v3.3") or nest_version.startswith("v3.4") or nest_version.startswith("v3.5") or nest_version.startswith("v3.6")) %}
void
register_{{ neuronName }}( const std::string& name )
{
diff --git a/pynestml/codegeneration/resources_nest/point_neuron/common/NeuronHeader.jinja2 b/pynestml/codegeneration/resources_nest/point_neuron/common/NeuronHeader.jinja2
index 9a14f6729..6e2c7f842 100644
--- a/pynestml/codegeneration/resources_nest/point_neuron/common/NeuronHeader.jinja2
+++ b/pynestml/codegeneration/resources_nest/point_neuron/common/NeuronHeader.jinja2
@@ -211,8 +211,8 @@ size_t access_counter )
*/
// Register the neuron model
-{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or (nest_version.startswith("v3.1") or nest_version.startswith("v3.2")
- or nest_version.startswith("v3.3") or nest_version.startswith("v3.4") or nest_version.startswith("v3.5") or nest_version.startswith("v3.6") %}
+{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or nest_version.startswith("v3.1") or nest_version.startswith("v3.2")
+ or nest_version.startswith("v3.3") or nest_version.startswith("v3.4") or nest_version.startswith("v3.5") or nest_version.startswith("v3.6")) %}
void register_{{ neuronName }}( const std::string& name );
{%- endif %}
diff --git a/pynestml/codegeneration/resources_nest/point_neuron/common/SynapseHeader.h.jinja2 b/pynestml/codegeneration/resources_nest/point_neuron/common/SynapseHeader.h.jinja2
index 7cd61a9c1..357985b1f 100644
--- a/pynestml/codegeneration/resources_nest/point_neuron/common/SynapseHeader.h.jinja2
+++ b/pynestml/codegeneration/resources_nest/point_neuron/common/SynapseHeader.h.jinja2
@@ -82,7 +82,7 @@ along with NEST. If not, see .
namespace nest
{
-{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or (nest_version.startswith("v3.1") or nest_version.startswith("v3.2")
+{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or nest_version.startswith("v3.1") or nest_version.startswith("v3.2")
or nest_version.startswith("v3.3") or nest_version.startswith("v3.4") or nest_version.startswith("v3.5") or nest_version.startswith("v3.6")) %}
// Register the synapse model
void register_{{ synapseName }}( const std::string& name );
@@ -870,7 +870,7 @@ public:
{%- endif %}
};
-{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or (nest_version.startswith("v3.1") or nest_version.startswith("v3.2")
+{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or nest_version.startswith("v3.1") or nest_version.startswith("v3.2")
or nest_version.startswith("v3.3") or nest_version.startswith("v3.4") or nest_version.startswith("v3.5") or nest_version.startswith("v3.6")) %}
void
register_{{ synapseName }}( const std::string& name )
diff --git a/pynestml/codegeneration/resources_nest/point_neuron/setup/@MODULE_NAME@.cpp.jinja2 b/pynestml/codegeneration/resources_nest/point_neuron/setup/@MODULE_NAME@.cpp.jinja2
index 63bb69cfe..5b2792ff9 100644
--- a/pynestml/codegeneration/resources_nest/point_neuron/setup/@MODULE_NAME@.cpp.jinja2
+++ b/pynestml/codegeneration/resources_nest/point_neuron/setup/@MODULE_NAME@.cpp.jinja2
@@ -125,7 +125,7 @@ void
{%- if neurons %}
// register neurons
{%- for neuron in neurons %}
-{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or (nest_version.startswith("v3.1") or nest_version.startswith("v3.2")
+{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or nest_version.startswith("v3.1") or nest_version.startswith("v3.2")
or nest_version.startswith("v3.3") or nest_version.startswith("v3.4") or nest_version.startswith("v3.5") or nest_version.startswith("v3.6")) %}
nest::kernel().model_manager.register_node_model<{{neuron.get_name()}}>("{{neuron.get_name()}}");
{%- else %}
@@ -137,7 +137,7 @@ void
{%- if synapses %}
// register synapses
{%- for synapse in synapses %}
-{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or (nest_version.startswith("v3.1") or nest_version.startswith("v3.2")
+{%- if not (nest_version.startswith("v2") or nest_version.startswith("v3.0") or nest_version.startswith("v3.1") or nest_version.startswith("v3.2")
or nest_version.startswith("v3.3") or nest_version.startswith("v3.4") or nest_version.startswith("v3.5") or nest_version.startswith("v3.6")) %}
nest::register_connection_model< nest::{{synapse.get_name()}} >( "{{synapse.get_name()}}" );
{%- else %}