Skip to content

Commit 5cd8bb0

Browse files
authored
Merge pull request #26 from NeuroML/development
Changes for NeuroML v2.3.1 release
2 parents 20811d3 + ebd7276 commit 5cd8bb0

File tree

7 files changed

+46
-24
lines changed

7 files changed

+46
-24
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,19 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
java: [ '8', '11', '16', '17', '19']
20-
runs-on: [ubuntu-latest, macos-latest, windows-2019]
19+
java: [ '8', '11', '16', '17', '19', '21' ]
20+
runs-on: [ubuntu-latest, macos-12, windows-2019] # Note macos-12, not latest/14, due to hdf5 install issue
21+
exclude:
22+
- runs-on: macos-latest
23+
java: "8"
24+
- runs-on: macos-latest
25+
java: "16"
2126

2227
name: Test on Java ${{ matrix.Java }} on ${{ matrix.runs-on }}
2328
steps:
24-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v4
2530
- name: Set up JDK ${{ matrix.Java }}
26-
uses: actions/setup-java@v2
31+
uses: actions/setup-java@v4
2732
with:
2833
java-version: ${{ matrix.Java }}
2934
distribution: 'temurin'
@@ -117,3 +122,14 @@ jobs:
117122
pwd
118123
mvn install
119124
mvn dependency:tree
125+
126+
127+
- name: Run SBML test suite
128+
if: ${{ matrix.runs-on == 'ubuntu-latest' }}
129+
run: |
130+
git clone https://github.com/sbmlteam/sbml-test-suite.git
131+
132+
mvn assembly:assembly -DdescriptorId=jar-with-dependencies
133+
134+
java -Xmx400M -classpath target/*jar-with-dependencies.jar org.neuroml.importer.sbml.SBMLImporter -runSBMLTestSuite
135+

.github/workflows/docs.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- uses: nelonoel/[email protected]
1818

1919
- name: Set up JDK 11
20-
uses: actions/setup-java@v1
20+
uses: actions/setup-java@v4
2121
with:
2222
java-version: 11
2323
java-package: jdk
24+
distribution: 'temurin'
2425

2526
- name: Set up Python 3.9
26-
uses: actions/setup-python@v2
27+
uses: actions/setup-python@v5
2728
with:
2829
python-version: 3.9
2930

@@ -33,14 +34,14 @@ jobs:
3334
pip install ghp-import
3435
3536
- name: Checkout NeuroML2
36-
uses: actions/checkout@v2
37+
uses: actions/checkout@v4
3738
with:
3839
repository: NeuroML/NeuroML2
3940
ref: development
4041
path: NeuroML2
4142

4243
- name: Checkout org.lemsml
43-
uses: actions/checkout@v2
44+
uses: actions/checkout@v4
4445
with:
4546
repository: LEMS/jLEMS
4647
ref: development
@@ -54,14 +55,14 @@ jobs:
5455
path: org.neuroml.model.injectingplugin
5556

5657
- name: Checkout org.neuroml.model
57-
uses: actions/checkout@v2
58+
uses: actions/checkout@v4
5859
with:
5960
repository: NeuroML/org.neuroml.model
6061
ref: development
6162
path: org.neuroml.model
6263

6364
- name: Checkout org.neuroml.export
64-
uses: actions/checkout@v2
65+
uses: actions/checkout@v4
6566
with:
6667
repository: NeuroML/org.neuroml.export
6768
ref: development

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ src/test/resources/tmp
3232

3333
biomodels
3434
Errors.txt
35+
/sbml-test-suite/

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>org.neuroml.import</groupId>
55
<artifactId>org.neuroml.import</artifactId>
66
<packaging>jar</packaging>
7-
<version>1.9.1</version>
7+
<version>1.10.1</version>
88
<name>org.neuroml.import</name>
99
<url>http://maven.apache.org</url>
1010
<repositories>
@@ -29,7 +29,7 @@
2929
<dependency>
3030
<groupId>org.neuroml.export</groupId>
3131
<artifactId>org.neuroml.export</artifactId>
32-
<version>1.9.1</version>
32+
<version>1.10.1</version>
3333
</dependency>
3434

3535
<dependency>
@@ -71,15 +71,15 @@
7171
&lt;br /&gt;
7272
&lt;br /&gt;
7373
</top>
74-
<bottom>Copyright NeuroML Contributors 2023</bottom>
74+
<bottom>Copyright NeuroML Contributors 2024</bottom>
7575
</configuration>
7676
</plugin>
7777
<plugin>
7878
<artifactId>maven-compiler-plugin</artifactId>
7979
<version>3.0</version>
8080
<configuration>
81-
<source>1.7</source>
82-
<target>1.7</target>
81+
<source>1.8</source>
82+
<target>1.8</target>
8383
</configuration>
8484
</plugin>
8585
</plugins>

runSBMLTestSuite.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#!/bin/bash
22

33

4-
if [ ! -d "sbmlTestSuite" ]; then
4+
if [ ! -d "sbml-test-suite" ]; then
55

66
echo ""
7-
echo "A copy of the SBML Test Suite needs to be checked out from Sourceforge. Try:"
7+
echo "A copy of the SBML Test Suite needs to be checked out from GitHub. Try:"
88
echo ""
9-
echo " mkdir sbmlTestSuite"
10-
echo " svn checkout https://svn.code.sf.net/p/sbml/code/trunk/test-suite/cases sbmlTestSuite/cases"
9+
echo " git clone https://github.com/sbmlteam/sbml-test-suite.git"
1110
echo ""
1211
exit 1
1312

src/main/java/org/neuroml/importer/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
public class Main
55
{
66

7-
public static String ORG_NEUROML_IMPORT_VERSION = "1.9.1";
7+
public static String ORG_NEUROML_IMPORT_VERSION = "1.10.1";
88
}

src/main/java/org/neuroml/importer/sbml/SBMLImporter.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,11 @@ public static Lems convertSBMLToLEMS(File sbmlFile, float simDuration, float sim
314314
newDim.setN(newDim.getN() + exponent * 1);
315315
} else if (kind.equals("second")) {
316316
newDim.setT(newDim.getT() + exponent * 1);
317+
} else if (kind.equals("volt")) {
318+
newDim.setM(newDim.getM() + exponent * 1);
319+
newDim.setL(newDim.getL() + exponent * 2);
320+
newDim.setT(newDim.getT() + exponent * -3);
321+
newDim.setI(newDim.getI() + exponent * -1);
317322
} else {
318323
//TODO: Add all unit kinds from section 4.4.2 in SBML specs: http://sbml.org/Documents/Specifications
319324
System.err.print("Add more unit definitions! Missing: "+kind);
@@ -831,7 +836,7 @@ else if (r.isAssignment()) {
831836
E.info(">>>> StateVariable "+sv);
832837
dyn.stateVariables.add(sv);
833838

834-
TimeDerivative td = new TimeDerivative(sv.getName(), "1");
839+
TimeDerivative td = new TimeDerivative(sv.getName(), timeScale.getName() + "* 1");
835840
dyn.timeDerivatives.add(td);
836841
}
837842

@@ -1209,7 +1214,7 @@ public static void main(String[] args) throws Exception
12091214

12101215

12111216

1212-
File sbmlTestSuiteDir = new File("sbmlTestSuite/cases/semantic/");
1217+
File sbmlTestSuiteDir = new File("sbml-test-suite/cases/semantic/");
12131218

12141219
boolean useSbmlTestSuite = sbmlTestSuiteDir.exists() && forceSBMLTestSuite;
12151220

@@ -1292,7 +1297,7 @@ public static void main(String[] args) throws Exception
12921297
while(testCase.length()<5) testCase ="0"+testCase;
12931298

12941299

1295-
sbmlFile = new File("sbmlTestSuite/cases/semantic/"+testCase+"/"+testCase+"-sbml-"+version+".xml");
1300+
sbmlFile = new File("sbml-test-suite/cases/semantic/"+testCase+"/"+testCase+"-sbml-"+version+".xml");
12961301
if (!sbmlFile.exists()){
12971302
E.info(" ---- File not found: "+sbmlFile.getAbsolutePath()+"!! ---- \n\n");
12981303
notFound++;

0 commit comments

Comments
 (0)