Skip to content

Commit

Permalink
Merge pull request #119 from NeuroML/experimental
Browse files Browse the repository at this point in the history
Add location of neuron when pip installed on Binder
  • Loading branch information
pgleeson authored Jul 31, 2024
2 parents de789e6 + ae0ef92 commit c527321
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main/java/org/lemsml/export/sedml/SEDMLWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Arrays;

import org.lemsml.export.base.AXMLWriter;
import org.lemsml.jlems.core.logging.E;
Expand Down Expand Up @@ -67,9 +68,18 @@ public String getMainScript() throws ContentError

StringBuilder main = new StringBuilder();
main.append("<?xml version='1.0' encoding='UTF-8'?>\n");
String[] attrs = new String[] { "xmlns=http://sed-ml.org/sed-ml/level"+SEDML_LEVEL+"/version"+SEDML_VERSION, "level="+SEDML_LEVEL, "version="+SEDML_VERSION+"", "xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance",
String[] attrs = new String[] { "xmlns=http://sed-ml.org/sed-ml/level"+SEDML_LEVEL+"/version"+SEDML_VERSION,
"level="+SEDML_LEVEL,
"version="+SEDML_VERSION+"",
"xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance",
"xsi:schemaLocation=http://sed-ml.org/sed-ml/level"+SEDML_LEVEL+"/version"+SEDML_VERSION+" " + PREF_SEDML_SCHEMA };

if(modelFormat == Format.SBML)
{
attrs = Arrays.copyOf(attrs, attrs.length + 1);
attrs[attrs.length-1] = "xmlns:sbml=http://www.sbml.org/sbml/level2/version2";
}

startElement(main, "sedML", attrs);
startElement(main, "notes");
startElement(main, "p", "xmlns=http://www.w3.org/1999/xhtml");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ else if (Utils.isLinuxBasedPlatform())
options.add("/usr");
options.add("/usr/local");
options.add("/usr/local/nrn/x86_64");
options.add("/srv/conda/envs/notebook/"); // location of neuron when pip installed on Binder...
}

for (String option : options)
Expand Down

0 comments on commit c527321

Please sign in to comment.