Skip to content

Commit

Permalink
Merge pull request #101 from LEMS/development
Browse files Browse the repository at this point in the history
NeuroML 2.2 release
  • Loading branch information
pgleeson authored Dec 16, 2021
2 parents 5802083 + 564d80a commit 5b391a3
Show file tree
Hide file tree
Showing 19 changed files with 258 additions and 207 deletions.
29 changes: 0 additions & 29 deletions .classpath

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
branches: [ master, development, experimental, osb* ]
pull_request:
branches: [ master, development, experimental, osb* ]

jobs:
build_and_test:

runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
java: [ '8', '11', '16', '17' ]
runs-on: [ubuntu-latest, macos-11, windows-latest]

name: Test on Java ${{ matrix.Java }} on ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.Java }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.Java }}
distribution: 'adopt'
- name: Test with Maven
run: mvn install
- name: Further tests, non Win
if: ${{ matrix.runs-on != 'windows-latest' }}
run: |
pwd
ls -alt
mvn dependency:tree
./lems src/test/resources/example1.xml -nogui
./lems src/test/resources/example2.xml -nogui
./lems src/test/resources/example3.xml -nogui
./lems src/test/resources/example4.xml -nogui
./lems src/test/resources/example5.xml -nogui
./lems src/test/resources/example6.xml -nogui
./lems src/test/resources/example7.xml -nogui
./lems src/test/resources/example8.xml -nogui
./lems src/test/resources/bounce-conditional.xml -nogui
./lems src/test/resources/bounce.xml -nogui
./lems src/test/resources/ex-flat.xml -nogui
./lems src/test/resources/test_regime_iaf.xml -nogui
./lems src/test/resources/ex-properties.xml -nogui
- name: Further tests, Windows
if: ${{ matrix.runs-on == 'windows-latest' }}
run: |
pwd
dir
mvn dependency:tree
./lems.bat src\test\resources\example1.xml -nogui
./lems.bat src\test\resources\eexample2.xml -nogui
./lems.bat src\test\resources\example3.xml -nogui
./lems.bat src\test\resources\example4.xml -nogui
./lems.bat src\test\resources\example5.xml -nogui
./lems.bat src\test\resources\example6.xml -nogui
./lems.bat src\test\resources\example7.xml -nogui
./lems.bat src\test\resources\example8.xml -nogui
./lems.bat src\test\resources\bounce-conditional.xml -nogui
./lems.bat src\test\resources\bounce.xml -nogui
./lems.bat src\test\resources\ex-flat.xml -nogui
./lems.bat src\test\resources\test_regime_iaf.xml -nogui
./lems.bat src\test\resources\ex-properties.xml -nogui
37 changes: 37 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Check that examples are same in LEMS and in jlems
name: Check LEMS examples

on:
push:
branches: [ master, development, experimental ]

jobs:
verify:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: nelonoel/branch-name@v1.0.1

# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Checkout lems
uses: actions/checkout@v2
with:
repository: LEMS/LEMS
ref: ${{ steps.extract_branch.outputs.branch }}
path: LEMS

- name: check examples
run: |
for ex in "example1.xml" "example2.xml" "example3.xml" "example4.xml" "example5.xml" "example6.xml" "example7.xml" "example8.xml" "SimpleNetwork.xml" "SingleSimulation.xml" "elecdims.xml" "ex2dims.xml" "hhaltgate.xml" "hhcell.xml" "hhchannel.xml" "hhmodels.xml" "misciaf.xml" "spikegenerators.xml"; do
if ! diff -ur "LEMS/examples/$ex" "src/test/resources/$ex" ; then
echo "Example file $ex is not identical"
exit -1
fi
done
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ tst.txt
.DS_Store
src/main/java/META-INF
/nb-configuration.xml
.classpath
.project
.settings/
30 changes: 0 additions & 30 deletions .project

This file was deleted.

12 changes: 0 additions & 12 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

4 changes: 0 additions & 4 deletions .settings/org.eclipse.wst.common.project.facet.core.xml

This file was deleted.

10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
jLEMS
=====

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3550993.svg)](https://doi.org/10.5281/zenodo.3550993)
[![Java CI with Maven](https://github.com/LEMS/jLEMS/actions/workflows/ci.yml/badge.svg)](https://github.com/LEMS/jLEMS/actions/workflows/ci.yml)

Java Interpreter for the Low Entropy Model Specification language.

See https://docs.neuroml.org/Userdocs/Software/jLEMS.html
See https://docs.neuroml.org/Userdocs/Software/jLEMS.html.

For more details on LEMS see:

Expand All @@ -28,9 +31,4 @@ Run an example:
./lems src/test/resources/example1.xml (Linux/Mac)
lems.bat src\test\resources\example1.xml (Windows)

[![Build Status](https://travis-ci.com/LEMS/jLEMS.png?branch=master)](https://travis-ci.com/LEMS/jLEMS)
[![DOI](https://www.zenodo.org/badge/4614078.svg)](https://www.zenodo.org/badge/latestdoi/4614078)



This software is distributed under the terms of the MIT License.
2 changes: 1 addition & 1 deletion lems
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

export LEMS_VERSION=0.10.4
export LEMS_VERSION=0.10.6

export CLASSPATH=.:./target/jlems-$LEMS_VERSION.jar:$LEMS_HOME/target/jlems-$LEMS_VERSION.jar

Expand Down
2 changes: 1 addition & 1 deletion lems.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off

set LEMS_VERSION=0.10.4
set LEMS_VERSION=0.10.6

set CLASSPATH=target\jlems-%LEMS_VERSION%.jar;%LEMS_HOME%\target\jlems-%LEMS_VERSION%.jar

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.lemsml</groupId>
<artifactId>jlems</artifactId>
<version>0.10.4</version>
<version>0.10.6</version>
<packaging>bundle</packaging>
<dependencies>
<dependency>
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/org/lemsml/jlems/core/reader/LemsFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,8 @@ private DerivedParameter buildDerivedParameter(XMLElement xel) {
ret.name = parseString(xv);
} else if (xn.equals("dimension")) {
ret.dimension = parseString(xv);
} else if (xn.equals("description")) {
ret.description = parseString(xv);
} else if (xn.equals("select")) {
ret.select = parseString(xv);
} else if (xn.equals("value")) {
Expand Down Expand Up @@ -762,6 +764,8 @@ private Child buildChild(XMLElement xel) {
ret.name = parseString(xv);
} else if (xn.equals("type")) {
ret.type = parseString(xv);
} else if (xn.equals("description")) {
ret.description = parseString(xv);
} else if (xn.equals("substitute")) {
ret.substitute = parseString(xv);
} else {
Expand Down Expand Up @@ -837,6 +841,8 @@ private ComponentReference buildComponentReference(XMLElement xel) {
ret.name = parseString(xv);
} else if (xn.equals("type")) {
ret.type = parseString(xv);
} else if (xn.equals("description")) {
ret.description = parseString(xv);
} else if (xn.equals("root")) {
ret.root = parseString(xv);
} else if (xn.equals("isAny")) {
Expand Down Expand Up @@ -946,6 +952,8 @@ private Text buildText(XMLElement xel) {
if (xn.equals("UNUSED")) {
} else if (xn.equals("name")) {
ret.name = parseString(xv);
} else if (xn.equals("description")) {
ret.description = parseString(xv);
} else {
E.warning("Unrecognized attribute " + xa + " " + xv);
}
Expand All @@ -965,6 +973,8 @@ private Path buildPath(XMLElement xel) {
if (xn.equals("UNUSED")) {
} else if (xn.equals("name")) {
ret.name = parseString(xv);
} else if (xn.equals("description")) {
ret.description = parseString(xv);
} else {
E.warning("Unrecognized attribute " + xa + " " + xv);
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/lemsml/jlems/core/type/Child.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class Child implements Named {

public String substitute;

public String description;


public Child() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class ComponentReference implements Named {

@ModelProperty(info="Target type")
public String type;
public String description;
public ComponentType r_type;

public String root;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class DerivedParameter extends ExpressionValued implements Named {

public String name;
public String dimension;
public String description;
public Dimension r_dimension;

@ModelProperty(info="Path to the parameter that supplies the value. Exactly one of 'select' and 'value' is required.")
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/lemsml/jlems/core/type/Path.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ public class Path implements Named {
@ModelProperty(info="")
public String name;

public String description;

public Path() {
// TODO - only one
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/lemsml/jlems/core/type/Text.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class Text implements Named {
@ModelProperty(info="")
public String name;

public String description;

public Text() {
// empty
Expand Down
Loading

0 comments on commit 5b391a3

Please sign in to comment.