Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non py3 code #197

Merged
merged 6 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
mvn dependency:tree
./jnml -v
cd ..

- name: Install OMV
run: |
pwd
Expand All @@ -55,7 +55,7 @@ jobs:
omv list -V
env
pip freeze

- name: Test examples using OMV
run: |
cd $GITHUB_WORKSPACE/NeuroML2/LEMSexamples
Expand Down
8 changes: 3 additions & 5 deletions examples/NeuroML2_To_HTML/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
Converting NeuroML 2 files to HTML using an XSL file
# Converting NeuroML 2 files to HTML using an XSL file

Very preliminary!
Very, very preliminary!

Try:

python convert.py ../NML2_SimpleMorphology.nml

or

python convert.py ../NML2_SynapseTypes.nml > mypage.html


python convert.py ../NML2_SynapseTypes.nml > mypage.html
6 changes: 3 additions & 3 deletions examples/NeuroML2_To_HTML/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
try:
infile = sys.argv[1]
except:
print "Usage: convert.py _fileToConvert_"
print("Usage: convert.py _fileToConvert_")
sys.exit(1)

xsl_file = 'NeuroML2_To_HTML.xsl'

dom = ET.parse(infile)
xslt = ET.parse(xsl_file)

transform = ET.XSLT(xslt)
newdom = transform(dom)
print(ET.tostring(newdom, pretty_print=True))
print(ET.tostring(newdom, pretty_print=True).decode("utf-8"))