Skip to content

Commit

Permalink
Merge branch 'development' into feat/py3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjayankur31 committed Feb 6, 2024
2 parents 273036b + d32fda7 commit 4f8c799
Show file tree
Hide file tree
Showing 51 changed files with 734 additions and 136 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ jobs:
echo "github.ref is: ${{ github.ref }}"
echo "github.base_ref is: ${{ github.base_ref }}"
- name: Upgrade pip, install inspyred
- name: Upgrade pip, install deps
run: |
python -m pip install --upgrade pip
pip install git+https://github.com/aarongarrett/inspyred.git@master#egg=inspyred
pip install .[dev]
- name: List packages so far
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,5 @@ 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
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)
7 changes: 3 additions & 4 deletions examples/quick_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,28 @@
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
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
1 change: 0 additions & 1 deletion examples/tune/tunePyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"cell:pyr_4_sym/channelDensity:Kdr_pyr_soma_group/mS_per_cm2": 80,
}
if "-tune" in sys.argv:

parameters = [
"cell:pyr_4_sym/channelDensity:Na_pyr_soma_group/mS_per_cm2",
"cell:pyr_4_sym/channelDensity:Kdr_pyr_soma_group/mS_per_cm2",
Expand Down
6 changes: 3 additions & 3 deletions man/man1/pynml-archive.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-ARCHIVE "1" "November 2023" "pynml-archive v1.1.9" "User Commands"
.TH PYNML-ARCHIVE "1" "December 2023" "pynml-archive v1.1.12" "User Commands"
.SH NAME
pynml-archive \- manual page for pynml-archive v1.1.9
pynml-archive \- manual page for pynml-archive v1.1.12
.SH DESCRIPTION
usage: pynml\-archive [\-h] [\-zipfileName <zip file name>]
.TP
Expand Down Expand Up @@ -29,7 +29,7 @@ Extension to use for archive.
Explicit list of files to create archive of.
.SH ENVIRONMENT
.PP
pyNeuroML v1.1.9 (libNeuroML v0.5.6, jNeuroML v0.13.0)
pyNeuroML v1.1.12 (libNeuroML v0.5.7, jNeuroML v0.13.0)
.SH "SEE ALSO"
.BR pynml (1),
.BR pynml-channelanalysis (1),
Expand Down
6 changes: 3 additions & 3 deletions man/man1/pynml-channelanalysis.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-CHANNELANALYSIS "1" "November 2023" "pynml-channelanalysis v1.1.9" "User Commands"
.TH PYNML-CHANNELANALYSIS "1" "December 2023" "pynml-channelanalysis v1.1.12" "User Commands"
.SH NAME
pynml-channelanalysis \- manual page for pynml-channelanalysis v1.1.9
pynml-channelanalysis \- manual page for pynml-channelanalysis v1.1.12
.SH DESCRIPTION
usage: pynml\-channelanalysis [\-h] [\-v] [\-minV <min v>] [\-maxV <max v>]
.TP
Expand Down Expand Up @@ -94,7 +94,7 @@ Save currents through voltage clamp at each level &
plot current vs voltage for ion channel
.SH ENVIRONMENT
.PP
pyNeuroML v1.1.9 (libNeuroML v0.5.6, jNeuroML v0.13.0)
pyNeuroML v1.1.12 (libNeuroML v0.5.7, jNeuroML v0.13.0)
.SH "SEE ALSO"
.BR pynml (1),
.BR pynml-channelanalysis (1),
Expand Down
6 changes: 3 additions & 3 deletions man/man1/pynml-channelml2nml.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-CHANNELML2NML "1" "November 2023" "pynml-channelml2nml v1.1.9" "User Commands"
.TH PYNML-CHANNELML2NML "1" "December 2023" "pynml-channelml2nml v1.1.12" "User Commands"
.SH NAME
pynml-channelml2nml \- manual page for pynml-channelml2nml v1.1.9
pynml-channelml2nml \- manual page for pynml-channelml2nml v1.1.12
.SH DESCRIPTION
usage: pynml\-channelml2nml [\-h] [\-xsltfile <XSLT file>]
.TP
Expand All @@ -25,7 +25,7 @@ Path to the XSLT file
Name of the outputfile file
.SH ENVIRONMENT
.PP
pyNeuroML v1.1.9 (libNeuroML v0.5.6, jNeuroML v0.13.0)
pyNeuroML v1.1.12 (libNeuroML v0.5.7, jNeuroML v0.13.0)
.SH "SEE ALSO"
.BR pynml (1),
.BR pynml-channelanalysis (1),
Expand Down
6 changes: 3 additions & 3 deletions man/man1/pynml-modchananalysis.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-MODCHANANALYSIS "1" "November 2023" "pynml-modchananalysis v1.1.9" "User Commands"
.TH PYNML-MODCHANANALYSIS "1" "December 2023" "pynml-modchananalysis v1.1.12" "User Commands"
.SH NAME
pynml-modchananalysis \- manual page for pynml-modchananalysis v1.1.9
pynml-modchananalysis \- manual page for pynml-modchananalysis v1.1.12
.SH DESCRIPTION
usage: pynml\-modchananalysis [\-h] [\-v] [\-nogui] [\-minV <min v>]
.TP
Expand Down Expand Up @@ -56,7 +56,7 @@ in mM)
Name of the mod file containing the channel
.SH ENVIRONMENT
.PP
pyNeuroML v1.1.9 (libNeuroML v0.5.6, jNeuroML v0.13.0)
pyNeuroML v1.1.12 (libNeuroML v0.5.7, jNeuroML v0.13.0)
.SH "SEE ALSO"
.BR pynml (1),
.BR pynml-channelanalysis (1),
Expand Down
6 changes: 3 additions & 3 deletions man/man1/pynml-plotchan.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-PLOTCHAN "1" "November 2023" "pynml-plotchan v1.1.9" "User Commands"
.TH PYNML-PLOTCHAN "1" "December 2023" "pynml-plotchan v1.1.12" "User Commands"
.SH NAME
pynml-plotchan \- manual page for pynml-plotchan v1.1.9
pynml-plotchan \- manual page for pynml-plotchan v1.1.12
.SH DESCRIPTION
usage: pynml\-plotchan [\-h] [\-noDistancePlots] [\-nogui]
.IP
Expand All @@ -25,7 +25,7 @@ Do not generate distance plots
Do not show plots as they are generated
.SH ENVIRONMENT
.PP
pyNeuroML v1.1.9 (libNeuroML v0.5.6, jNeuroML v0.13.0)
pyNeuroML v1.1.12 (libNeuroML v0.5.7, jNeuroML v0.13.0)
.SH "SEE ALSO"
.BR pynml (1),
.BR pynml-channelanalysis (1),
Expand Down
6 changes: 3 additions & 3 deletions man/man1/pynml-plotmorph.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-PLOTMORPH "1" "November 2023" "pynml-plotmorph v1.1.9" "User Commands"
.TH PYNML-PLOTMORPH "1" "December 2023" "pynml-plotmorph v1.1.12" "User Commands"
.SH NAME
pynml-plotmorph \- manual page for pynml-plotmorph v1.1.9
pynml-plotmorph \- manual page for pynml-plotmorph v1.1.12
.SH DESCRIPTION
usage: pynml\-plotmorph [\-h] [\-v] [\-nogui] [\-plane2d <plane, e.g. xy, yz, zx>]
.TP
Expand Down Expand Up @@ -55,7 +55,7 @@ Scale axes so that image is approximately square, for
2D plot
.SH ENVIRONMENT
.PP
pyNeuroML v1.1.9 (libNeuroML v0.5.6, jNeuroML v0.13.0)
pyNeuroML v1.1.12 (libNeuroML v0.5.7, jNeuroML v0.13.0)
.SH "SEE ALSO"
.BR pynml (1),
.BR pynml-channelanalysis (1),
Expand Down
6 changes: 3 additions & 3 deletions man/man1/pynml-plotspikes.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-PLOTSPIKES "1" "November 2023" "pynml-plotspikes v1.1.9" "User Commands"
.TH PYNML-PLOTSPIKES "1" "December 2023" "pynml-plotspikes v1.1.12" "User Commands"
.SH NAME
pynml-plotspikes \- manual page for pynml-plotspikes v1.1.9
pynml-plotspikes \- manual page for pynml-plotspikes v1.1.12
.SH DESCRIPTION
usage: pynml\-plotspikes [\-h] [\-format <format>] [\-rates] [\-showPlotsAlready]
.TP
Expand Down Expand Up @@ -44,7 +44,7 @@ Window for rate calculation in ms
Number of bins for rate histogram
.SH ENVIRONMENT
.PP
pyNeuroML v1.1.9 (libNeuroML v0.5.6, jNeuroML v0.13.0)
pyNeuroML v1.1.12 (libNeuroML v0.5.7, jNeuroML v0.13.0)
.SH "SEE ALSO"
.BR pynml (1),
.BR pynml-channelanalysis (1),
Expand Down
6 changes: 3 additions & 3 deletions man/man1/pynml-povray.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-POVRAY "1" "November 2023" "pynml-povray v1.1.9" "User Commands"
.TH PYNML-POVRAY "1" "December 2023" "pynml-povray v1.1.12" "User Commands"
.SH NAME
pynml-povray \- manual page for pynml-povray v1.1.9
pynml-povray \- manual page for pynml-povray v1.1.12
.SH DESCRIPTION
usage: pynml\-povray [\-h] [\-split] [\-background <background colour>] [\-movie]
.TP
Expand Down Expand Up @@ -96,7 +96,7 @@ cell/network
Show segment ids
.SH ENVIRONMENT
.PP
pyNeuroML v1.1.9 (libNeuroML v0.5.6, jNeuroML v0.13.0)
pyNeuroML v1.1.12 (libNeuroML v0.5.7, jNeuroML v0.13.0)
.SH "SEE ALSO"
.BR pynml (1),
.BR pynml-channelanalysis (1),
Expand Down
6 changes: 3 additions & 3 deletions man/man1/pynml-sonata.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-SONATA "1" "November 2023" "pynml-sonata v1.1.9" "User Commands"
.TH PYNML-SONATA "1" "December 2023" "pynml-sonata v1.1.12" "User Commands"
.SH NAME
pynml-sonata \- manual page for pynml-sonata v1.1.9
pynml-sonata \- manual page for pynml-sonata v1.1.12
.SH DESCRIPTION
usage: pynml\-sonata [\-h] [\-h5] [\-jnml] [\-neuron]
.IP
Expand Down Expand Up @@ -34,7 +34,7 @@ Execute the generated LEMS/NeuroML2 model with
jNeuroML_NEURON
.SH ENVIRONMENT
.PP
pyNeuroML v1.1.9 (libNeuroML v0.5.6, jNeuroML v0.13.0)
pyNeuroML v1.1.12 (libNeuroML v0.5.7, jNeuroML v0.13.0)
.SH "SEE ALSO"
.BR pynml (1),
.BR pynml-channelanalysis (1),
Expand Down
6 changes: 3 additions & 3 deletions man/man1/pynml-summary.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-SUMMARY "1" "November 2023" "pynml-summary v1.1.9" "User Commands"
.TH PYNML-SUMMARY "1" "December 2023" "pynml-summary v1.1.12" "User Commands"
.SH NAME
pynml-summary \- manual page for pynml-summary v1.1.9
pynml-summary \- manual page for pynml-summary v1.1.12
.SH DESCRIPTION
Usage:
.PP
Expand All @@ -19,7 +19,7 @@ enable verbose mode
print this help text and exit
.SH ENVIRONMENT
.PP
pyNeuroML v1.1.9 (libNeuroML v0.5.6, jNeuroML v0.13.0)
pyNeuroML v1.1.12 (libNeuroML v0.5.7, jNeuroML v0.13.0)
.SH "SEE ALSO"
.BR pynml (1),
.BR pynml-channelanalysis (1),
Expand Down
6 changes: 3 additions & 3 deletions man/man1/pynml-tune.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML-TUNE "1" "November 2023" "pynml-tune v1.1.9" "User Commands"
.TH PYNML-TUNE "1" "December 2023" "pynml-tune v1.1.12" "User Commands"
.SH NAME
pynml-tune \- manual page for pynml-tune v1.1.9
pynml-tune \- manual page for pynml-tune v1.1.12
.SH DESCRIPTION
usage: pynml\-tune [\-h] [\-simTime <simTime>] [\-dt <dt>]
.IP
Expand Down Expand Up @@ -132,7 +132,7 @@ Should (some) generated files, e.g. *.dat, be deleted
as optimisation progresses?
.SH ENVIRONMENT
.PP
pyNeuroML v1.1.9 (libNeuroML v0.5.6, jNeuroML v0.13.0)
pyNeuroML v1.1.12 (libNeuroML v0.5.7, jNeuroML v0.13.0)
.SH "SEE ALSO"
.BR pynml (1),
.BR pynml-channelanalysis (1),
Expand Down
9 changes: 6 additions & 3 deletions man/man1/pynml.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH PYNML "1" "November 2023" "pynml v1.1.9" "User Commands"
.TH PYNML "1" "December 2023" "pynml v1.1.12" "User Commands"
.SH NAME
pynml \- manual page for pynml v1.1.9
pynml \- manual page for pynml v1.1.12
.SH DESCRIPTION
usage: pynml [\-h|\-\-help] [<shared options>] <one of the mutually\-exclusive options>
.PP
Expand Down Expand Up @@ -184,9 +184,12 @@ Validate SBML file(s), unit consistency failure generates a warning
.TP
\fB\-validate\-sbml\-units\fR
Validate SBML file(s), unit consistency failure generates an error
.TP
\fB\-validate\-sedml\fR
Validate SEDML file(s)
.SH ENVIRONMENT
.PP
pyNeuroML v1.1.9 (libNeuroML v0.5.6, jNeuroML v0.13.0)
pyNeuroML v1.1.12 (libNeuroML v0.5.7, jNeuroML v0.13.0)
.SH "SEE ALSO"
.BR pynml (1),
.BR pynml-channelanalysis (1),
Expand Down
2 changes: 1 addition & 1 deletion man/man1/version.h2m
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[environment]
.PP
pyNeuroML v1.1.9 (libNeuroML v0.5.6, jNeuroML v0.13.0)
pyNeuroML v1.1.12 (libNeuroML v0.5.7, jNeuroML v0.13.0)
2 changes: 2 additions & 0 deletions pyneuroml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

try:
import importlib.metadata

__version__ = importlib.metadata.version("pyNeuroML")
except ImportError:
import importlib_metadata

__version__ = importlib_metadata.version("pyNeuroML")


Expand Down
Loading

0 comments on commit 4f8c799

Please sign in to comment.