Skip to content

Commit

Permalink
Merge pull request NeuroML#418 from NeuroML/development
Browse files Browse the repository at this point in the history
Changes for NeuroML v2.3.1 release
  • Loading branch information
pgleeson authored Aug 20, 2024
2 parents be1d616 + 504ec07 commit 20ee07e
Show file tree
Hide file tree
Showing 152 changed files with 17,083 additions and 3,365 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
- name: Upgrade pip, install deps
run: |
python -m pip install --upgrade pip
pip install 'numpy<2.0.0' # due to lingering issues with other modules
pip install .[dev]
- name: List packages so far
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Ruff
on:
pull_request:
branches:
- master
- development
- experimental
- 'test*'
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
changed-files: 'true'
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,19 @@ arm64
/tests/plot/test_schematic_plot_2d_test_cell_nml_xz.png
/tests/plot/test_schematic_plot_2d_test_cell_nml_yz.png
/tests/analysis/*png
*ken.sh
/tests/plot/test_morphology*.png

.vscode
/tests/pyneuroml_20*
/pyneuroml/xppaut/report.txt
/examples/test_data/xppaut/fhn_2.ode
/examples/test_data/xppaut/fhn_brain.py
/examples/test_data/xppaut/nca_2.ode
/examples/test_data/xppaut/wc_2.ode

coverage.xml
/examples/LEMS_NML2_Ex5_DetCell.sedml.omex
/examples/hhcell.swc
/examples/metadata.rdf
/tests/utils/test_translation.net.nml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Fedora users can install pyNeuroML using the following commands:
This will also pull in all the necessary dependencies (Java, lxml, graphviz).
Please see the [project documentation](https://docs.fedoraproject.org/en-US/neurofedora/copr/) for more information.

### Installation from source
### Installation from the source

Clone the repository:

Expand Down
9 changes: 5 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ Here you will find information on installing, using, and contributing to pyNeuro
For more information on NeuroML standard, other tools in the NeuroML ecosystem, the NeuroML community and how to get in touch with us, please see the documentation at https://docs.neuroml.org.


Contents
---------

.. toctree::
:maxdepth: 2
:caption: Contents:
:maxdepth: 1

introduction
modules
pyneuroml

Indices and tables
==================
------------------

* :ref:`genindex`
* :ref:`modindex`
Expand Down
7 changes: 0 additions & 7 deletions docs/source/modules.rst

This file was deleted.

7 changes: 7 additions & 0 deletions docs/source/pyneuroml.annotations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyneuroml.annotations module
=============================

.. automodule:: pyneuroml.annotations
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/pyneuroml.io.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyneuroml.io module
======================

.. automodule:: pyneuroml.io
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/pyneuroml.modelgraphs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyneuroml.modelgraphs module
=============================

.. automodule:: pyneuroml.modelgraphs
:members:
:undoc-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs/source/pyneuroml.nsgr.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pyneuroml.nsgr package
pyneuroml.nsgr module
======================

.. automodule:: pyneuroml.nsgr
Expand Down
8 changes: 8 additions & 0 deletions docs/source/pyneuroml.plot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ pyneuroml.plot.Plot module
:undoc-members:
:show-inheritance:

pyneuroml.plot.PlotTimeSeries module
--------------------------------------

.. automodule:: pyneuroml.plot.PlotTimeSeries
:members:
:undoc-members:
:show-inheritance:

pyneuroml.plot.PlotSpikes module
--------------------------------

Expand Down
2 changes: 2 additions & 0 deletions docs/source/pyneuroml.pynml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ pyneuroml.pynml module
:members:
:undoc-members:
:show-inheritance:
:imported-members:
:exclude-members: Cell, NeuroMLDocument, LEMSFileParser, Path, ZipFile, datetime, main
13 changes: 9 additions & 4 deletions docs/source/pyneuroml.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
pyneuroml package
API Documentation
=================

.. automodule:: pyneuroml
:members:
:undoc-members:
:show-inheritance:
:exclude-members: print_v

Subpackages
-----------
The PyNeuroML package includes the following sub-packages:

.. toctree::
:maxdepth: 1

pyneuroml.pynml
pyneuroml.analysis
pyneuroml.annotations
pyneuroml.archive
pyneuroml.channelml
pyneuroml.io
pyneuroml.lems
pyneuroml.modelgraphs
pyneuroml.neuron
pyneuroml.nsgr
pyneuroml.pynml
pyneuroml.plot
pyneuroml.povray
pyneuroml.runners
pyneuroml.swc
pyneuroml.sbml
pyneuroml.tune
pyneuroml.utils
7 changes: 7 additions & 0 deletions docs/source/pyneuroml.runners.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyneuroml.runners module
=========================

.. automodule:: pyneuroml.runners
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/pyneuroml.sbml.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyneuroml.sbml module
======================

.. automodule:: pyneuroml.sbml
:members:
:undoc-members:
:show-inheritance:
8 changes: 8 additions & 0 deletions docs/source/pyneuroml.swc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ pyneuroml.swc package
:undoc-members:
:show-inheritance:

pyneuroml.swc.LoadSWC module
------------------------------

.. automodule:: pyneuroml.swc.LoadSWC
:members:
:undoc-members:
:show-inheritance:

pyneuroml.swc.ExportSWC module
------------------------------

Expand Down
47 changes: 47 additions & 0 deletions docs/source/pyneuroml.utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,50 @@ pyneuroml.utils package
:undoc-members:
:show-inheritance:

pyneuroml.utils.info module
---------------------------

.. automodule:: pyneuroml.utils.info
:members:
:undoc-members:
:show-inheritance:

pyneuroml.utils.plot module
---------------------------

.. automodule:: pyneuroml.utils.plot
:members:
:undoc-members:
:show-inheritance:

pyneuroml.utils.misc module
---------------------------

.. automodule:: pyneuroml.utils.misc
:members:
:undoc-members:
:show-inheritance:

pyneuroml.utils.cli module
---------------------------

.. automodule:: pyneuroml.utils.cli
:members:
:undoc-members:
:show-inheritance:

pyneuroml.utils.units module
----------------------------

.. automodule:: pyneuroml.utils.units
:members:
:undoc-members:
:show-inheritance:

pyneuroml.utils.xml module
----------------------------

.. automodule:: pyneuroml.utils.xml
:members:
:undoc-members:
:show-inheritance:
6 changes: 3 additions & 3 deletions examples/LeakConductance.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=LeakConductance type=ionChannelHH)
COMMENT

This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export)
org.neuroml.export v1.9.1
org.neuroml.model v1.9.1
jLEMS v0.10.8
org.neuroml.export v1.10.1
org.neuroml.model v1.10.1
jLEMS v0.11.1

ENDCOMMENT

Expand Down
1 change: 0 additions & 1 deletion examples/Vm_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def generate_Vm_vs_time_plot(
simulator="jNeuroML",
include_included=True,
):

ref = "Test"
logger.info(
"Generating Vm(mV) vs Time(ms) plot for cell %s in %s using %s (Inj %snA / %sms dur after %sms delay)"
Expand Down
1 change: 0 additions & 1 deletion examples/component_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def main(args=None):
nml_doc = pynml.read_neuroml2_file(f)

for ct in nml_doc.ComponentType:

ys = []
for v in vs:
req_variables = {"v": "%sV" % v, "vShift": "10mV"}
Expand Down
1 change: 0 additions & 1 deletion examples/create_new_lems_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


if __name__ == "__main__":

############################################
# Create a LEMS file "manually"...

Expand Down
2 changes: 1 addition & 1 deletion examples/generate_if_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
plot_voltage_traces=not nogui,
plot_if=not nogui,
plot_iv=not nogui,
save_if_data_to="if_data.dat"
save_if_data_to="if_data.dat",
)
5 changes: 2 additions & 3 deletions examples/generate_povray.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

from pyneuroml.povray.NeuroML2ToPOVRay import generate_povray

#generate_povray(neuroml_file='test_data/ca1/TestOLMNet.net.nml')
# generate_povray(neuroml_file='test_data/ca1/TestOLMNet.net.nml')

generate_povray(neuroml_file='test_data/Purk2M9s.nml', scalez=3)
generate_povray(neuroml_file="test_data/Purk2M9s.nml", scalez=3)
8 changes: 4 additions & 4 deletions examples/quick_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,35 @@
siny = [math.sin(t / 10) for t in ts]
cosey = [math.exp(t / -80) * math.cos(t / 5) for t in ts]

if '-i' in sys.argv:
if "-i" in sys.argv:
from pyneuroml.plot.Plot import generate_interactive_plot

# Generate a plot for this quickly with generate_interactive_plot
ax = generate_interactive_plot(
[ts, ts], # Add 2 sets of x values
[siny, cosey], # Add 2 sets of y values
"Some traces", # Title
labels=['sin', 'cos'],
labels=["sin", "cos"],
xaxis="Time (ms)", # x axis legend
yaxis="Arbitrary units...", # y axis legend
linewidths=[1, 3], # Thicknesses of each trace
save_figure_to="quick.png",
) # Save figure

else:

# Generate a plot for this quickly with generate_plot
ax = generate_plot(
[ts, ts], # Add 2 sets of x values
[siny, cosey], # Add 2 sets of y values
"Some traces", # Title
labels=['sin', 'cos'],
labels=["sin", "cos"],
xaxis="Time (ms)", # x axis legend
yaxis="Arbitrary units...", # y axis legend
linewidths=[1, 3], # Thicknesses of each trace
show_plot_already=False, # Show or wait for plt.show()?
font_size=10, # Font
bottom_left_spines_only=True, # Box or just x & y axes
legend_position = "bottom center",
save_figure_to="quick.png",
) # Save figure

Expand Down
1 change: 0 additions & 1 deletion examples/record_channel_currents.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@


if __name__ == "__main__":

root_dir = "test_data/ca1"
cell_file = "cells/olm.cell.nml"
cell_comp = "olmcell"
Expand Down
4 changes: 2 additions & 2 deletions examples/test_data/realtime.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from pyneuroml import pynml


command = 'python snooze.py'
run_dir = '.'
command = "python snooze.py"
run_dir = "."

oo = pynml.execute_command_in_dir_with_realtime_output(command, run_dir, verbose=True)

Expand Down
Loading

0 comments on commit 20ee07e

Please sign in to comment.