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 various Sphinx warnings #3077

Merged
merged 7 commits into from
Jan 26, 2024
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
3 changes: 2 additions & 1 deletion doc/htmldoc/connect_nest/nest_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ a corresponding environment variable.
* ``NEST_SERVER_CORS_ORIGINS``: By default, the NEST Server only allows requests from localhost (see `CORS <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS>`_). Other hosts can be explicitly allowed by supplying them in the form `http://host_or_ip`` to this variable.
* ``NEST_SERVER_ENABLE_EXEC_CALL``: By default, NEST Server only allows calls to its PyNEST-like API. If the use-case requires the execution of scripts via the ``/exec`` route, this variable can be set to ``1``. PLEASE BE AWARE THAT THIS OPENS YOUR COMPUTER TO REMOTE CODE EXECUTION.
* ``NEST_SERVER_DISABLE_RESTRICTION``: By default, NEST Server runs all code passed to the ``/exec`` route through RestrictedPython to sanitize it. To disable this mechanism, this variable can be set to ``1``. For increased security, code passed in this way only allows explictly whitelisted modules to be imported. To import modules, the variable ``NEST_SERVER_MODULES`` can be set to a standard Python import line like this:
``NEST_SERVER_MODULES='import nest; import scipy as sp; from numpy import random'``
``NEST_SERVER_MODULES='import nest; import scipy as sp; from numpy import random'``

Run NEST Server
~~~~~~~~~~~~~~~

Expand Down
3 changes: 2 additions & 1 deletion doc/htmldoc/developer_space/cppcomments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ There are two types of code comments for C++ files: doxygen style and C++ style
* Doxygen styled comments are used for describing things like the purpose of the function, which parameters it accepts, and what output it generates.
* Use Doxygen style comments in the header (``.h``) files. Avoid using them in ``.cpp`` files.
* Do not duplicate code in comments.

.. Include the variable name in functions in header file to match cpp file.


Expand All @@ -14,7 +15,7 @@ Generate HTML from doxygen comments

To generate HTML output of the doxgyen comments,

in the build directory,
in the build directory,

run ``cmake`` with developer documentation on::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on their own.

.. seealso::

Before you make a pull request :ref:`see how to check your code <check_code>` to ensure its compliant with our guidelines.
Before you make a pull request :ref:`see which developer tools are required <required_dev_tools>` to ensure its compliant with our guidelines.

C++ language features
---------------------
Expand Down Expand Up @@ -303,7 +303,7 @@ line.

Control structures (``if``, ``while``, ``for``, ...) have a single space after the
keyword. The parenthesis around the tests
have a space after the opening and before the closing parenthesis.
have a space after the opening and before the closing parenthesis.
The case labels in ``switch`` statements are not indented.

.. code::
Expand All @@ -328,7 +328,7 @@ The case labels in ``switch`` statements are not indented.
Binary operators (`+`, `-`, `*`, `||`, `&`, ...) are surrounded by one space, e.g.
``a + b``.

Unary operators have no space between operator and operand, e.g. ``-a``.
Unary operators have no space between operator and operand, e.g. ``-a``.
Do not use the negation operator `!` since it can easily be
overseen. Instead use ``not``, e.g. ``not vec.empty()``.

Expand Down Expand Up @@ -673,5 +673,3 @@ And the corresponding ``stopwatch.cpp``:
return os;
}
}


1 change: 1 addition & 0 deletions doc/htmldoc/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ PyNEST examples
../auto_examples/csa_example
../auto_examples/csa_spatial_example
../auto_examples/hpc_benchmark
../auto_examples/astrocytes/index
../auto_examples/astrocytes/astrocyte_single
../auto_examples/astrocytes/astrocyte_interaction
../auto_examples/astrocytes/astrocyte_small_network
Expand Down
4 changes: 2 additions & 2 deletions doc/htmldoc/get-started_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Tutorials and examples

tutorials/index
PyNEST example scripts <examples/index>

understand_index

.. grid:: 1 1 2 2
:gutter: 1
Expand All @@ -24,5 +24,5 @@ Tutorials and examples



.. |nav| image:: static/img/GPS-Settings-256_nest.svg
.. |nav| image:: static/img/GPS-Settings-256_nest.svg
.. |example| image:: static/img/Documents-02-256_nest.svg
16 changes: 9 additions & 7 deletions doc/htmldoc/ref_material/pynest_api/nest.lib.hl_api_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@ Models module
=============

.. automodule:: nest.lib.hl_api_models
:members:
:members: CopyModel, GetDefaults, SetDefaults
:undoc-members:
:show-inheritance:




.. admonition:: Deprecated function

.. autofunction:: Models(mtype="all", sel=None)
``ConnectionRules`` deprecated since 3.3.

Use :py:obj:`~.NestModule.connection_rules` instead.

Deprecated since 3.3.
.. autofunction:: ConnectionRules

Use :py:obj:`~.NestModule.node_models` or :py:obj:`~.NestModule.synapse_models` instead.
.. admonition:: Deprecated function

.. autofunction:: ConnectionRules
``Models`` deprecated since 3.3.

Deprecated since 3.3.
Use :py:obj:`~.NestModule.node_models` or :py:obj:`~.NestModule.synapse_models` instead.

Use :py:obj:`~.NestModule.connection_rules` instead.
.. autofunction:: Models(mtype="all", sel=None)
24 changes: 3 additions & 21 deletions doc/htmldoc/ref_material/pynest_api/nest.lib.hl_api_spatial.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Spatial module
==============


Functions related to spatially-structured networks.

Expand All @@ -9,8 +9,6 @@ Functions related to spatially-structured networks.
See our in depth guide to :ref:`spatial_networks` for details.


Query functions for spatial layers
----------------------------------

Syntax:
~~~~~~~
Expand All @@ -19,26 +17,10 @@ Syntax:

nest.Distance(nodes[1], nodes[2])

.. automodule:: nest.lib.hl_api_spatial
:members: CreateMask, Displacement, Distance, DumpLayerConnections, DumpLayerNodes, FindCenterElement, FindNearestElement, GetPosition, GetTargetNodes, GetSourceNodes, GetTargetPositions, GetSourcePositions, SelectNodesByMask
:undoc-members:
:show-inheritance:

Visualization functions
-----------------------

Syntax:
~~~~~~~

.. code-block:: Python

nest.PlotLayer(layer, fig, nodecolor, nodesize)

.. automodule:: nest.lib.hl_api_spatial
:members: PlotLayer, PlotSources, PlotTargets, PlotProbabilityParameter
:undoc-members:
:show-inheritance:




.. automodule:: nest.lib.hl_api_spatial
:members:
5 changes: 0 additions & 5 deletions doc/htmldoc/ref_material/pynest_api/nest.lib.hl_api_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ Accessing and setting node and parameter types in NEST.
:members:
:undoc-members:
:show-inheritance:

.. automodule:: nest.lib.hl_api_info
:members: get_argv, GetStatus, SetStatus
:undoc-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion doc/htmldoc/whats_new/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ the new versions.
:hidden:
:glob:

v3.7/*
v3.6/*
v3.5/*
v3.4/*
v3.3/*
v3.2/*
v3.1/*
v3.0/*

2 changes: 1 addition & 1 deletion models/glif_psc_double_alpha.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The relative peak current of the slow component is given as ``amp_slow``, at
.. math::

I_\text{syn} = \text{alpha_function} \left( \tau_\text{syn} = \tau_\text{syn, fast} \right) + \text{amp_slow} \cdot
\text{alpha_function} \left( \tau_\text{syn} = \tau_\text{syn, slow} \right).
\text{alpha_function} \left( \tau_\text{syn} = \tau_\text{syn, slow} \right).

Therefore if ``amp_slow`` is not 0, the peak current of the total synaptic current is larger
than the specified weight. By default, ``glif_psc_double_alpha`` has a single synapse that
Expand Down
4 changes: 2 additions & 2 deletions models/ignore_and_fire.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ irrespective of the network size and structure.
The model can easily be extended and equipped with any arbitrary input processing (such as calculating input
currents with alpha-function shaped PSC kernels or updating the gating variables in the Hodgkin-Huxley model) or
(after-) spike generation dynamics to make it more similar and comparable to other non-ignorant neuron models. In
such extended ignore_and_fire models, the spike emission process would still be decoupled from the intrinsic neuron
dynamics.
such extended ignore_and_fire models, the spike emission process would still be decoupled from the intrinsic neuron
dynamics.

Parameters
++++++++++
Expand Down
4 changes: 2 additions & 2 deletions pynest/examples/glif_psc_double_alpha_neuron.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

"""
Current-based generalized leaky integrate and fire (GLIF) neuron with double alpha \
synaptic function example
------------------------------------------------------------------------
synaptic function
-------------------------------------------------------------------------------------------------------------

Simple example of how to use the ``glif_psc_double_alpha`` neuron model that illustrates
differences from the ``glif_psc`` neuron model.
Expand Down
8 changes: 4 additions & 4 deletions pynest/nest/lib/hl_api_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
]


@deprecated("nest.node_models or nest.synapse_models")
@check_stack
@deprecated("nest.node_models or nest.synapse_models")
def Models(mtype="all", sel=None):
"""Return a tuple of neuron, device, or synapse model names.
r"""Return a tuple of neuron, device, or synapse model names.

Parameters
----------
Expand All @@ -68,7 +68,7 @@ def Models(mtype="all", sel=None):
Notes
-----
- Synapse model names ending in ``_hpc`` require less memory because of
thread-local indices for target neuron IDs and fixed ``rport``s of 0.
thread-local indices for target neuron IDs and fixed ``rport``\s of 0.
- Synapse model names ending in ``_lbl`` allow to assign an integer label
(``synapse_label``) to each individual synapse, at the cost of increased
memory requirements.
Expand All @@ -94,8 +94,8 @@ def Models(mtype="all", sel=None):
return tuple(models)


@deprecated("nest.connection_rules")
@check_stack
@deprecated("nest.connection_rules")
def ConnectionRules():
"""Return a tuple of all available connection rules, sorted by name.

Expand Down
2 changes: 1 addition & 1 deletion pynest/nest/lib/hl_api_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def ResetKernel():
def SetKernelStatus(params):
"""Set parameters for the simulation kernel.

See the documentation of :ref:`sec:kernel_attributes` for a valid
See the documentation of :ref:`sec_kernel_attributes` for a valid
list of params.

Parameters
Expand Down
Loading