Skip to content

Commit

Permalink
Merge pull request #86 from NeuroML/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 f953e6e + fef14db commit 99002b9
Show file tree
Hide file tree
Showing 13 changed files with 192 additions and 123 deletions.
26 changes: 0 additions & 26 deletions .classpath

This file was deleted.

89 changes: 89 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# 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: Install using getNeuroML.py (non Win)
if: ${{ matrix.runs-on != 'windows-latest' }}
run: |
export main_repo_branch=${{env.main_repo_branch}}
if [[ ${main_repo_branch} != "master" && ${main_repo_branch} != "development" && ${main_repo_branch} != "experimental" && ${main_repo_branch} != *"osb"* ]]; then main_repo_branch=development ; fi
echo Using branch $main_repo_branch
python getNeuroML.py $main_repo_branch -dont_switch_jneuroml_branch # will call mvn install on this & other repos
mvn dependency:tree
./jnml -v
- name: Install using getNeuroML.py (Win)
if: ${{ matrix.runs-on == 'windows-latest' }}
run: |
$env:main_repo_branch=$env:GITHUB_REF_NAME
if ( $env:main_repo_branch -ne "master" -and $env:main_repo_branch -ne "development" -and $env:main_repo_branch -ne "experimental" -and $env:main_repo_branch -notlike '*osb*' ) { $env:main_repo_branch="development" }
echo "Using branch $env:main_repo_branch..."
python getNeuroML.py $env:main_repo_branch -dont_switch_jneuroml_branch # will call mvn install on this & other repos
mvn dependency:tree
.\jnml.bat -v
- name: Further tests (non Win)
if: ${{ matrix.runs-on != 'windows-latest' }}
run: |
pwd
ls -alt
mkdir results
./jnml -validate ../NeuroML2/examples/NML2_FullNeuroML.nml # Test validate
./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -nogui # Test running with jLEMS
./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex5_DetCell.xml -nogui
./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -neuron
./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -brian
./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -sedml
./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -cvode
./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -matlab
./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -dlems
./jnml ../NeuroML2/LEMSexamples/regression-tests/LEMS_NML2_Ex5_DetCell_unformatted.xml -nogui
./jnml ../NeuroML2/examples/NML2_SimpleMorphology.nml -svg
ls -alt ../NeuroML2/examples
ls -alt ../NeuroML2/LEMSexamples
- name: Further tests (Win)
if: ${{ matrix.runs-on == 'windows-latest' }}
run: |
pwd
mkdir results
.\jnml.bat -validate ..\NeuroML2\examples\NML2_FullNeuroML.nml # Test validate
.\jnml.bat ..\NeuroML2\LEMSexamples\LEMS_NML2_Ex9_FN.xml -nogui # Test running with jLEMS
.\jnml.bat ..\NeuroML2\LEMSexamples\LEMS_NML2_Ex5_DetCell.xml -nogui
.\jnml.bat ..\NeuroML2\LEMSexamples\LEMS_NML2_Ex9_FN.xml -neuron
.\jnml.bat ..\NeuroML2\LEMSexamples\LEMS_NML2_Ex9_FN.xml -brian
.\jnml.bat ..\NeuroML2\LEMSexamples\LEMS_NML2_Ex9_FN.xml -sedml
.\jnml.bat ..\NeuroML2\LEMSexamples\LEMS_NML2_Ex9_FN.xml -cvode
.\jnml.bat ..\NeuroML2\LEMSexamples\LEMS_NML2_Ex9_FN.xml -matlab
.\jnml.bat ..\NeuroML2\LEMSexamples\LEMS_NML2_Ex9_FN.xml -dlems
.\jnml.bat ..\NeuroML2\LEMSexamples\regression-tests\LEMS_NML2_Ex5_DetCell_unformatted.xml -nogui
.\jnml.bat ..\NeuroML2\examples\NML2_SimpleMorphology.nml -svg
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ src/main/java/META-INF/MANIFEST.MF
.DS_Store
*.*~
*.log
.classpath
.factorypath
.project
.settings/
23 changes: 0 additions & 23 deletions .project

This file was deleted.

4 changes: 0 additions & 4 deletions .settings/org.eclipse.core.resources.prefs

This file was deleted.

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

This file was deleted.

4 changes: 0 additions & 4 deletions .settings/org.eclipse.m2e.core.prefs

This file was deleted.

22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
jNeuroML
========

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4627568.svg)](https://doi.org/10.5281/zenodo.4627568)
[![Java CI with Maven](https://github.com/NeuroML/jNeuroML/actions/workflows/ci.yml/badge.svg)](https://github.com/NeuroML/jNeuroML/actions/workflows/ci.yml)
[![GitHub](https://img.shields.io/github/license/NeuroML/jNeuroML)](https://github.com/NeuroML/jNeuroML/blob/master/LICENSE.lesser)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/NeuroML/jNeuroML)](https://github.com/NeuroML/jNeuroML/pulls)
[![GitHub issues](https://img.shields.io/github/issues/NeuroML/jNeuroML)](https://github.com/NeuroML/jNeuroML/issues)
[![GitHub Org's stars](https://img.shields.io/github/stars/NeuroML?style=social)](https://github.com/NeuroML)
[![Twitter Follow](https://img.shields.io/twitter/follow/NeuroML?style=social)](https://twitter.com/NeuroML)
[![Gitter](https://badges.gitter.im/NeuroML/community.svg)](https://gitter.im/NeuroML/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)


There are a number of repositories in active development under GitHub for handling [NeuroML](https://github.com/NeuroML)
and [LEMS](https://github.com/LEMS) with Java. To make it easier to access all of this functionality, we've created a single package, jNeuroML, which allows access to most of this functionality through a simple command line interface and requires minimal installation.
There are a number of repositories in active development under GitHub for handling [NeuroML](https://github.com/NeuroML)
and [LEMS](https://github.com/LEMS) with Java. To make it easier to access all of this functionality, we've created a single package, jNeuroML, which allows access to most of this functionality through a simple command line interface and requires minimal installation.

jNeuroML can:

Expand Down Expand Up @@ -51,8 +54,8 @@ Typing *./jnml* (or *jnml.bat* on Windows) will list the options available. Some
./jnml MyLEMS.xml -graph (generate png of structure of LEMS model using GraphViz)
./jnml MyLEMS.xml -neuron (generate code to run on the NEURON simulator)

Export and import features for [NEURON](http://www.neuron.yale.edu/neuron/), [SBML](http://sbml.org),
[Brian](http://www.briansimulator.org/) etc. are under active development (see https://github.com/NeuroML/org.neuroml.export
Export and import features for [NEURON](http://www.neuron.yale.edu/neuron/), [SBML](http://sbml.org),
[Brian](http://www.briansimulator.org/) etc. are under active development (see https://github.com/NeuroML/org.neuroml.export
and https://github.com/NeuroML/org.neuroml.import).

**Note:**
Expand All @@ -63,35 +66,34 @@ Adding the environment variable *JNML_HOME*, pointing to the *jNeuroML* folder,
Getting the source for jNeuroML
-------------------------------

If you prefer to clone all of the individual repositories and build the jNeuroML application yourself,
If you prefer to clone all of the individual repositories and build the jNeuroML application yourself,
use the [getNeuroML.py](https://github.com/NeuroML/jNeuroML/blob/master/getNeuroML.py) utility in the jNeuroML repo:

git clone git://github.com/NeuroML/jNeuroML.git neuroml_dev/jNeuroML
cd neuroml_dev/jNeuroML
python getNeuroML.py

This will clone ~11 repos for NML2 & LEMS (including Python based libraries) into *neuroml_dev/* and compile
This will clone ~11 repos for NML2 & LEMS (including Python based libraries) into *neuroml_dev/* and compile
the Java based ones using Maven (download [here](http://maven.apache.org/) or use package managers for Linux (e.g. apt-get install maven) or Mac (brew install maven)). The full process may take 5-10 mins on first installation, but subsequently running:

git pull
python getNeuroML.py

in the jNeuroML folder will get the stable version of each repo & compile using Maven if necessary.
in the jNeuroML folder will get the stable version of each repo & compile using Maven if necessary.

**To access the very latest version** (the [development](https://github.com/NeuroML/jNeuroML/tree/development) branches of the GitHub repos) use:

python getNeuroML.py clean
python getNeuroML.py development

Use of Maven is a great way to manage versions of applications being developed in distributed repositories,
and will make it easy to use selected parts of this for different Java applications. For example, these packages
Use of Maven is a great way to manage versions of applications being developed in distributed repositories,
and will make it easy to use selected parts of this for different Java applications. For example, these packages
will be used in various ways to provide NeuroML/LEMS support in [neuroConstruct](http://www.neuroConstruct.org) and for handling NeuroML on the [Open Source Brain website](http://www.OpenSourceBrain.org).

Prefer Python?
--------------

If you prefer using/installing/coding in Python, try out [pyNeuroML](https://github.com/NeuroML/pyNeuroML). Much of the functionality of jNeuroML is bundled inside pyNeuroML and can be accessed with a command line utility (*pynml*) with similar usage as *jnml*.

[![Build Status](https://travis-ci.com/NeuroML/jNeuroML.png?branch=master)](https://travis-ci.com/NeuroML/jNeuroML)

This code is distributed under the terms of the GNU Lesser General Public License.
Loading

0 comments on commit 99002b9

Please sign in to comment.