Skip to content

Commit

Permalink
Merge pull request #26 from NeuroML/development
Browse files Browse the repository at this point in the history
Changes for NeuroML v2.3.1 release
  • Loading branch information
pgleeson authored Aug 20, 2024
2 parents 20811d3 + ebd7276 commit 5cd8bb0
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 24 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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@v2
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.Java }}
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.Java }}
distribution: 'temurin'
Expand Down Expand Up @@ -117,3 +122,14 @@ jobs:
pwd
mvn install
mvn dependency:tree
- name: Run SBML test suite
if: ${{ matrix.runs-on == 'ubuntu-latest' }}
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
15 changes: 8 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ src/test/resources/tmp

biomodels
Errors.txt
/sbml-test-suite/
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>org.neuroml.import</groupId>
<artifactId>org.neuroml.import</artifactId>
<packaging>jar</packaging>
<version>1.9.1</version>
<version>1.10.1</version>
<name>org.neuroml.import</name>
<url>http://maven.apache.org</url>
<repositories>
Expand All @@ -29,7 +29,7 @@
<dependency>
<groupId>org.neuroml.export</groupId>
<artifactId>org.neuroml.export</artifactId>
<version>1.9.1</version>
<version>1.10.1</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -71,15 +71,15 @@
&lt;br /&gt;
&lt;br /&gt;
</top>
<bottom>Copyright NeuroML Contributors 2023</bottom>
<bottom>Copyright NeuroML Contributors 2024</bottom>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
Expand Down
7 changes: 3 additions & 4 deletions runSBMLTestSuite.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/neuroml/importer/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.1";
}
11 changes: 8 additions & 3 deletions src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -831,7 +836,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);
}

Expand Down Expand Up @@ -1209,7 +1214,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;

Expand Down Expand Up @@ -1292,7 +1297,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++;
Expand Down

0 comments on commit 5cd8bb0

Please sign in to comment.