Skip to content

Commit

Permalink
sphinx: set up the examples so they show up in the generated doc
Browse files Browse the repository at this point in the history
This tweaks the conf.py.in config so that examples shows up in the
examples section of the doc.

Note: These are examples, not tools, as tools are deployed, and
examples are not. Since they are not deployed, just call them
examples. Also include iio_info to the list.

Signed-off-by: Robin Getz <[email protected]>
  • Loading branch information
rgetz committed Apr 18, 2020
1 parent 9960759 commit f99017d
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 12 deletions.
1 change: 1 addition & 0 deletions bindings/python/doc/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import os
import sys
sys.path.insert(0, os.path.abspath('../.'))
sys.path.insert(0, os.path.abspath('../examples'))

import sphinx_rtd_theme

Expand Down
12 changes: 12 additions & 0 deletions bindings/python/doc/examples.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Examples
==================


Complete Application Examples
------------------------------
.. toctree::
iio_readdev
iio_writedev
iio_info


Code Snippets
-----------------------------

Scan contexts and list channels of each device

.. code-block:: python
Expand Down
8 changes: 8 additions & 0 deletions bindings/python/doc/iio_info.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
iio_info
=====================
| iio_info is part of the Libiio package, a library that has been developed to ease the development of software interfacing Linux Industrial I/O (IIO) devices.
| This tool is written using the libiio Python bindings. It works in the same way as the base iio_info works. You can find more informations about it on this `page <https://wiki.analog.com/resources/tools-software/linux-software/libiio/iio_info>`_.
.. automodule:: iio_info
:members:
:undoc-members:
2 changes: 1 addition & 1 deletion bindings/python/doc/iio_readdev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ iio_readdev
| iio_readdev is part of the Libiio package, a library that has been developed to ease the development of software interfacing Linux Industrial I/O (IIO) devices.
| This tool is written using the libiio Python bindings. It works in the same way as the base iio_readdev works. You can find more informations about it on this `page <https://wiki.analog.com/resources/tools-software/linux-software/libiio/iio_readdev?s[]=readdev>`_.
.. automodule:: examples.iio_readdev
.. automodule:: iio_readdev
:members:
2 changes: 1 addition & 1 deletion bindings/python/doc/iio_writedev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ iio_writedev
| iio_writedev is part of the Libiio package, a library that has been developed to ease the development of software interfacing Linux Industrial I/O (IIO) devices.
| This tool is written using the libiio Python bindings. It works in the same way as the base iio_writedev works. You can find more informations about it on this `page <https://wiki.analog.com/resources/tools-software/linux-software/libiio/iio_writedev>`_.
.. automodule:: examples.iio_writedev
.. automodule:: iio_writedev
:members:
3 changes: 1 addition & 2 deletions bindings/python/doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
libiio Python Bindings
==================================

Python bindings for the Industrial I/O interface library.
Python bindings for the `Industrial I/O <../index.html>`_ interface library.

Installation
==================
Expand Down Expand Up @@ -43,7 +43,6 @@ Components
channel
trigger
examples
tools

Indices and tables
==================
Expand Down
8 changes: 0 additions & 8 deletions bindings/python/doc/tools.rst

This file was deleted.

0 comments on commit f99017d

Please sign in to comment.