From c45ba7bac61460b2c81462ef0ef994a51ede9a78 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Wed, 10 Nov 2021 14:47:41 +0000 Subject: [PATCH 01/17] Add ci --- .github/ISSUE_TEMPLATE/bug_report.md | 28 ++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++ .github/workflows/ci.yml | 52 ++++++++++ .github/workflows/docs.yml | 116 ++++++++++++++++++++++ 4 files changed, 216 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/docs.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..11a491e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,28 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior, for example the command you used. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Observed behavior** + +**System information:** + - OS: [e.g. iOS] + - Java version (`java -version`) + - Version of tools in use (from `jnml -h`) + + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..11fc491 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0ab1cc8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +# 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: ubuntu-latest + strategy: + matrix: + java: [ '8' ] # only java 8 for experimental branch... + + name: Test on Java ${{ matrix.Java }} + 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 org.neuroml.model.injectingplugin + run: | + export main_repo_branch=${GITHUB_REF##*/} + echo Using branch $main_repo_branch + python getNeuroML.py $main_repo_branch # will call mvn install on this & other repos + mvn dependency:tree + ./jnml -v + + - name: Further tests + 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/examples/NML2_SimpleMorphology.nml -svg + ls -alt ../NeuroML2/examples + ls -alt ../NeuroML2/LEMSexamples diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..fdf1f45 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,116 @@ +# 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: Publish Javadocs + +on: + push: + branches: [ development ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: nelonoel/branch-name@v1.0.1 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + java-package: jdk + + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install GH import + run: | + python -m pip install --upgrade pip + pip install ghp-import + + - name: Checkout NeuroML2 + uses: actions/checkout@v2 + with: + repository: NeuroML/NeuroML2 + ref: development + path: NeuroML2 + + - name: Checkout org.lemsml + uses: actions/checkout@v2 + with: + repository: LEMS/jLEMS + ref: development + path: jLEMS + + - name: Checkout org.neuroml.model.injectingplugin + uses: actions/checkout@v2 + with: + repository: NeuroML/org.neuroml.model.injectingplugin + ref: development + path: org.neuroml.model.injectingplugin + + - name: Checkout org.neuroml1.model + uses: actions/checkout@v2 + with: + repository: NeuroML/org.neuroml1.model + ref: development + path: org.neuroml1.model + + - name: Checkout org.neuroml.model + uses: actions/checkout@v2 + with: + repository: NeuroML/org.neuroml.model + ref: development + path: org.neuroml.model + + - name: Checkout org.neuroml.export + uses: actions/checkout@v2 + with: + repository: NeuroML/org.neuroml.export + ref: development + path: org.neuroml.export + + - name: Checkout org.neuroml.import + uses: actions/checkout@v2 + with: + repository: NeuroML/org.neuroml.import + ref: development + path: org.neuroml.import + + + - name: Install NeuroML deps + run: | + pushd jLEMS + mvn install + popd + pushd NeuroML2 + mvn install + popd + pushd org.neuroml.model.injectingplugin + mvn install + popd + pushd org.neuroml1.model + mvn install + popd + pushd org.neuroml.model + mvn install + popd + pushd org.neuroml.export + mvn install + popd + pushd org.neuroml.import + mvn install + popd + + - name: Build docs + run: | + mvn javadoc:javadoc + + - name: Publish documentation on GH pages + run: | + ghp-import -f -m "Regenerate documentation" -b gh-pages -n -p target/site/apidocs + From 018f17799bd5f94c0883130ba726c8e594b4023a Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Wed, 10 Nov 2021 14:54:26 +0000 Subject: [PATCH 02/17] Improved ci.yml --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ab1cc8..efbd233 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,13 +25,11 @@ jobs: with: java-version: ${{ matrix.Java }} distribution: 'adopt' - - name: Install org.neuroml.model.injectingplugin + - name: Install jNeuroML run: | export main_repo_branch=${GITHUB_REF##*/} echo Using branch $main_repo_branch python getNeuroML.py $main_repo_branch # will call mvn install on this & other repos - mvn dependency:tree - ./jnml -v - name: Further tests run: | @@ -50,3 +48,9 @@ jobs: ./jnml ../NeuroML2/examples/NML2_SimpleMorphology.nml -svg ls -alt ../NeuroML2/examples ls -alt ../NeuroML2/LEMSexamples + + + - name: Version info + run: | + mvn dependency:tree + ./jnml -v From f8acda637d1dae83db6fc83b6a26a9b5e9d5d392 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Tue, 16 Nov 2021 13:45:32 +0000 Subject: [PATCH 03/17] Improved getneuroml --- getNeuroML.py | 115 +++++++++++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 49 deletions(-) diff --git a/getNeuroML.py b/getNeuroML.py index d55ba1a..589670c 100644 --- a/getNeuroML.py +++ b/getNeuroML.py @@ -4,6 +4,8 @@ import sys import os.path as op import subprocess +from textwrap import dedent + def main(): """Main""" @@ -21,6 +23,8 @@ def main(): switch_to_branch = "experimental" elif arg == "master": switch_to_branch = "master" + elif "osb" in arg: + switch_to_branch = arg else: help_info() exit() @@ -48,11 +52,9 @@ def main(): lems_repos = jlems_repo + lems_spec_repos + pylems_repos # Which repos use a development branch? - dev_branch_repos = neuroml2_spec_repo + neuroml_repos + jlems_repo - - - all_repos = lems_repos + neuroml_repos + dev_branch_repos = neuroml2_spec_repo + java_neuroml_repos + jlems_repo + all_repos = lems_repos + neuroml_repos # Set the preferred method for cloning from GitHub github_pref = "HTTP" @@ -68,23 +70,22 @@ def main(): local_dir = ".." + os.sep + repo.split("/")[1] - if mode is "clean": - print("------ Cleaning: %s -------"%repo) + if mode == "clean": + print("------ Cleaning: %s -------" % repo) if repo in java_repos: command = "mvn clean" print("It's a Java repository, so cleaning using Maven...") info = execute_command_in_dir(command, local_dir) - if mode is "update": - - print("------ Updating: %s -------" %repo) + if mode == "update": + print("------ Updating: %s -------" % repo) runMvnInstall = False if not op.isdir(local_dir): command = "git clone %s%s" % (pre_gh[github_pref], repo) - print ("Creating a new directory: %s by cloning from GitHub" % \ - (local_dir)) + print("Creating a new directory: %s by cloning from GitHub" % + (local_dir)) execute_command_in_dir(command, "..") runMvnInstall = True @@ -92,8 +93,8 @@ def main(): if switch_to_branch: if (repo in dev_branch_repos): command = "git checkout %s" % (switch_to_branch) - print ("Switching to branch: %s" % (switch_to_branch)) - exit_on_fail = switch_to_branch is not "experimental" + print("Switching to branch: %s" % (switch_to_branch)) + exit_on_fail = switch_to_branch != "experimental" execute_command_in_dir(command, local_dir, exit_on_fail) runMvnInstall = True @@ -107,56 +108,57 @@ def main(): or not op.isdir(local_dir + os.sep + "target") \ or ("jNeuroML" in repo) - if (repo in java_repos or repo in neuroml2_spec_repo) and runMvnInstall: + if (repo in java_repos or repo in neuroml2_spec_repo) \ + and runMvnInstall: command = "mvn install" print("It's a Java repository, so installing using Maven...") info = execute_command_in_dir(command, local_dir) - #The code below needs a non trivial rewrite due to python3 differences. - - # + # The code below needs a non trivial rewrite due to python3 + # differences. if str("BUILD SUCCESS") in str(info): - print("Successful installation using : %s!" %command) + print("Successful installation using : %s!" % command) else: - print("Problem installing using : %s!" %command) + print("Problem installing using : %s!" % command) print(info) exit(1) - if mode is "update": + if mode == "update": print("All repositories successfully updated & Java modules built!") - print("You should be able to run some examples straight " \ - "away using jnml: ") - if os.name is not 'nt': - print(" ./jnml "\ - "-validate ../NeuroML2/examples/NML2_FullNeuroML.nml") - print(" ./jnml " \ - "../NeuroML2/LEMSexamples/LEMS_NML2_Ex2_Izh.xml") + print("You should be able to run examples straight away using jnml: ") + if os.name != 'nt': + print(" ./jnml " + + "-validate ../NeuroML2/examples/NML2_FullNeuroML.nml") + print(" ./jnml " + + "../NeuroML2/LEMSexamples/LEMS_NML2_Ex2_Izh.xml") else: - print(" jnml -validate " \ - "..\\NeuroML2\\examples\\NML2_FullNeuroML.nml") - print(" jnml " \ - "..\\NeuroML2\\LEMSexamples\\LEMS_NML2_Ex2_Izh.xml") - if mode is "clean": + print(" jnml -validate " + + "..\\NeuroML2\\examples\\NML2_FullNeuroML.nml") + print(" jnml " + + "..\\NeuroML2\\LEMSexamples\\LEMS_NML2_Ex2_Izh.xml") + if mode == "clean": print("All repositories successfully cleaned!") - - def execute_command_in_dir(command, directory, exit_on_fail=True): """Execute a command in specific working directory""" if os.name == 'nt': directory = os.path.normpath(directory) - print(">>> Executing: (%s) in dir: %s (%s)" % (command, directory, os.path.abspath(directory))) + print(">>> Executing: (%s) in dir: %s (%s)" % + (command, directory, os.path.abspath(directory))) - p = subprocess.Popen(command, cwd=directory, shell=True, stdout=subprocess.PIPE) + p = subprocess.Popen(command, cwd=directory, shell=True, + stdout=subprocess.PIPE) return_str = p.communicate() - if p.returncode != 0: - print("Error: %s" % p.returncode) - print(return_str[0]) - if exit_on_fail: + if p.returncode != 0: + + print("Error: %s" % p.returncode) + print(return_str[0].decode("utf-8") if sys.version_info[0]>=3 else return_str[0]) + if exit_on_fail: exit(p.returncode) + if (sys.version_info > (3, 0)): return return_str[0].decode("utf-8") else: @@ -164,15 +166,30 @@ def execute_command_in_dir(command, directory, exit_on_fail=True): def help_info(): - print("\nUsage:\n\n python getNeuroML.py\n " \ - "Pull (or clone) the latest version of all NeuroML 2 repos & " \ - "compile/install with Maven if applicable\n\n" \ - " python getNeuroML.py clean\n " - "Run 'mvn clean' on all Java repos\n\n" \ - " python getNeuroML.py master\n " \ - "Switch all repos to master branch\n\n" \ - " python getNeuroML.py development\n " \ - "Switch relevant repos to development branch\n\n") + usage = ( + """\ + Usage: python getNeuroML.py [OPTION] + Script to install NeuroML libraries. + Note: requires internet connectivity. + + python getNeuroML.py + Pull (or clone) the latest version of all NeuroML 2 repos & + compile/install with Maven if applicable + + python getNeuroML.py clean + Run 'mvn clean' on all Java repos + + python getNeuroML.py master + Switch all repos to master branch + + python getNeuroML.py development + Switch relevant repos to development branch + + python getNeuroML.py experimental + Switch relevant repos to experimental branch + """ + ) + print(dedent(usage)) if __name__ == "__main__": From 9938d85f40866ceaa6952dca32065d150fea1fef Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Fri, 8 Apr 2022 11:06:33 +0100 Subject: [PATCH 04/17] Scope of log4j should be compile/run --- pom.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pom.xml b/pom.xml index b647565..3441a9f 100644 --- a/pom.xml +++ b/pom.xml @@ -37,13 +37,11 @@ org.apache.logging.log4j log4j-1.2-api 2.17.1 - test org.apache.logging.log4j log4j-slf4j-impl 2.17.1 - test From 1e9e281de75c2268a1cd52ce53cab984254d1408 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Tue, 26 Apr 2022 12:17:47 +0100 Subject: [PATCH 05/17] Initial EDEN export --- src/main/java/org/neuroml/JNeuroML.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/main/java/org/neuroml/JNeuroML.java b/src/main/java/org/neuroml/JNeuroML.java index 7cf726e..c293a31 100644 --- a/src/main/java/org/neuroml/JNeuroML.java +++ b/src/main/java/org/neuroml/JNeuroML.java @@ -32,6 +32,7 @@ import org.neuroml.export.info.InfoWriter; import org.neuroml.export.nest.NestWriter; import org.neuroml.export.moose.MooseWriter; +import org.neuroml.export.eden.EDENWriter; import org.neuroml.export.netpyne.NetPyNEWriter; import org.neuroml.export.neuron.NeuronWriter; import org.neuroml.export.pynn.PyNNWriter; @@ -125,6 +126,8 @@ public class JNeuroML public static final String MOOSE_EXPORT_FLAG = "-moose"; + public static final String EDEN_EXPORT_FLAG = "-eden"; + //public static final String GEPPETTO_EXPORT_FLAG = "-geppetto"; public static final String SBML_IMPORT_FLAG = "-sbml-import"; @@ -174,6 +177,9 @@ public class JNeuroML + " " + JNML_SCRIPT + " LEMSFile.xml " + MOOSE_EXPORT_FLAG + "\n" + " Load LEMSFile.xml using jLEMS, and convert it to MOOSE format (**EXPERIMENTAL**)\n\n" + + " " + JNML_SCRIPT + " LEMSFile.xml " + EDEN_EXPORT_FLAG + "\n" + + " Generate a Python script for loading LEMSFile.xml in the EDEN simulator\n\n" + + " " + JNML_SCRIPT + " NMLFile.nml " + SVG_FLAG + "\n" + " Load NMLFile.nml and convert cells & networks to SVG image format \n\n" @@ -727,6 +733,21 @@ else if(args[1].equals(MOOSE_EXPORT_FLAG)) System.out.println("Writing to: " + genFile.getAbsolutePath()); } } + else if(args[1].equals(EDEN_EXPORT_FLAG)) + { + + File lemsFile = (new File(args[0])).getAbsoluteFile(); + Lems lems = loadLemsFile(lemsFile); + + String suffix = "_eden"; + String nFile = generateFormatFilename(lemsFile, Format.EDEN, suffix); + + EDENWriter nw = new EDENWriter(lems, lemsFile, lemsFile.getParentFile(), nFile); + for(File genFile : nw.convert()) + { + System.out.println("Writing to: " + genFile.getAbsolutePath()); + } + } /* Needs to be updated!! From 209db6a35e40c16d23e936078d4f6a0bdcb15ffe Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Tue, 26 Apr 2022 12:37:13 +0100 Subject: [PATCH 06/17] Add eden to tests --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16076eb..1f26a66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,6 +66,7 @@ jobs: ./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/LEMS_NML2_Ex9_FN.xml -eden ./jnml ../NeuroML2/LEMSexamples/regression-tests/LEMS_NML2_Ex5_DetCell_unformatted.xml -nogui ./jnml ../NeuroML2/examples/NML2_SimpleMorphology.nml -svg ls -alt ../NeuroML2/examples @@ -85,5 +86,6 @@ jobs: .\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\LEMS_NML2_Ex9_FN.xml -eden .\jnml.bat ..\NeuroML2\LEMSexamples\regression-tests\LEMS_NML2_Ex5_DetCell_unformatted.xml -nogui .\jnml.bat ..\NeuroML2\examples\NML2_SimpleMorphology.nml -svg From 94bd3733b6e894c545ecd9788dd8b3a0a759c370 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Thu, 12 May 2022 11:26:39 +0100 Subject: [PATCH 07/17] To v0.12.0 here, v1.9.0 in others for NeuroML v2.3 --- jnml | 2 +- jnml.bat | 2 +- pom.xml | 6 +++--- src/main/java/org/neuroml/JNeuroML.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/jnml b/jnml index 1e754b9..3bedcf1 100755 --- a/jnml +++ b/jnml @@ -5,7 +5,7 @@ # Type java -X for more info export JNML_MAX_MEMORY=400M -export JNML_VERSION=0.11.1 +export JNML_VERSION=0.12.0 export CLASSPATH=.:./target/jNeuroML-$JNML_VERSION-jar-with-dependencies.jar:$JNML_HOME/target/jNeuroML-$JNML_VERSION-jar-with-dependencies.jar diff --git a/jnml.bat b/jnml.bat index de00f93..5f0d52d 100644 --- a/jnml.bat +++ b/jnml.bat @@ -1,6 +1,6 @@ @echo off -set JNML_VERSION=0.11.1 +set JNML_VERSION=0.12.0 set CLASSPATH=target\jNeuroML-%JNML_VERSION%-jar-with-dependencies.jar;%JNML_HOME%\jNeuroML-%JNML_VERSION%-jar-with-dependencies.jar diff --git a/pom.xml b/pom.xml index 3441a9f..0d4827d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.neuroml jNeuroML - 0.11.1 + 0.12.0 jar jNeuroML @@ -24,12 +24,12 @@ org.neuroml1.model org.neuroml1.model - 1.8.1 + 1.9.0 org.neuroml.import org.neuroml.import - 1.8.1 + 1.9.0 diff --git a/src/main/java/org/neuroml/JNeuroML.java b/src/main/java/org/neuroml/JNeuroML.java index c293a31..1f56065 100644 --- a/src/main/java/org/neuroml/JNeuroML.java +++ b/src/main/java/org/neuroml/JNeuroML.java @@ -60,7 +60,7 @@ public class JNeuroML public static final String JNML_SCRIPT = "jnml"; - public static final String JNML_VERSION = "0.11.1"; + public static final String JNML_VERSION = "0.12.0"; public static final String HELP_FLAG = "-help"; public static final String HELP_FLAG_SHORT = "-h"; From bb86b2ea73d14c0cf93b52880c679653bc5a7ce7 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Wed, 29 Jun 2022 11:26:09 +0100 Subject: [PATCH 08/17] Update options for netpyne json export --- src/main/java/org/neuroml/JNeuroML.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/neuroml/JNeuroML.java b/src/main/java/org/neuroml/JNeuroML.java index 1f56065..3095197 100644 --- a/src/main/java/org/neuroml/JNeuroML.java +++ b/src/main/java/org/neuroml/JNeuroML.java @@ -114,6 +114,7 @@ public class JNeuroML public static final String RUN_PYNN_NEURON_FLAG = "-run-neuron"; public static final String NETPYNE_EXPORT_FLAG = "-netpyne"; + public static final String NETPYNE_JSON_FLAG = "-json"; public static final String NUMBER_PROCESSORS_FLAG = "-np"; @@ -167,6 +168,7 @@ public class JNeuroML + " " + JNML_SCRIPT + " LEMSFile.xml " + NETPYNE_EXPORT_FLAG + "\n" + " Load LEMSFile.xml using jLEMS, and convert it to NetPyNE format\n" + " " + RUN_FLAG + " Compile NMODL files and run the main NEURON Python file\n\n" + + " " + NETPYNE_JSON_FLAG + " Generate network in NetPyNE JSON format\n\n" + " " + JNML_SCRIPT + " LEMSFile.xml " + BRIAN_EXPORT_FLAG + "\n" + " Load LEMSFile.xml using jLEMS, and convert it to Brian v1 format (*EXPERIMENTAL - single components only*)\n\n" @@ -541,6 +543,7 @@ else if(args[1].equals(NETPYNE_EXPORT_FLAG)) Lems lems = loadLemsFile(lemsFile, false); boolean nogui = false; boolean run = false; + boolean json = false; File outputDir = lemsFile.getParentFile(); int np = 1; @@ -551,6 +554,8 @@ else if(args[1].equals(NETPYNE_EXPORT_FLAG)) nogui = true; else if (args[i].equals(RUN_FLAG)) run = true; + else if (args[i].equals(NETPYNE_JSON_FLAG)) + json = true; else if (args[i].equals(OUTPUT_DIR_FLAG)) { i = i+1; @@ -576,7 +581,7 @@ else if (args[i].equals(NUMBER_PROCESSORS_FLAG)) String mainFilename = generateFormatFilename(lemsFile, Format.NETPYNE, "_netpyne"); NetPyNEWriter npw = new NetPyNEWriter(lems, outputDir, mainFilename); - npw.generateAndRun(nogui, run, np); + npw.generateAndRun(nogui, run, np, json); } // Two arguments else if(args.length == 2) From 23b6345e0979ee89420f0272401a4b9575f252fd Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Tue, 6 Dec 2022 17:59:26 +0000 Subject: [PATCH 09/17] To v0.12.1 --- jnml | 2 +- jnml.bat | 2 +- pom.xml | 2 +- src/main/java/org/neuroml/JNeuroML.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jnml b/jnml index 3bedcf1..e90ca2b 100755 --- a/jnml +++ b/jnml @@ -5,7 +5,7 @@ # Type java -X for more info export JNML_MAX_MEMORY=400M -export JNML_VERSION=0.12.0 +export JNML_VERSION=0.12.1 export CLASSPATH=.:./target/jNeuroML-$JNML_VERSION-jar-with-dependencies.jar:$JNML_HOME/target/jNeuroML-$JNML_VERSION-jar-with-dependencies.jar diff --git a/jnml.bat b/jnml.bat index 5f0d52d..645d5d0 100644 --- a/jnml.bat +++ b/jnml.bat @@ -1,6 +1,6 @@ @echo off -set JNML_VERSION=0.12.0 +set JNML_VERSION=0.12.1 set CLASSPATH=target\jNeuroML-%JNML_VERSION%-jar-with-dependencies.jar;%JNML_HOME%\jNeuroML-%JNML_VERSION%-jar-with-dependencies.jar diff --git a/pom.xml b/pom.xml index 0d4827d..0875e4f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.neuroml jNeuroML - 0.12.0 + 0.12.1 jar jNeuroML diff --git a/src/main/java/org/neuroml/JNeuroML.java b/src/main/java/org/neuroml/JNeuroML.java index 3095197..80b6a6e 100644 --- a/src/main/java/org/neuroml/JNeuroML.java +++ b/src/main/java/org/neuroml/JNeuroML.java @@ -60,7 +60,7 @@ public class JNeuroML public static final String JNML_SCRIPT = "jnml"; - public static final String JNML_VERSION = "0.12.0"; + public static final String JNML_VERSION = "0.12.1"; public static final String HELP_FLAG = "-help"; public static final String HELP_FLAG_SHORT = "-h"; From 9b09caacabfab97c39b980c0f8dd3931fcf7e8db Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Thu, 23 Feb 2023 10:44:52 +0000 Subject: [PATCH 10/17] Test on java 19 --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f26a66..2189370 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,8 +16,8 @@ jobs: strategy: fail-fast: false matrix: - java: [ '8', '11', '16', '17' ] - runs-on: [ubuntu-latest, macos-11, windows-2019 ] + java: [ '8', '11', '16', '17', '19'] + runs-on: [ubuntu-latest, macos-latest, windows-latest ] name: Test on Java ${{ matrix.Java }} on ${{ matrix.runs-on }} steps: @@ -29,7 +29,7 @@ jobs: distribution: 'adopt' - name: Install using getNeuroML.py (non Win) - if: ${{ matrix.runs-on != 'windows-2019' }} + 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 @@ -40,7 +40,7 @@ jobs: ./jnml -v - name: Install using getNeuroML.py (Win) - if: ${{ matrix.runs-on == 'windows-2019' }} + 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" } @@ -52,7 +52,7 @@ jobs: .\jnml.bat -v - name: Further tests (non Win) - if: ${{ matrix.runs-on != 'windows-2019' }} + if: ${{ matrix.runs-on != 'windows-latest' }} run: | pwd ls -alt @@ -73,7 +73,7 @@ jobs: ls -alt ../NeuroML2/LEMSexamples - name: Further tests (Win) - if: ${{ matrix.runs-on == 'windows-2019' }} + if: ${{ matrix.runs-on == 'windows-latest' }} run: | pwd mkdir results From f5bccd6879e2b2a2bbe4a53fc5e18b073b1b17ab Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Mon, 3 Apr 2023 15:05:13 +0100 Subject: [PATCH 11/17] Update ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2189370..2b2d86d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,6 +71,7 @@ jobs: ./jnml ../NeuroML2/examples/NML2_SimpleMorphology.nml -svg ls -alt ../NeuroML2/examples ls -alt ../NeuroML2/LEMSexamples + env - name: Further tests (Win) if: ${{ matrix.runs-on == 'windows-latest' }} From ff843f8f9165ac2f1f98e78534e873ecbcd38719 Mon Sep 17 00:00:00 2001 From: pgleeson Date: Wed, 3 May 2023 16:55:31 +0100 Subject: [PATCH 12/17] Test on win 2019 --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b2d86d..c60741f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: java: [ '8', '11', '16', '17', '19'] - runs-on: [ubuntu-latest, macos-latest, windows-latest ] + runs-on: [ubuntu-latest, macos-latest, windows-2019 ] name: Test on Java ${{ matrix.Java }} on ${{ matrix.runs-on }} steps: @@ -29,7 +29,7 @@ jobs: distribution: 'adopt' - name: Install using getNeuroML.py (non Win) - if: ${{ matrix.runs-on != 'windows-latest' }} + if: ${{ matrix.runs-on != 'windows-2019' }} 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 @@ -40,7 +40,7 @@ jobs: ./jnml -v - name: Install using getNeuroML.py (Win) - if: ${{ matrix.runs-on == 'windows-latest' }} + if: ${{ matrix.runs-on == 'windows-2019' }} 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" } @@ -52,7 +52,7 @@ jobs: .\jnml.bat -v - name: Further tests (non Win) - if: ${{ matrix.runs-on != 'windows-latest' }} + if: ${{ matrix.runs-on != 'windows-2019' }} run: | pwd ls -alt @@ -74,7 +74,7 @@ jobs: env - name: Further tests (Win) - if: ${{ matrix.runs-on == 'windows-latest' }} + if: ${{ matrix.runs-on == 'windows-2019' }} run: | pwd mkdir results From 565f7c554f0c0c53e978b355572e6f139f6c6ae0 Mon Sep 17 00:00:00 2001 From: pgleeson Date: Tue, 9 May 2023 12:49:48 +0100 Subject: [PATCH 13/17] Remove travis ci file --- .travis.yml | 58 ----------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7cbd054..0000000 --- a/.travis.yml +++ /dev/null @@ -1,58 +0,0 @@ -dist: xenial - -language: java - -jdk: - - oraclejdk11 - - - openjdk8 - #- openjdk10 # Some non deterministic recurring error with jdk10... - - openjdk11 - -install: - - export main_repo_branch=$TRAVIS_BRANCH - - echo $main_repo_branch - - if [[ ${main_repo_branch} != "master" && ${main_repo_branch} != "development" && ${main_repo_branch} != "experimental" ]]; then main_repo_branch=development ; fi - - - pwd - - ls -alt - - git branch - - python getNeuroML.py $main_repo_branch # will call mvn install on this & other repos - - mvn dependency:tree - - pwd - -script: - - mkdir results - - # Test validate - - ./jnml -validate ../NeuroML2/examples/NML2_FullNeuroML.nml - - # Test running with jLEMS - - ./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -nogui - - ./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex5_DetCell.xml -nogui - - # Test generating NEURON - - ./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -neuron - - # Test generating Brian - - ./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -brian - - # Test generating SED-ML - - ./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -sedml - - # Test generating CVODE - - ./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -cvode - - # Test generating MATLAB - - ./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -matlab - - # Test generating dLEMS - - ./jnml ../NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -dlems - - # Test generating SVG - - ./jnml ../NeuroML2/examples/NML2_SimpleMorphology.nml -svg - - - # Print version info - - ./jnml -v - From 909889824f85cbb8b9d5a9d7e948924c43d7cd99 Mon Sep 17 00:00:00 2001 From: pgleeson Date: Tue, 9 May 2023 14:18:41 +0100 Subject: [PATCH 14/17] Update to jnml v0.12.2 --- jnml | 2 +- jnml.bat | 2 +- pom.xml | 2 +- src/main/java/org/neuroml/JNeuroML.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jnml b/jnml index e90ca2b..eef6641 100755 --- a/jnml +++ b/jnml @@ -5,7 +5,7 @@ # Type java -X for more info export JNML_MAX_MEMORY=400M -export JNML_VERSION=0.12.1 +export JNML_VERSION=0.12.2 export CLASSPATH=.:./target/jNeuroML-$JNML_VERSION-jar-with-dependencies.jar:$JNML_HOME/target/jNeuroML-$JNML_VERSION-jar-with-dependencies.jar diff --git a/jnml.bat b/jnml.bat index 645d5d0..2de9209 100644 --- a/jnml.bat +++ b/jnml.bat @@ -1,6 +1,6 @@ @echo off -set JNML_VERSION=0.12.1 +set JNML_VERSION=0.12.2 set CLASSPATH=target\jNeuroML-%JNML_VERSION%-jar-with-dependencies.jar;%JNML_HOME%\jNeuroML-%JNML_VERSION%-jar-with-dependencies.jar diff --git a/pom.xml b/pom.xml index 0875e4f..d6d3a8b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.neuroml jNeuroML - 0.12.1 + 0.12.2 jar jNeuroML diff --git a/src/main/java/org/neuroml/JNeuroML.java b/src/main/java/org/neuroml/JNeuroML.java index 80b6a6e..2b3b7af 100644 --- a/src/main/java/org/neuroml/JNeuroML.java +++ b/src/main/java/org/neuroml/JNeuroML.java @@ -60,7 +60,7 @@ public class JNeuroML public static final String JNML_SCRIPT = "jnml"; - public static final String JNML_VERSION = "0.12.1"; + public static final String JNML_VERSION = "0.12.2"; public static final String HELP_FLAG = "-help"; public static final String HELP_FLAG_SHORT = "-h"; From a754d1b2f2df6dea1cdf255f52cfd795ac3d2b36 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Tue, 1 Aug 2023 11:12:29 +0100 Subject: [PATCH 15/17] More unifoirmity in listing of generated files by jNeuroML --- src/main/java/org/neuroml/JNeuroML.java | 68 +++++++++++++++---------- 1 file changed, 42 insertions(+), 26 deletions(-) diff --git a/src/main/java/org/neuroml/JNeuroML.java b/src/main/java/org/neuroml/JNeuroML.java index 2b3b7af..349f692 100644 --- a/src/main/java/org/neuroml/JNeuroML.java +++ b/src/main/java/org/neuroml/JNeuroML.java @@ -143,6 +143,8 @@ public class JNeuroML public static final String PNG_FLAG = "-png"; + public static final String GENERATED_FILE = ">>> JNML generated file: "; + static String usage = "Usage: \n\n" + " " + JNML_SCRIPT + " LEMSFile.xml\n" + " Load LEMSFile.xml using jLEMS, parse it and validate it as LEMS, and execute the model it contains\n\n" @@ -522,7 +524,11 @@ else if (args[i].equals(OUTPUT_DIR_FLAG)) } else { - nw.generateAndRun(nogui, compile, run, false); + List files = nw.generateAndRun(nogui, compile, run, false); + for(File genFile : files) + { + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); + } } } @@ -535,7 +541,12 @@ else if(args[1].equals(PYNN_EXPORT_FLAG)) boolean runNrn = (args.length==3 && args[2].equals(RUN_PYNN_NEURON_FLAG)); PyNNWriter pw = new PyNNWriter(lems, lemsFile.getParentFile(), nFile); - pw.generateAndRun(false, runNrn); + + List files = pw.generateAndRun(false, runNrn); + for(File genFile : files) + { + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); + } } else if(args[1].equals(NETPYNE_EXPORT_FLAG)) { @@ -581,7 +592,12 @@ else if (args[i].equals(NUMBER_PROCESSORS_FLAG)) String mainFilename = generateFormatFilename(lemsFile, Format.NETPYNE, "_netpyne"); NetPyNEWriter npw = new NetPyNEWriter(lems, outputDir, mainFilename); - npw.generateAndRun(nogui, run, np, json); + List files = npw.generateAndRun(nogui, run, np, json); + + for(File genFile : files) + { + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); + } } // Two arguments else if(args.length == 2) @@ -647,7 +663,7 @@ else if(args[1].equals(VERTEX_EXPORT_FLAG)) generateFormatFilename(lemsFile, Format.VERTEX, "_run")); for(File genFile : vw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } @@ -660,7 +676,7 @@ else if(args[1].equals(SBML_EXPORT_FLAG)) SBMLWriter sbmlw = new SBMLWriter(lems, lemsFile.getParentFile(), generateFormatFilename(lemsFile, Format.SBML, null)); for(File genFile : sbmlw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } @@ -673,13 +689,13 @@ else if(args[1].equals(SBML_SEDML_EXPORT_FLAG)) SBMLWriter sbmlw = new SBMLWriter(lems, lemsFile.getParentFile(), generateFormatFilename(lemsFile, Format.SBML, null)); for(File genFile : sbmlw.convert()) { - System.out.println("Writing SBML to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } SEDMLWriter sedw = new SEDMLWriter(lems, lemsFile.getParentFile(), generateFormatFilename(lemsFile, Format.SEDML, null), lemsFile.getName(), Format.SBML); for(File genFile : sedw.convert()) { - System.out.println("Writing SED-ML to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } else if(args[1].equals(XPP_EXPORT_FLAG)) @@ -691,7 +707,7 @@ else if(args[1].equals(XPP_EXPORT_FLAG)) XppWriter xppw = new XppWriter(lems, lemsFile.getParentFile(), generateFormatFilename(lemsFile, Format.XPP, null)); for(File genFile : xppw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } @@ -704,7 +720,7 @@ else if(args[1].equals(DNSIM_EXPORT_FLAG)) DNSimWriter dnsimw = new DNSimWriter(lems, lemsFile.getParentFile(), generateFormatFilename(lemsFile, Format.DN_SIM, null)); for(File genFile : dnsimw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } @@ -720,7 +736,7 @@ else if(args[1].equals(NEST_EXPORT_FLAG)) NestWriter nw = new NestWriter(lems, lemsFile.getParentFile(), nFile); for(File genFile : nw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } else if(args[1].equals(MOOSE_EXPORT_FLAG)) @@ -735,7 +751,7 @@ else if(args[1].equals(MOOSE_EXPORT_FLAG)) MooseWriter nw = new MooseWriter(lems, lemsFile.getParentFile(), nFile); for(File genFile : nw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } else if(args[1].equals(EDEN_EXPORT_FLAG)) @@ -750,7 +766,7 @@ else if(args[1].equals(EDEN_EXPORT_FLAG)) EDENWriter nw = new EDENWriter(lems, lemsFile, lemsFile.getParentFile(), nFile); for(File genFile : nw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } @@ -785,7 +801,7 @@ else if(args[1].equals(SEDML_EXPORT_FLAG) || args[1].equals(SEDML_EXPORT_FLAG2)) SEDMLWriter sedw = new SEDMLWriter(lems, lemsFile.getParentFile(), generateFormatFilename(lemsFile, Format.SEDML, null), lemsFile.getName(), Format.NEUROML2); for(File genFile : sedw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } @@ -800,7 +816,7 @@ else if(args[1].equals(CELLML_EXPORT_FLAG)) generateFormatFilename(lemsFile, Format.CELLML, null)); for(File genFile : cellmlw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } @@ -815,7 +831,7 @@ else if(args[1].equals(NINEML_EXPORT_FLAG) || args[1].equals(SPINEML_EXPORT_FLAG XineMLWriter xw = new XineMLWriter(lems, v, lemsFile.getParentFile(), lemsFile.getName().replaceAll("." + Format.LEMS.getExtension(), suffix)); for(File genFile : xw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } @@ -833,7 +849,7 @@ else if(args[1].equals(MATLAB_EXPORT_FLAG)/* || args[1].equals(MATLAB_EULER_EXPO MatlabWriter matlabw = new MatlabWriter(lems, lemsFile.getParentFile(), filename); for(File genFile : matlabw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } @@ -848,7 +864,7 @@ else if(args[1].equals(CVODE_EXPORT_FLAG)) cw.setSolver(CWriter.Solver.CVODE); for(File genFile : cw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } @@ -863,7 +879,7 @@ else if(args[1].equals(MODELICA_EXPORT_FLAG)) ModelicaWriter modw = new ModelicaWriter(lems, lemsFile.getParentFile(), mFile); for(File genFile : modw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } @@ -876,7 +892,7 @@ else if(args[1].equals(DLEMS_EXPORT_FLAG)) DLemsWriter dlemsw = new DLemsWriter(lems, lemsFile.getParentFile(), generateFormatFilename(lemsFile, Format.DLEMS, null), null); for(File genFile : dlemsw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } @@ -900,7 +916,7 @@ else if(args[1].equals(BRIAN_EXPORT_FLAG) || args[1].equals(BRIAN2_EXPORT_FLAG)) for(File genFile : bw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } else if(args[1].equals(OLD_GRAPH_FLAG) || args[1].equals(LEMS_GRAPH_FLAG)) @@ -911,7 +927,7 @@ else if(args[1].equals(OLD_GRAPH_FLAG) || args[1].equals(LEMS_GRAPH_FLAG)) GraphWriter gw = new GraphWriter(lems, lemsFile.getParentFile(), generateFormatFilename(lemsFile, Format.GRAPH_VIZ, null)); List outputFiles = gw.convert(); File gvFile = outputFiles.get(0); - System.out.println("Writing to: " + gvFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + gvFile.getAbsolutePath()); String imgFile = gvFile.getAbsolutePath().replace("." + Format.GRAPH_VIZ.getExtension(), "." + Format.PNG.getExtension()); String cmd = "dot -Tpng " + gvFile.getAbsolutePath() + " -o " + imgFile; @@ -965,7 +981,7 @@ else if(args[1].equals(SVG_FLAG)) SVGWriter svgw = new SVGWriter(nmlDocument, nmlFile.getParentFile(), nmlFile.getName().replaceAll("." + Format.NEUROML2.getExtension(), "." + Format.SVG.getExtension())); for(File genFile : svgw.convert()) { - System.out.println("Writing to: " + genFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + genFile.getAbsolutePath()); } } else if(args[1].equals(PNG_FLAG)) @@ -979,7 +995,7 @@ else if(args[1].equals(PNG_FLAG)) SVGWriter svgw = new SVGWriter(nmlDocument, nmlFile.getParentFile(), pngFileName); svgw.convertToPng(pngFile); - System.out.println("Writing to: " + pngFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + pngFile.getAbsolutePath()); } else @@ -1008,7 +1024,7 @@ else if(args.length == 3) String val = entry.getValue(); File vwFile = new File(lemsFile.getParentFile(), "/" + key + ".vhdl"); FileUtil.writeStringToFile(val, vwFile); - System.out.println("Writing to: "+vwFile.getAbsolutePath()); + System.out.println(GENERATED_FILE+vwFile.getAbsolutePath()); } /*File vwFile = new File(lemsFile.getParentFile(), "/testbench.vhdl"); @@ -1016,7 +1032,7 @@ else if(args.length == 3) System.out.println("Writing to: "+vwFile.getAbsolutePath());*/ File vwFile = new File(lemsFile.getParentFile(), "/testbench.prj"); FileUtil.writeStringToFile(prjScript, vwFile); - System.out.println("Writing to: "+vwFile.getAbsolutePath()); + System.out.println(GENERATED_FILE+vwFile.getAbsolutePath()); } } @@ -1048,7 +1064,7 @@ else if(args.length == 4) File lemsFile = SBMLImporter.convertSBMLToLEMSFile(sbmlFile, duration, dt, true); - System.out.println("Written to: " + lemsFile.getAbsolutePath()); + System.out.println(GENERATED_FILE + lemsFile.getAbsolutePath()); } else From 1f3d0a2a21abc6d2c46677617d2b5100a55135f9 Mon Sep 17 00:00:00 2001 From: pgleeson Date: Tue, 12 Sep 2023 12:31:06 +0100 Subject: [PATCH 16/17] Update to jnml v0.12.3 --- jnml | 2 +- jnml.bat | 2 +- pom.xml | 2 +- src/main/java/org/neuroml/JNeuroML.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jnml b/jnml index eef6641..56dfa98 100755 --- a/jnml +++ b/jnml @@ -5,7 +5,7 @@ # Type java -X for more info export JNML_MAX_MEMORY=400M -export JNML_VERSION=0.12.2 +export JNML_VERSION=0.12.3 export CLASSPATH=.:./target/jNeuroML-$JNML_VERSION-jar-with-dependencies.jar:$JNML_HOME/target/jNeuroML-$JNML_VERSION-jar-with-dependencies.jar diff --git a/jnml.bat b/jnml.bat index 2de9209..b551b45 100644 --- a/jnml.bat +++ b/jnml.bat @@ -1,6 +1,6 @@ @echo off -set JNML_VERSION=0.12.2 +set JNML_VERSION=0.12.3 set CLASSPATH=target\jNeuroML-%JNML_VERSION%-jar-with-dependencies.jar;%JNML_HOME%\jNeuroML-%JNML_VERSION%-jar-with-dependencies.jar diff --git a/pom.xml b/pom.xml index d6d3a8b..9e9a199 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.neuroml jNeuroML - 0.12.2 + 0.12.3 jar jNeuroML diff --git a/src/main/java/org/neuroml/JNeuroML.java b/src/main/java/org/neuroml/JNeuroML.java index 349f692..e6ba782 100644 --- a/src/main/java/org/neuroml/JNeuroML.java +++ b/src/main/java/org/neuroml/JNeuroML.java @@ -60,7 +60,7 @@ public class JNeuroML public static final String JNML_SCRIPT = "jnml"; - public static final String JNML_VERSION = "0.12.2"; + public static final String JNML_VERSION = "0.12.3"; public static final String HELP_FLAG = "-help"; public static final String HELP_FLAG_SHORT = "-h"; From 7063e86712b107666d74b53e0d8ac1c2be1728ae Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Wed, 20 Sep 2023 16:52:15 +0100 Subject: [PATCH 17/17] To v0.12.4 --- jnml | 2 +- jnml.bat | 2 +- pom.xml | 8 ++++---- src/main/java/org/neuroml/JNeuroML.java | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/jnml b/jnml index 56dfa98..5a5ae99 100755 --- a/jnml +++ b/jnml @@ -5,7 +5,7 @@ # Type java -X for more info export JNML_MAX_MEMORY=400M -export JNML_VERSION=0.12.3 +export JNML_VERSION=0.12.4 export CLASSPATH=.:./target/jNeuroML-$JNML_VERSION-jar-with-dependencies.jar:$JNML_HOME/target/jNeuroML-$JNML_VERSION-jar-with-dependencies.jar diff --git a/jnml.bat b/jnml.bat index b551b45..2702580 100644 --- a/jnml.bat +++ b/jnml.bat @@ -1,6 +1,6 @@ @echo off -set JNML_VERSION=0.12.3 +set JNML_VERSION=0.12.4 set CLASSPATH=target\jNeuroML-%JNML_VERSION%-jar-with-dependencies.jar;%JNML_HOME%\jNeuroML-%JNML_VERSION%-jar-with-dependencies.jar diff --git a/pom.xml b/pom.xml index 9e9a199..889ee05 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.neuroml jNeuroML - 0.12.3 + 0.12.4 jar jNeuroML @@ -24,12 +24,12 @@ org.neuroml1.model org.neuroml1.model - 1.9.0 + 1.9.1 org.neuroml.import org.neuroml.import - 1.9.0 + 1.9.1 @@ -59,7 +59,7 @@ <br /> <br /> - Copyright NeuroML Contributors 2021 + Copyright NeuroML Contributors 2023 diff --git a/src/main/java/org/neuroml/JNeuroML.java b/src/main/java/org/neuroml/JNeuroML.java index e6ba782..d08e543 100644 --- a/src/main/java/org/neuroml/JNeuroML.java +++ b/src/main/java/org/neuroml/JNeuroML.java @@ -60,7 +60,7 @@ public class JNeuroML public static final String JNML_SCRIPT = "jnml"; - public static final String JNML_VERSION = "0.12.3"; + public static final String JNML_VERSION = "0.12.4"; public static final String HELP_FLAG = "-help"; public static final String HELP_FLAG_SHORT = "-h";