Skip to content
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
28 changes: 18 additions & 10 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,28 @@
from pymodbus import __version__ as pymodbus_version


parent_dir = os.path.abspath(os.pardir)
sys.path.insert(0, parent_dir)
sys.path.append(os.path.join(parent_dir, "examples"))
github_doc_root = "https://github.com/pymodbus-dev/pymodbus/tree/master/doc/"

# -- General configuration ------------------------------------------------
extensions = ["sphinx.ext.autodoc", "sphinx_rtd_theme", "sphinx.ext.autosectionlabel"]
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.extlinks",
"sphinx_rtd_theme",
"sphinx.ext.autosectionlabel"
]
source_suffix = [".rst"]
master_doc = "index"
root_doc = "index"
project = "PyModbus"
copyright = "See license"
author = "Open Source volunteers"
version = pymodbus_version
if "dev" in pymodbus_version:
version = "dev"
else:
version = "v" + pymodbus_version
release = pymodbus_version
language = "en"
exclude_patterns = ["build", "Thumbs.db", ".DS_Store"]
pygments_style = "sphinx"
todo_include_todos = False


# -- Options for HTML output ----------------------------------------------
html_theme = "sphinx_rtd_theme"
html_static_path = []
Expand All @@ -44,13 +46,19 @@
]
}

# -- Specials ----------------------------------------------
parent_dir = os.path.abspath(os.pardir)
sys.path.insert(0, parent_dir)
sys.path.append(os.path.join(parent_dir, "examples"))
github = f"https://github.com/pymodbus-dev/pymodbus/blob/{version}/"
extlinks = {'github': (github + '%s', '%s')}

def setup(app):
"""Do setup."""
app.add_config_value(
"recommonmark_config",
{
"url_resolver": lambda url: github_doc_root + url,
"url_resolver": lambda url: github + "doc/" + url,
"auto_toc_tree_section": "Contents",
},
True,
Expand Down
4 changes: 2 additions & 2 deletions doc/source/REPL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ Pymodbus REPL comes with many handy features such as payload decoder
to directly retrieve the values in desired format and supports all
the diagnostic function codes directly .

For more info on REPL Client refer `Pymodbus REPL Client <https://github.com/pymodbus-dev/pymodbus/blob/dev/pymodbus/repl/client/README.rst>`_
For more info on REPL Client refer :github:`pymodbus/repl/client/README.rst`

.. image:: https://asciinema.org/a/y1xOk7lm59U1bRBE2N1pDIj2o.png
:target: https://asciinema.org/a/y1xOk7lm59U1bRBE2N1pDIj2o
Expand All @@ -357,7 +357,7 @@ Pymodbus REPL Server

Pymodbus also comes with a REPL server to quickly run an asynchronous server with additional capabilities out of the box like simulating errors, delay, mangled messages etc.

For more info on REPL Server refer `Pymodbus REPL Server <https://github.com/pymodbus-dev/pymodbus/blob/dev/pymodbus/repl/server/README.rst>`_
For more info on REPL Server refer :github:`pymodbus/repl/server/README.rst`

.. image:: https://img.youtube.com/vi/OutaVz0JkWg/maxresdefault.jpg
:target: https://youtu.be/OutaVz0JkWg
2 changes: 1 addition & 1 deletion doc/source/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ It is allowed to have multiple client objects that e.g. each communicate with a
Client performance
------------------
There are currently a big performance gab between the 2 clients
(try it on your computer `performance test <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/client_performance.py>`_).
(try it on your computer :github:`examples/client_performance.py`).
This is due to a rather old implementation of the synchronous client, we are currently working to update the client code.
Our aim is to achieve a similar data rate with both clients and at least double the data rate while keeping the stability.
Table below is a test with 1000 calls each reading 10 registers.
Expand Down
48 changes: 24 additions & 24 deletions doc/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ You need to modify the code to adapt it to your situation.

Simple asynchronous client
^^^^^^^^^^^^^^^^^^^^^^^^^^
Source: `examples/simple_async_client.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/simple_async_client.py>`_
Source: :github:`examples/simple_async_client.py`

.. literalinclude:: ../../examples/simple_async_client.py

Simple synchronous client
^^^^^^^^^^^^^^^^^^^^^^^^^^
Source: `examples/simple_sync_client.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/simple_sync_client.py>`_
Source: :github:`examples/simple_sync_client.py`

.. literalinclude:: ../../examples/simple_sync_client.py


Client performance sync vs async
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Source: `examples/client_performance.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/client_performance.py>`_
Source: :github:`examples/client_performance.py`

.. literalinclude:: ../../examples/client_performance.py

Expand All @@ -54,7 +54,7 @@ because they are tested automatilly with each dev branch commit using CI.

Client asynchronous calls
^^^^^^^^^^^^^^^^^^^^^^^^^
Source: `examples/client_async_calls.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/client_async_calls.py>`_
Source: :github:`examples/client_async_calls.py`

.. automodule:: examples.client_async_calls
:undoc-members:
Expand All @@ -63,7 +63,7 @@ Source: `examples/client_async_calls.py <https://github.com/pymodbus-dev/pymodbu

Client asynchronous
^^^^^^^^^^^^^^^^^^^
Source: `examples/client_async.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/client_async.py>`_
Source: :github:`examples/client_async.py`

.. automodule:: examples.client_async
:undoc-members:
Expand All @@ -72,7 +72,7 @@ Source: `examples/client_async.py <https://github.com/pymodbus-dev/pymodbus/blob

Client calls
^^^^^^^^^^^^
Source: `examples/client_calls.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/client_calls.py>`_
Source: :github:`examples/client_calls.py`

.. automodule:: examples.client_calls
:undoc-members:
Expand All @@ -81,7 +81,7 @@ Source: `examples/client_calls.py <https://github.com/pymodbus-dev/pymodbus/blob

Client custom message
^^^^^^^^^^^^^^^^^^^^^
Source: `examples/client_custom_msg.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/client_custom_msg.py>`_
Source: :github:`examples/client_custom_msg.py`

.. automodule:: examples.client_custom_msg
:undoc-members:
Expand All @@ -90,15 +90,15 @@ Source: `examples/client_custom_msg.py <https://github.com/pymodbus-dev/pymodbus

Client payload
^^^^^^^^^^^^^^
Source: `examples/client_payload.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/client_payload.py>`_
Source: :github:`examples/client_payload.py`

.. automodule:: examples.client_payload
:undoc-members:
:noindex:

Client synchronous
^^^^^^^^^^^^^^^^^^
Source: `examples/client_sync.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/client_sync.py>`_
Source: :github:`examples/client_sync.py`

.. automodule:: examples.client_sync
:undoc-members:
Expand All @@ -107,7 +107,7 @@ Source: `examples/client_sync.py <https://github.com/pymodbus-dev/pymodbus/blob/

Server asynchronous
^^^^^^^^^^^^^^^^^^^
Source: `examples/server_async.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/server_async.py>`_
Source: :github:`examples/server_async.py`

.. automodule:: examples.server_async
:undoc-members:
Expand All @@ -116,7 +116,7 @@ Source: `examples/server_async.py <https://github.com/pymodbus-dev/pymodbus/blob

Server callback
^^^^^^^^^^^^^^^
Source: `examples/server_callback.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/server_callback.py>`_
Source: :github:`examples/server_callback.py`

.. automodule:: examples.server_callback
:undoc-members:
Expand All @@ -125,7 +125,7 @@ Source: `examples/server_callback.py <https://github.com/pymodbus-dev/pymodbus/b

Server tracer
^^^^^^^^^^^^^
Source: `examples/server_hook.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/server_hook.py>`_
Source: :github:`examples/server_hook.py`

.. automodule:: examples.server_hook
:undoc-members:
Expand All @@ -134,7 +134,7 @@ Source: `examples/server_hook.py <https://github.com/pymodbus-dev/pymodbus/blob/

Server payload
^^^^^^^^^^^^^^
Source: `examples/server_payload.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/server_payload.py>`_
Source: :github:`examples/server_payload.py`

.. automodule:: examples.server_payload
:undoc-members:
Expand All @@ -143,7 +143,7 @@ Source: `examples/server_payload.py <https://github.com/pymodbus-dev/pymodbus/bl

Server synchronous
^^^^^^^^^^^^^^^^^^
Source: `examples/server_sync.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/server_sync.py>`_
Source: :github:`examples/server_sync.py`

.. automodule:: examples.server_sync
:undoc-members:
Expand All @@ -152,7 +152,7 @@ Source: `examples/server_sync.py <https://github.com/pymodbus-dev/pymodbus/blob/

Server updating
^^^^^^^^^^^^^^^
Source: `examples/server_updating.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/server_updating.py>`_
Source: :github:`examples/server_updating.py`

.. automodule:: examples.server_updating
:undoc-members:
Expand All @@ -161,7 +161,7 @@ Source: `examples/server_updating.py <https://github.com/pymodbus-dev/pymodbus/b

Simulator example
^^^^^^^^^^^^^^^^^
Source: `examples/simulator.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/simulator.py>`_
Source: :github:`examples/simulator.py`

.. automodule:: examples.simulator
:undoc-members:
Expand All @@ -170,7 +170,7 @@ Source: `examples/simulator.py <https://github.com/pymodbus-dev/pymodbus/blob/de

Simulator datastore example
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Source: `examples/datastore_simulator.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/datastore_simulator.py>`_
Source: :github:`examples/datastore_simulator.py`

.. automodule:: examples.datastore_simulator
:undoc-members:
Expand All @@ -179,7 +179,7 @@ Source: `examples/datastore_simulator.py <https://github.com/pymodbus-dev/pymodb

Message generator
^^^^^^^^^^^^^^^^^
Source: `examples/message_generator.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/message_generator.py>`_
Source: :github:`examples/message_generator.py`

.. automodule:: examples.message_generator
:undoc-members:
Expand All @@ -188,7 +188,7 @@ Source: `examples/message_generator.py <https://github.com/pymodbus-dev/pymodbus

Message Parser
^^^^^^^^^^^^^^
Source: `examples/message_parser.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/message_parser.py>`_
Source: :github:`examples/message_parser.py`

.. automodule:: examples.message_parser
:undoc-members:
Expand All @@ -197,7 +197,7 @@ Source: `examples/message_parser.py <https://github.com/pymodbus-dev/pymodbus/bl

Modbus forwarder
^^^^^^^^^^^^^^^^
Source: `examples/modbus_forwarder.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/modbus_forwarder.py>`_
Source: :github:`examples/modbus_forwarder.py`

.. automodule:: examples.modbus_forwarder
:undoc-members:
Expand All @@ -212,7 +212,7 @@ The pymodbus team thanks for sharing the examples.

Solar
^^^^^
Source: :`examples/contrib/solar.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/contrib/solar.py>`_
Source: :github:`examples/contrib/solar.py`

.. automodule:: examples.contrib.solar
:undoc-members:
Expand All @@ -221,7 +221,7 @@ Source: :`examples/contrib/solar.py <https://github.com/pymodbus-dev/pymodbus/bl

Redis datastore
^^^^^^^^^^^^^^^
Source: `examples/contrib/redis_datastore.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/contrib/redis_datastore.py>`_
Source: :github:`examples/contrib/redis_datastore.py`

.. automodule:: examples.contrib.redis_datastore
:undoc-members:
Expand All @@ -230,7 +230,7 @@ Source: `examples/contrib/redis_datastore.py <https://github.com/pymodbus-dev/py

Serial Forwarder
^^^^^^^^^^^^^^^^
Source: `examples/contrib/serial_forwarder.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/contrib/serial_forwarder.py>`_
Source: :github:`examples/contrib/serial_forwarder.py`

.. automodule:: examples.contrib.serial_forwarder
:undoc-members:
Expand All @@ -239,7 +239,7 @@ Source: `examples/contrib/serial_forwarder.py <https://github.com/pymodbus-dev/p

Sqlalchemy datastore
^^^^^^^^^^^^^^^^^^^^
Source: `examples/contrib/sql_datastore.py <https://github.com/pymodbus-dev/pymodbus/blob/dev/examples/contrib/sql_datastore.py>`_
Source: :github:`examples/contrib/sql_datastore.py`

.. automodule:: examples.contrib.sql_datastore
:undoc-members:
Expand Down
8 changes: 4 additions & 4 deletions doc/source/library/simulator/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Server configuration examples
"identity": {
"VendorName": "pymodbus",
"ProductCode": "PM",
"VendorUrl": "https://github.com/riptideio/pymodbus/",
"VendorUrl": "https://github.com/pymodbus-dev/pymodbus",
"ProductName": "pymodbus Server",
"ModelName": "pymodbus Server",
"MajorMinorRevision": "3.1.0"
Expand All @@ -109,7 +109,7 @@ Server configuration examples
"identity": {
"VendorName": "pymodbus",
"ProductCode": "PM",
"VendorUrl": "https://github.com/riptideio/pymodbus/",
"VendorUrl": "https://github.com/pymodbus-dev/pymodbus",
"ProductName": "pymodbus Server",
"ModelName": "pymodbus Server",
"MajorMinorRevision": "3.1.0"
Expand All @@ -126,7 +126,7 @@ Server configuration examples
"identity": {
"VendorName": "pymodbus",
"ProductCode": "PM",
"VendorUrl": "https://github.com/riptideio/pymodbus/",
"VendorUrl": "https://github.com/pymodbus-dev/pymodbus",
"ProductName": "pymodbus Server",
"ModelName": "pymodbus Server",
"MajorMinorRevision": "3.1.0"
Expand All @@ -141,7 +141,7 @@ Server configuration examples
"identity": {
"VendorName": "pymodbus",
"ProductCode": "PM",
"VendorUrl": "https://github.com/riptideio/pymodbus/",
"VendorUrl": "https://github.com/pymodbus-dev/pymodbus",
"ProductName": "pymodbus Server",
"ModelName": "pymodbus Server",
"MajorMinorRevision": "3.1.0"
Expand Down