From 0aed3c05cb02930db94d11e6836a314d928aa4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 16 Jun 2020 18:08:07 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Fix=20some=20intersphinx=20issue?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/conf.py | 3 ++- docs/configuration/logging_yaml.rst | 6 +++--- docs/features/custom_controls.rst | 4 ++-- docs/plugins/hooks.rst | 12 ++++++------ docs/plugins/injectedproperties.rst | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index d88783527..e774cb6bb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,7 +38,8 @@ extensions = ['codeblockext', 'onlineinclude', 'sphinx.ext.todo', 'sphinx.ext.au 'sphinx.ext.napoleon', 'sphinxcontrib.mermaid', 'sphinx.ext.intersphinx'] todo_include_todos = True intersphinx_mapping = {'python': ('https://docs.python.org/3', None), - 'python2': ('https://docs.python.org/2', None)} + 'python2': ('https://docs.python.org/2', None), + 'pyserial': ('https://pythonhosted.org/pyserial', None)} # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/docs/configuration/logging_yaml.rst b/docs/configuration/logging_yaml.rst index bb68c2028..b0de4ef19 100644 --- a/docs/configuration/logging_yaml.rst +++ b/docs/configuration/logging_yaml.rst @@ -81,8 +81,8 @@ used for the ``serial.log`` and the ``console`` handler used for the output to s maxBytes: 2097152 # 2 * 1024 * 1024 = 2 MB in bytes filename: /path/to/octoprints/logs/serial.log -You can find more information on the used logging handlers in the -`Python documentation on logging handlers `_. +You can find more information on the used logging handlers in the Python documentation on +:py:mod:`logging.handlers`. Changing logging formatters --------------------------- @@ -97,4 +97,4 @@ expressed in YAML as follows: format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s" The possible keys for the logging format can be found in the -`Python documentation on LogRecord attributes `_. +:ref:`Python documentation on LogRecord attributes `. diff --git a/docs/features/custom_controls.rst b/docs/features/custom_controls.rst index f130596c1..fa69cc435 100644 --- a/docs/features/custom_controls.rst +++ b/docs/features/custom_controls.rst @@ -210,12 +210,12 @@ Controls * - ``input.slider.step`` - (Optional) Step size per slider "tick", defaults to 1. * - ``regex`` - - (Optional) A `regular expression `_ to + - (Optional) A :ref:`regular expression ` to match against lines received from the printer to retrieve information from it (e.g. specific output). Together with ``template`` this allows rendition of received data from the printer within the UI. * - ``template`` - (Optional) A template to use for rendering the match of ``regex``. May contain placeholders in - `Python Format String Syntax `_ for either named + :ref:`Python Format String Syntax ` for either named groups within the regex (e.g. ``Temperature: {temperature}`` for a regex ``T:\s*(?P\d+(\.\d*)``) or positional groups within the regex (e.g. ``Position: X={0}, Y={1}, Z={2}, E={3}`` for a regex ``X:([0-9.]+) Y:([0-9.]+) Z:([0-9.]+) E:([0-9.]+)``). diff --git a/docs/plugins/hooks.rst b/docs/plugins/hooks.rst index 506d025ef..791ba4cc3 100644 --- a/docs/plugins/hooks.rst +++ b/docs/plugins/hooks.rst @@ -926,21 +926,21 @@ octoprint.comm.transport.serial.factory closely if directly utilizing :class:`~octoprint.util.comm.MachineCom` functionality. A valid serial instance is expected to provide the following methods, analogue to PySerial's - `serial.Serial `_: + :py:class:`serial.Serial`: readline(size=None, eol='\n') - Reads a line from the serial connection, compare `serial.Filelike.readline `_. + Reads a line from the serial connection, compare :py:meth:`serial.Serial.readline`. write(data) - Writes data to the serial connection, compare `serial.Filelike.write `_. + Writes data to the serial connection, compare :py:meth:`serial.Serial.write`. close() - Closes the serial connection, compare `serial.Serial.close `_. + Closes the serial connection, compare :py:meth:`serial.Serial.close`. Additionally setting the following attributes need to be supported if baudrate detection is supposed to work: baudrate - An integer describing the baudrate to use for the serial connection, compare `serial.Serial.baudrate `_. + An integer describing the baudrate to use for the serial connection, compare :py:attr:`serial.Serial.baudrate`. timeout - An integer describing the read timeout on the serial connection, compare `serial.Serial.timeout `_. + An integer describing the read timeout on the serial connection, compare :py:attr:`serial.Serial.timeout`. **Example:** diff --git a/docs/plugins/injectedproperties.rst b/docs/plugins/injectedproperties.rst index 15ee482d2..e531c3bca 100644 --- a/docs/plugins/injectedproperties.rst +++ b/docs/plugins/injectedproperties.rst @@ -22,7 +22,7 @@ An overview of these properties follows. data files etc). Plugins should not access this property directly but instead utilize :func:`~octoprint.plugin.types.OctoPrintPlugin.get_plugin_data_folder` which will make sure the path actually does exist and if not create it before returning it. ``self._logger`` - A `python logger instance `_ logging to the log target + A :py:class:`logging.Logger` instance logging to the log target ``octoprint.plugin.``. ``self._settings`` The plugin's personalized settings manager, injected only into plugins that include the :class:`~octoprint.plugin.SettingsPlugin` mixin.