Skip to content

Commit

Permalink
docs: minor fixes to improve rtd generation
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjayankur31 committed Oct 20, 2023
1 parent 3674f6b commit 20f1eff
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 23 deletions.
7 changes: 7 additions & 0 deletions docs/source/pyneuroml.archive.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyneuroml.archive package
==========================

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

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

.. automodule:: pyneuroml.pynml
:members:
:undoc-members:
:show-inheritance:
17 changes: 5 additions & 12 deletions docs/source/pyneuroml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,17 @@ Subpackages
-----------

.. toctree::
:maxdepth: 4
:maxdepth: 1

pyneuroml.pynml
pyneuroml.analysis
pyneuroml.archive
pyneuroml.channelml
pyneuroml.lems
pyneuroml.neuron
pyneuroml.nsgr
pyneuroml.plot
pyneuroml.povray
pyneuroml.swc
pyneuroml.tune
pyneuroml.neuron
pyneuroml.utils


pyneuroml.pynml module
----------------------

.. automodule:: pyneuroml.pynml
:members:
:undoc-members:
:show-inheritance:

13 changes: 7 additions & 6 deletions pyneuroml/analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def generate_current_vs_frequency_curve(
return_axes: bool = False,
verbose: bool = False,
segment_id: typing.Optional[str] = None,
fraction_along: typing.Optional[float] = None
fraction_along: typing.Optional[float] = None,
):
"""Generate current vs firing rate frequency curves for provided cell.
Expand All @@ -81,7 +81,7 @@ def generate_current_vs_frequency_curve(
stimulus currents.
The various plotting related arguments to this method are passed on to
:py:method`pynml.generate_plot`
:py:meth:`pyneuroml.plot.generate_plot`
:param nml2_file: name of NeuroML file containing cell definition
:type nml2_file: str
Expand Down Expand Up @@ -251,8 +251,11 @@ def generate_current_vs_frequency_curve(
# Add these to cells
input_list = nml.InputList(id=input_id, component=pg.id, populations=pop.id)
aninput = nml.Input(
id="0", target="../%s[%i]" % (pop.id, i), destination="synapses",
segment_id=segment_id, fraction_along=fraction_along
id="0",
target="../%s[%i]" % (pop.id, i),
destination="synapses",
segment_id=segment_id,
fraction_along=fraction_along,
)
input_list.input.append(aninput)

Expand Down Expand Up @@ -378,7 +381,6 @@ def generate_current_vs_frequency_curve(
iv_results[stims[i]] = v_end

if plot_voltage_traces:

traces_ax = pynml.generate_plot(
times_results,
volts_results,
Expand Down Expand Up @@ -505,7 +507,6 @@ def analyse_spiketime_vs_dt(
save_figure_to=None,
num_of_last_spikes=None,
):

from pyelectro.analysis import max_min
import numpy as np

Expand Down
6 changes: 3 additions & 3 deletions pyneuroml/nsgr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def run_on_nsg(
.. versionadded:: 1.0.10
:param engine: name of engine: suffixes of the run_lems_with.. functions
:param engine: name of engine: suffixes of the run_lems_with functions
:type engine: str
:param lems_file_name: name of LEMS simulation file
:type lems_file_name: str
Expand All @@ -83,9 +83,9 @@ def run_on_nsg(
It is good practice to separate directories where simulations are run
from the source of the model/simulations.
:type run_dir: str
:param *engine_args: positional args to be passed to the engine runner
:param engine_args: positional args to be passed to the engine runner
function
:param **engine_kwargs: keyword args to be be passed to the engine runner
:param engine_kwargs: keyword args to be be passed to the engine runner
function
:param dry_run: do everything but do not submit
:type dry_run: bool
Expand Down
4 changes: 2 additions & 2 deletions pyneuroml/pynml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1330,8 +1330,8 @@ def run_lems_with(engine: str, *args: typing.Any, **kwargs: typing.Any):
:param engine: engine to run with
:type engine: string (valid names are methods)
:param *args: postional arguments to pass to run function
:param **kwargs: named arguments to pass to run function
:param args: postional arguments to pass to run function
:param kwargs: named arguments to pass to run function
:returns: return value of called method
"""
Expand Down

0 comments on commit 20f1eff

Please sign in to comment.