Skip to content

Commit 394dce4

Browse files
authored
Merge pull request #96 from NeuroML/development
Updates for NMLv2.3
2 parents 88f87c1 + f7ec707 commit 394dce4

File tree

25 files changed

+1028
-492
lines changed

25 files changed

+1028
-492
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Java CI with Maven
55

66
on:
77
push:
8-
branches: [ master, development, experimental, osb* ]
8+
branches: [ master, development, experimental, osb*, test* ]
99
pull_request:
10-
branches: [ master, development, experimental, osb* ]
10+
branches: [ master, development, experimental, osb*, test* ]
1111

1212
jobs:
1313
build_and_test:
@@ -16,14 +16,14 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
java: [ '8', '11', '16', '17']
20-
runs-on: [ubuntu-latest, macos-11, windows-2019 ]
19+
java: [ '8', '11', '16', '17', '19']
20+
runs-on: [ubuntu-latest, macos-latest, windows-2019 ]
2121

2222
name: Test on Java ${{ matrix.Java }} on ${{ matrix.runs-on }}
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
2525
- name: Set up JDK ${{ matrix.Java }}
26-
uses: actions/setup-java@v2
26+
uses: actions/setup-java@v3
2727
with:
2828
java-version: ${{ matrix.Java }}
2929
distribution: 'temurin'

.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@v3
1717
- uses: nelonoel/[email protected]
1818

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

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

@@ -33,29 +34,29 @@ jobs:
3334
pip install ghp-import
3435
3536
- name: Checkout NeuroML2
36-
uses: actions/checkout@v2
37+
uses: actions/checkout@v3
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@v3
4445
with:
4546
repository: LEMS/jLEMS
4647
ref: development
4748
path: jLEMS
4849

4950

5051
- name: Checkout org.neuroml.model.injectingplugin
51-
uses: actions/checkout@v2
52+
uses: actions/checkout@v3
5253
with:
5354
repository: NeuroML/org.neuroml.model.injectingplugin
5455
ref: development
5556
path: org.neuroml.model.injectingplugin
5657

5758
- name: Checkout org.neuroml.model
58-
uses: actions/checkout@v2
59+
uses: actions/checkout@v3
5960
with:
6061
repository: NeuroML/org.neuroml.model
6162
ref: development

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@ src/test/resources/examples/*nrn.py
4444
/Test.gv
4545
/Test.png
4646
/src/test/resources/examples/report*.txt
47+
/.classpath
48+
/.project
49+
/.settings

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Export from NeuroML & LEMS
22
==========================
33

4-
[![Java CI with Maven](https://github.com/NeuroML/org.neuroml.export/actions/workflows/ci.yml/badge.svg)](https://github.com/NeuroML/org.neuroml.export/actions/workflows/ci.yml)
4+
[![Java CI with Maven](https://github.com/NeuroML/org.neuroml.export/actions/workflows/ci.yml/badge.svg)](https://github.com/NeuroML/org.neuroml.export/actions/workflows/ci.yml) [![Publish Javadocs](https://github.com/NeuroML/org.neuroml.export/actions/workflows/docs.yml/badge.svg)](https://github.com/NeuroML/org.neuroml.export/actions/workflows/docs.yml)
5+
56
[![GitHub](https://img.shields.io/github/license/NeuroML/org.neuroml.export)](https://github.com/NeuroML/org.neuroml.export/blob/master/LICENSE.lesser)
67
[![GitHub pull requests](https://img.shields.io/github/issues-pr/NeuroML/org.neuroml.export)](https://github.com/NeuroML/org.neuroml.export/pulls)
78
[![GitHub issues](https://img.shields.io/github/issues/NeuroML/org.neuroml.export)](https://github.com/NeuroML/org.neuroml.export/issues)

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>org.neuroml.export</groupId>
55
<artifactId>org.neuroml.export</artifactId>
66
<packaging>bundle</packaging>
7-
<version>1.8.1</version>
7+
<version>1.9.1</version>
88
<name>org.neuroml.export</name>
99
<url>http://maven.apache.org</url>
1010

@@ -18,12 +18,12 @@
1818
<dependency>
1919
<groupId>org.neuroml.model</groupId>
2020
<artifactId>org.neuroml.model</artifactId>
21-
<version>1.8.1</version>
21+
<version>1.9.1</version>
2222
</dependency>
2323
<dependency>
2424
<groupId>org.lemsml</groupId>
2525
<artifactId>jlems</artifactId>
26-
<version>0.10.6</version>
26+
<version>0.10.8</version>
2727
</dependency>
2828
<dependency>
2929
<groupId>org.apache.velocity</groupId>
@@ -49,7 +49,7 @@
4949
&lt;br /&gt;
5050
&lt;br /&gt;
5151
</top>
52-
<bottom>Copyright NeuroML Contributors 2021</bottom>
52+
<bottom>Copyright NeuroML Contributors 2023</bottom>
5353
</configuration>
5454
</plugin>
5555
<plugin>

src/main/java/org/lemsml/export/sedml/SEDMLWriter.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.neuroml.export.utils.support.ModelFeature;
2323
import org.neuroml.model.util.NeuroMLException;
2424
import org.neuroml.export.utils.support.SupportLevelInfo;
25+
import org.neuroml.export.sbml.SBMLWriter;
2526

2627
public class SEDMLWriter extends AXMLWriter
2728
{
@@ -274,24 +275,31 @@ public static void main(String[] args) throws Exception, ModelFeatureSupportExce
274275
ArrayList<File> lemsFiles = new ArrayList<File>();
275276

276277

277-
lemsFiles.add(new File("../neuroConstruct/osb/cerebral_cortex/networks/ACnet2/neuroConstruct/generatedNeuroML2/LEMS_TwoCell.xml"));
278+
//lemsFiles.add(new File("../neuroConstruct/osb/cerebral_cortex/networks/ACnet2/neuroConstruct/generatedNeuroML2/LEMS_TwoCell.xml"));
278279
//lemsFiles.add(new File("../OpenCortex/examples/LEMS_ACNet.xml"));
279280

280281
//lemsFiles.add(new File("../OpenCortex/examples/LEMS_SpikingNet.xml"));
281282
//lemsFiles.add(new File("../OpenCortex/examples/LEMS_SimpleNet.xml"));
282283
lemsFiles.add(new File("../neuroConstruct/osb/showcase/SBMLShowcase/NeuroML2/LEMS_NML2_Ex9_FN.xml"));
284+
lemsFiles.add(new File("../neuroConstruct/osb/generic/HindmarshRose1984/NeuroML2/LEMS_Regular_HindmarshRose.xml"));
283285

284286

285287
SEDMLWriter nw;
286288
for(File lemsFile : lemsFiles)
287289
{
288290
Lems lems = Utils.readLemsNeuroMLFile(lemsFile.getAbsoluteFile()).getLems();
289-
nw = new SEDMLWriter(lems, lemsFile.getParentFile(), lemsFile.getName().replaceAll(".xml", ".sedml"), lemsFile.getName(), Format.SBML);
290291

292+
SBMLWriter sbmlw = new SBMLWriter(lems, lemsFile.getParentFile(), lemsFile.getName().replaceAll(".xml", ".sbml"));
293+
for(File genFile : sbmlw.convert())
294+
{
295+
System.out.println("Generated SBML: " + genFile.getAbsolutePath());
296+
}
297+
298+
nw = new SEDMLWriter(lems, lemsFile.getParentFile(), lemsFile.getName().replaceAll(".xml", ".sedml"), lemsFile.getName(), Format.SBML);
291299
List<File> ff = nw.convert();
292300
for(File f : ff)
293301
{
294-
System.out.println("Generated sed-ml: " + f.getCanonicalPath());
302+
System.out.println("Generated SED-ML: " + f.getCanonicalPath());
295303
}
296304

297305
}

0 commit comments

Comments
 (0)