From 804c1dd6290c19c0282324448042034e17b2c3fe Mon Sep 17 00:00:00 2001
From: Padraig Gleeson
Date: Fri, 22 Sep 2023 17:40:47 +0100
Subject: [PATCH 01/11] To v1.10.0
---
pom.xml | 4 ++--
src/main/java/org/neuroml/importer/Main.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index 1ec1952..ada8122 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.neuroml.import
org.neuroml.import
jar
- 1.9.1
+ 1.10.0
org.neuroml.import
http://maven.apache.org
@@ -29,7 +29,7 @@
org.neuroml.export
org.neuroml.export
- 1.9.1
+ 1.10.0
diff --git a/src/main/java/org/neuroml/importer/Main.java b/src/main/java/org/neuroml/importer/Main.java
index f2b3baa..bdfb555 100644
--- a/src/main/java/org/neuroml/importer/Main.java
+++ b/src/main/java/org/neuroml/importer/Main.java
@@ -4,5 +4,5 @@
public class Main
{
- public static String ORG_NEUROML_IMPORT_VERSION = "1.9.1";
+ public static String ORG_NEUROML_IMPORT_VERSION = "1.10.0";
}
From fbbd00be2a05fdb0a88548e0d5a0795a1f14e2c6 Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Thu, 2 Nov 2023 18:44:53 +0000
Subject: [PATCH 02/11] Change to cloning sbml test suite from github & run
tests
---
.github/workflows/ci.yml | 10 ++++++++++
.gitignore | 1 +
runSBMLTestSuite.sh | 7 +++----
.../java/org/neuroml/importer/sbml/SBMLImporter.java | 4 ++--
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2c2b4af..3795a73 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -117,3 +117,13 @@ jobs:
pwd
mvn install
mvn dependency:tree
+
+
+ - name: Run SBML test suite
+ run: |
+ git clone https://github.com/sbmlteam/sbml-test-suite.git
+
+ mvn assembly:assembly -DdescriptorId=jar-with-dependencies"
+
+ java -Xmx400M -classpath target/*jar-with-dependencies.jar org.neuroml.importer.sbml.SBMLImporter -runSBMLTestSuite
+
diff --git a/.gitignore b/.gitignore
index 02e8b1a..0d28bfc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,3 +32,4 @@ src/test/resources/tmp
biomodels
Errors.txt
+/sbml-test-suite/
diff --git a/runSBMLTestSuite.sh b/runSBMLTestSuite.sh
index 50bcc1f..6ce41ee 100755
--- a/runSBMLTestSuite.sh
+++ b/runSBMLTestSuite.sh
@@ -1,13 +1,12 @@
#!/bin/bash
-if [ ! -d "sbmlTestSuite" ]; then
+if [ ! -d "sbml-test-suite" ]; then
echo ""
- echo "A copy of the SBML Test Suite needs to be checked out from Sourceforge. Try:"
+ echo "A copy of the SBML Test Suite needs to be checked out from GitHub. Try:"
echo ""
- echo " mkdir sbmlTestSuite"
- echo " svn checkout https://svn.code.sf.net/p/sbml/code/trunk/test-suite/cases sbmlTestSuite/cases"
+ echo " git clone https://github.com/sbmlteam/sbml-test-suite.git"
echo ""
exit 1
diff --git a/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java b/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
index 60c21c1..3c84cc4 100644
--- a/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
+++ b/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
@@ -1209,7 +1209,7 @@ public static void main(String[] args) throws Exception
- File sbmlTestSuiteDir = new File("sbmlTestSuite/cases/semantic/");
+ File sbmlTestSuiteDir = new File("sbml-test-suite/cases/semantic/");
boolean useSbmlTestSuite = sbmlTestSuiteDir.exists() && forceSBMLTestSuite;
@@ -1292,7 +1292,7 @@ public static void main(String[] args) throws Exception
while(testCase.length()<5) testCase ="0"+testCase;
- sbmlFile = new File("sbmlTestSuite/cases/semantic/"+testCase+"/"+testCase+"-sbml-"+version+".xml");
+ sbmlFile = new File("sbml-test-suite/cases/semantic/"+testCase+"/"+testCase+"-sbml-"+version+".xml");
if (!sbmlFile.exists()){
E.info(" ---- File not found: "+sbmlFile.getAbsolutePath()+"!! ---- \n\n");
notFound++;
From bde039f1526da43075627c48f898549fdef68bf5 Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Thu, 2 Nov 2023 18:49:39 +0000
Subject: [PATCH 03/11] typo
---
.github/workflows/ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3795a73..dbb28c2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -123,7 +123,7 @@ jobs:
run: |
git clone https://github.com/sbmlteam/sbml-test-suite.git
- mvn assembly:assembly -DdescriptorId=jar-with-dependencies"
-
+ mvn assembly:assembly -DdescriptorId=jar-with-dependencies
+
java -Xmx400M -classpath target/*jar-with-dependencies.jar org.neuroml.importer.sbml.SBMLImporter -runSBMLTestSuite
From b91193b0a57da14931dd8154611fdb1e4c12f6b4 Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Thu, 2 Nov 2023 18:56:59 +0000
Subject: [PATCH 04/11] Just test sbml suite on ubuntu-latest
---
.github/workflows/ci.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index dbb28c2..49ba977 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -120,6 +120,7 @@ jobs:
- name: Run SBML test suite
+ if: ${{ matrix.runs-on == 'ubuntu-latest' }}
run: |
git clone https://github.com/sbmlteam/sbml-test-suite.git
From dedc25f6579ff9b10481a194632d2f6995271b20 Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Thu, 2 Nov 2023 19:00:59 +0000
Subject: [PATCH 05/11] Update actions versions
---
.github/workflows/ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 49ba977..202f190 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,9 +21,9 @@ jobs:
name: Test on Java ${{ matrix.Java }} on ${{ matrix.runs-on }}
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.Java }}
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v3
with:
java-version: ${{ matrix.Java }}
distribution: 'temurin'
From f9eafc92d06c4899d53baf832a4312a03bacf026 Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Wed, 1 May 2024 11:51:59 +0100
Subject: [PATCH 06/11] Test on java 21
---
.github/workflows/ci.yml | 13 +++++++++----
.github/workflows/docs.yml | 15 ++++++++-------
pom.xml | 4 ++--
3 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 202f190..5edd90b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,14 +16,19 @@ jobs:
strategy:
fail-fast: false
matrix:
- java: [ '8', '11', '16', '17', '19']
- runs-on: [ubuntu-latest, macos-latest, windows-2019]
+ java: [ '8', '11', '16', '17', '19', '21' ]
+ runs-on: [ubuntu-latest, macos-12, windows-2019] # Note macos-12, not latest/14, due to hdf5 install issue
+ exclude:
+ - runs-on: macos-latest
+ java: "8"
+ - runs-on: macos-latest
+ java: "16"
name: Test on Java ${{ matrix.Java }} on ${{ matrix.runs-on }}
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.Java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.Java }}
distribution: 'temurin'
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 92767ba..eaa977b 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -13,17 +13,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- uses: nelonoel/branch-name@v1.0.1
- name: Set up JDK 11
- uses: actions/setup-java@v1
+ uses: actions/setup-java@v4
with:
java-version: 11
java-package: jdk
+ distribution: 'temurin'
- name: Set up Python 3.9
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v5
with:
python-version: 3.9
@@ -33,14 +34,14 @@ jobs:
pip install ghp-import
- name: Checkout NeuroML2
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
repository: NeuroML/NeuroML2
ref: development
path: NeuroML2
- name: Checkout org.lemsml
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
repository: LEMS/jLEMS
ref: development
@@ -54,14 +55,14 @@ jobs:
path: org.neuroml.model.injectingplugin
- name: Checkout org.neuroml.model
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
repository: NeuroML/org.neuroml.model
ref: development
path: org.neuroml.model
- name: Checkout org.neuroml.export
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
repository: NeuroML/org.neuroml.export
ref: development
diff --git a/pom.xml b/pom.xml
index ada8122..5403300 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,8 +78,8 @@
maven-compiler-plugin
3.0
-
- 1.7
+
+ 1.8
From e72a476109dd81d0db8270121b52a84ba1c42c34 Mon Sep 17 00:00:00 2001
From: Padraig Gleeson
Date: Tue, 11 Jun 2024 12:02:01 +0100
Subject: [PATCH 07/11] To v1.10.1
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 5403300..6d4b961 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.neuroml.import
org.neuroml.import
jar
- 1.10.0
+ 1.10.1
org.neuroml.import
http://maven.apache.org
@@ -29,7 +29,7 @@
org.neuroml.export
org.neuroml.export
- 1.10.0
+ 1.10.1
From 57f9110dc61d52bf0350d65a6b029686d88e6f3c Mon Sep 17 00:00:00 2001
From: Padraig Gleeson
Date: Tue, 11 Jun 2024 12:02:07 +0100
Subject: [PATCH 08/11] To v1.10.1
---
src/main/java/org/neuroml/importer/Main.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/neuroml/importer/Main.java b/src/main/java/org/neuroml/importer/Main.java
index bdfb555..a465b67 100644
--- a/src/main/java/org/neuroml/importer/Main.java
+++ b/src/main/java/org/neuroml/importer/Main.java
@@ -4,5 +4,5 @@
public class Main
{
- public static String ORG_NEUROML_IMPORT_VERSION = "1.10.0";
+ public static String ORG_NEUROML_IMPORT_VERSION = "1.10.1";
}
From dfb6e457964f3bd595f626e4f2c64330ad614d8a Mon Sep 17 00:00:00 2001
From: Padraig Gleeson
Date: Tue, 11 Jun 2024 12:20:08 +0100
Subject: [PATCH 09/11] Bump year in docs
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6d4b961..c548b4a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,7 +71,7 @@
<br />
<br />
- Copyright NeuroML Contributors 2023
+ Copyright NeuroML Contributors 2024
From b79aecfda1c5ba424f18f071c82d6d6d3ee6cb9d Mon Sep 17 00:00:00 2001
From: "Ankur Sinha (Ankur Sinha Gmail)"
Date: Fri, 14 Jun 2024 17:06:01 +0100
Subject: [PATCH 10/11] fix(sbml-import): make TimeDerivative rhs have a
`per_time` dimension
Otherwise we end up with dimensionally incorrect values:
```
```
It'll now be:
```
```
where `tscale` has dimensions `per_time`.
---
src/main/java/org/neuroml/importer/sbml/SBMLImporter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java b/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
index 3c84cc4..5317e84 100644
--- a/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
+++ b/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
@@ -831,7 +831,7 @@ else if (r.isAssignment()) {
E.info(">>>> StateVariable "+sv);
dyn.stateVariables.add(sv);
- TimeDerivative td = new TimeDerivative(sv.getName(), "1");
+ TimeDerivative td = new TimeDerivative(sv.getName(), timeScale.getName() + "* 1");
dyn.timeDerivatives.add(td);
}
From cb2c52d1cceba7abfc7f0dc270cd14d4dc89ce59 Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Mon, 17 Jun 2024 14:47:18 +0100
Subject: [PATCH 11/11] Adding volt as known sbml unit.
---
src/main/java/org/neuroml/importer/sbml/SBMLImporter.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java b/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
index 5317e84..59f96b5 100644
--- a/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
+++ b/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
@@ -314,6 +314,11 @@ public static Lems convertSBMLToLEMS(File sbmlFile, float simDuration, float sim
newDim.setN(newDim.getN() + exponent * 1);
} else if (kind.equals("second")) {
newDim.setT(newDim.getT() + exponent * 1);
+ } else if (kind.equals("volt")) {
+ newDim.setM(newDim.getM() + exponent * 1);
+ newDim.setL(newDim.getL() + exponent * 2);
+ newDim.setT(newDim.getT() + exponent * -3);
+ newDim.setI(newDim.getI() + exponent * -1);
} else {
//TODO: Add all unit kinds from section 4.4.2 in SBML specs: http://sbml.org/Documents/Specifications
System.err.print("Add more unit definitions! Missing: "+kind);