Skip to content

Commit 8c84aad

Browse files
doc: fix inline interpreted text without a role
sphinx became stricter when handling interpreted text without a role, e.g. "`foo`" since [1], see [2]. This results in errors such as: sphinx.errors.SphinxError: cannot determine default role! In the past, heuristics were used to determine how to format the text (inline code, italic, ..). In labgrid, interpreted text without a role is used inconsistently. Most times it was actually meant to be either inline code ("``foo``"), italic text or links to docs sections or class definitions. Fix all such occurrences with explicit variants that actually make sense in their respective contexts. [1] sphinx-doc/sphinx@114093c [2] sphinx-doc/sphinx#13904 Signed-off-by: Bastian Krause <bst@pengutronix.de>
1 parent fc8901c commit 8c84aad

File tree

5 files changed

+139
-126
lines changed

5 files changed

+139
-126
lines changed

doc/configuration.rst

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,9 @@ USB based gpiochips.
637637
'@ID_SERIAL_SHORT': 'D38EJ8LF'
638638
pin: 0
639639
640-
The example would search for a USB gpiochip with the key `ID_SERIAL_SHORT`
641-
and the value `D38EJ8LF` and use the pin 0 of this device.
642-
The `ID_SERIAL_SHORT` property is set by the usb_id builtin helper program.
640+
The example would search for a USB gpiochip with the key ``ID_SERIAL_SHORT``
641+
and the value ``D38EJ8LF`` and use the pin 0 of this device.
642+
The ``ID_SERIAL_SHORT`` property is set by the usb_id builtin helper program.
643643

644644
Arguments:
645645
- match (dict): key and value pairs for a udev match, see `udev Matching`_
@@ -695,7 +695,7 @@ Writing images to disk requires installation of ``dd`` or optionally
695695

696696
For mounting the file system and writing into it,
697697
`PyGObject <https://pygobject.readthedocs.io/>`_ must be installed.
698-
For Debian, the necessary packages are `python3-gi` and `gir1.2-udisks-2.0`.
698+
For Debian, the necessary packages are ``python3-gi`` and ``gir1.2-udisks-2.0``.
699699
This is not required for writing images to disks.
700700

701701
Arguments:
@@ -1550,15 +1550,15 @@ This manager is automatically created when a resource derived from
15501550
:any:`USBResource` (such as :any:`USBSerialPort`, :any:`IMXUSBLoader` or
15511551
:any:`AndroidUSBFastboot`) is instantiated.
15521552

1553-
To identify the kernel device which corresponds to a configured `USBResource`,
1553+
To identify the kernel device which corresponds to a configured :any:`USBResource`,
15541554
each existing (and subsequently added) kernel device is matched against the
15551555
configured resources.
1556-
This is based on a list of `match entries` which must all be tested
1556+
This is based on a list of *match entries* which must all be tested
15571557
successfully against the potential kernel device.
15581558
Match entries starting with an ``@`` are checked against the device's parents
15591559
instead of itself; here one matching parent causes the check to be successful.
15601560

1561-
A given `USBResource` class has builtin match entries that are checked first,
1561+
A given :any:`USBResource` class has builtin match entries that are checked first,
15621562
for example that the ``SUBSYSTEM`` is ``tty`` as in the case of the
15631563
:any:`USBSerialPort`.
15641564
Only if these succeed, match entries provided by the user for the resource
@@ -2977,7 +2977,7 @@ tool.
29772977
Binds to:
29782978
mux:
29792979
- `LXAUSBMux`_
2980-
- `NetworkLXAUSBMux`
2980+
- `NetworkLXAUSBMux`_
29812981

29822982
Implements:
29832983
- None yet
@@ -2998,7 +2998,7 @@ tool.
29982998
Binds to:
29992999
mux:
30003000
- `USBSDWireDevice`_
3001-
- `NetworkUSBSDWireDevice`
3001+
- `NetworkUSBSDWireDevice`_
30023002

30033003
Implements:
30043004
- None yet
@@ -3030,7 +3030,7 @@ Arguments:
30303030
Although the driver can be used from Python code by calling the ``stream()``
30313031
method, it is currently mainly useful for the ``video`` subcommand of
30323032
``labgrid-client``.
3033-
It supports the `Logitech HD Pro Webcam C920` with the USB ID 046d:082d and a
3033+
It supports the *Logitech HD Pro Webcam C920* with the USB ID ``046d:082d`` and a
30343034
few others.
30353035
More cameras can be added to ``get_qualities()`` and ``get_pipeline()`` in
30363036
``labgrid/driver/usbvideodriver.py``.
@@ -3078,7 +3078,7 @@ Arguments:
30783078
Currently, it can be used by the ``labgrid-client`` ``tmc`` subcommands to show
30793079
(and save) a screenshot, to show per channel measurements and to execute raw
30803080
TMC commands.
3081-
It only supports the `Keysight DSO-X 2000` series (with the USB ID 0957:1798),
3081+
It only supports the *Keysight DSO-X 2000* series (with the USB ID ``0957:1798``),
30823082
but more devices can be added by extending ``on_activate()`` in
30833083
``labgrid/driver/usbtmcdriver.py`` and writing a corresponding backend in
30843084
``labgrid/driver/usbtmc/``.
@@ -3225,14 +3225,14 @@ flashed.
32253225
XenaDriver
32263226
~~~~~~~~~~
32273227
The :any:`XenaDriver` allows to use Xena networking test equipment.
3228-
Using the `xenavalkyrie` library a full API to control the tester is available.
3228+
Using the ``xenavalkyrie`` library a full API to control the tester is available.
32293229

32303230
Binds to:
32313231
xena_manager:
32323232
- `XenaManager`_
32333233

32343234
The driver is supposed to work with all Xena products from the "Valkyrie Layer 2-3 Test platform"
3235-
Currently tested on a `XenaCompact` chassis equipped with a `1 GE test module`.
3235+
Currently tested on a *XenaCompact* chassis equipped with a *1 GE test module*.
32363236

32373237
DockerDriver
32383238
~~~~~~~~~~~~
@@ -3269,7 +3269,7 @@ Arguments:
32693269
containers storage. Throw an error if no image is found and the pull
32703270
fails.
32713271
- never: Never pull the image but use the one from the local containers
3272-
storage. Throw a `docker.errors.ImageNotFound` if no image is found.
3272+
storage. Throw a ``docker.errors.ImageNotFound`` if no image is found.
32733273

32743274
- command (str): optional, command to run in the container (depends on image)
32753275
- volumes (list): optional, list to configure volumes mounted inside the container
@@ -3422,6 +3422,8 @@ Strategies
34223422
Strategies are used to ensure that the device is in a certain state during a test.
34233423
Such a state could be the bootloader or a booted Linux kernel with shell.
34243424

3425+
.. _conf-bareboxstrategy:
3426+
34253427
BareboxStrategy
34263428
~~~~~~~~~~~~~~~
34273429
A :any:`BareboxStrategy` has four states:
@@ -3622,7 +3624,7 @@ StepReporter
36223624
.. warning::
36233625
The StepReporter is deprecated, use the `StepLogger`_ instead.
36243626

3625-
The :any:`StepReporter` outputs individual labgrid steps to `STDOUT`.
3627+
The :any:`StepReporter` outputs individual labgrid steps to ``STDOUT``.
36263628

36273629
.. doctest::
36283630

@@ -3836,8 +3838,8 @@ Exporter Configuration
38363838
The exporter is configured by using a YAML file (with a syntax similar to the
38373839
environment configs used for pytest) or by instantiating the :any:`Environment`
38383840
object.
3839-
To configure the exporter, you need to define one or more `resource groups`,
3840-
each containing one or more `resources`.
3841+
To configure the exporter, you need to define one or more *resource groups*,
3842+
each containing one or more *resources*.
38413843
The syntax for exported resource names is ``<exporter>/<group>/<class>/<name>``,
38423844
which allows the exporter to group resources for various usage scenarios, e.g.
38433845
all resources of a specific place or for a specific test setup.
@@ -3861,7 +3863,7 @@ The basic structure of an exporter configuration file is:
38613863
<params>
38623864
38633865
By default, the class name is inferred from the resource name,
3864-
and `<params>` will be passed to its constructor.
3866+
and ``<params>`` will be passed to its constructor.
38653867
For USB resources, you will most likely want to use :ref:`udev-matching` here.
38663868

38673869
As a simple example, here is one group called ``usb-hub-in-rack12`` containing

doc/development.rst

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ added.
278278
``broken`` attribute and raise a ``StrategyError`` for the original and all
279279
subsequent calls to the decorated methods.
280280

281-
Lets take a look at the builtin `BareboxStrategy`.
281+
Lets take a look at the builtin :ref:`BareboxStrategy <conf-bareboxstrategy>`.
282282
The Status enum for the BareboxStrategy:
283283

284284
::
@@ -289,7 +289,7 @@ The Status enum for the BareboxStrategy:
289289
barebox = 2
290290
shell = 3
291291

292-
defines three custom states and the `unknown` state as the start point.
292+
defines three custom states and the ``unknown`` state as the start point.
293293
These three states are handled in the transition function:
294294

295295
::
@@ -312,13 +312,13 @@ These three states are handled in the transition function:
312312
self.barebox.await_boot()
313313
self.target.activate(self.shell)
314314

315-
Here, the `barebox` state simply cycles the board and activates the driver,
316-
while the `shell` state uses the barebox state to cycle the board and then boot
315+
Here, the ``barebox`` state simply cycles the board and activates the driver,
316+
while the ``shell`` state uses the barebox state to cycle the board and then boot
317317
the linux kernel.
318-
The `off` state switches the power off.
318+
The ``off`` state switches the power off.
319319

320320
Oftentimes it is also necessary to wait for specific resources to appear before
321-
a transition can be continued. The `await_resources` function of the target
321+
a transition can be continued. The ``await_resources()`` function of the target
322322
implements this functionality, it expects a list of resources to wait for and
323323
optionally takes a timeout and whether the resource should be available or
324324
unavailable.
@@ -514,32 +514,33 @@ A transition describes a path, or a part of a path, through a GraphStrategy
514514
graph.
515515
Every State in the graph has a auto generated default path starting from the
516516
root state.
517-
So using the given example, the GraphStrategy would call the states `unknown`,
518-
`boot_via_nand`, `barebox`, and `linux_shell` in this order if
517+
So using the given example, the GraphStrategy would call the states ``unknown``,
518+
``boot_via_nand``, ``barebox``, and ``linux_shell`` in this order if
519519
``transition('linux_shell')`` would be called.
520-
The GraphStrategy would prefer `boot_via_nand` over `boot_via_nfs` because
521-
`boot_via_nand` is mentioned before `boot_via_nfs` in the dependencies of
522-
`barebox`. If you want to reach via `boot_via_nfs` the call would look like
520+
The GraphStrategy would prefer ``boot_via_nand`` over ``boot_via_nfs`` because
521+
``boot_via_nand`` is mentioned before ``boot_via_nfs`` in the dependencies of
522+
``barebox``. If you want to reach via ``boot_via_nfs`` the call would look like
523523
this: ``transition('linux_shell', via='boot_via_nfs')``.
524524

525525
A transition can be incremental. If we trigger a transition with
526-
``transition('barebox')`` first, the states `unknown`, `boot_via_nand` and
527-
`barebox` will be called in this order. If we trigger a transition
528-
``transition('linux_shell')`` afterwards only `linux_shell` gets called. This
529-
happens because `linux_shell` is reachable from `barebox` and the Strategy
526+
``transition('barebox')`` first, the states ``unknown``, ``boot_via_nand`` and
527+
``barebox`` will be called in this order. If we trigger a transition
528+
``transition('linux_shell')`` afterwards only ``linux_shell`` gets called. This
529+
happens because ``linux_shell`` is reachable from ``barebox`` and the Strategy
530530
holds state of the last walked path.
531531
But there is a catch! The second, incremental path must be *fully* incremental
532532
to the previous path!
533-
For example: Lets say we reached `barebox` via `boot_via_nfs`,
533+
For example: Lets say we reached ``barebox`` via ``boot_via_nfs``,
534534
(``transition('barebox', via='boot_via_nfs')``). If we trigger
535535
``transition('linux_shell')`` afterwards the GraphStrategy would compare the last
536-
path `'unknown', 'boot_via_nfs', 'barebox'` with the default path to
537-
`linux_shell` which would be
538-
`'unknown', 'boot_via_nand', 'barebox', 'linux_shell'`, and decides the path
536+
path ``'unknown', 'boot_via_nfs', 'barebox'`` with the default path to
537+
``linux_shell`` which would be
538+
``'unknown', 'boot_via_nand', 'barebox', 'linux_shell'``, and decides the path
539539
is not fully incremental and starts over by the root state. If we had given
540-
the second transition `boot_via_nfs` like in the first transition the paths
540+
the second transition ``boot_via_nfs`` like in the first transition the paths
541541
had been incremental.
542542

543+
.. _sshmanager:
543544

544545
SSHManager
545546
----------
@@ -577,7 +578,7 @@ or get and put files:
577578

578579
ManagedFile
579580
-----------
580-
While the `SSHManager` exposes a lower level interface to use SSH Connections,
581+
While the :ref:`SSHManager <sshmanager>` exposes a lower level interface to use SSH Connections,
581582
the ManagedFile provides a higher level interface for file upload to another
582583
host. It is meant to be used in conjunction with a remote resource, and store
583584
the file on the remote host with the following pattern:
@@ -586,9 +587,9 @@ the file on the remote host with the following pattern:
586587
587588
/tmp/labgrid-<username>/<sha256sum>/<filename>
588589
589-
Additionally it provides `get_remote_path()` to retrieve the complete file path,
590+
Additionally it provides ``get_remote_path()`` to retrieve the complete file path,
590591
to easily employ it for driver implementations.
591-
To use it in conjunction with a `Resource` and a file:
592+
To use it in conjunction with a *Resource* and a file:
592593

593594
.. testsetup:: managed-file
594595

@@ -607,7 +608,7 @@ To use it in conjunction with a `Resource` and a file:
607608
>>> mf.sync_to_resource()
608609
>>> path = mf.get_remote_path()
609610

610-
Unless constructed with `ManagedFile(..., detect_nfs=False)`, ManagedFile
611+
Unless constructed with ``ManagedFile(..., detect_nfs=False)``, ManagedFile
611612
employs the following heuristic to check if a file is stored on a NFS share
612613
available both locally and remotely via the same path:
613614

@@ -624,7 +625,7 @@ ProxyManager
624625
The proxymanager is used to open connections across proxies via an attribute in
625626
the resource. This allows gated testing networks by always using the exporter as
626627
an SSH gateway to proxy the connections using SSH Forwarding. Currently this is
627-
used in the `SerialDriver` for proxy connections.
628+
used in the :any:`SerialDriver` for proxy connections.
628629

629630
Usage:
630631

@@ -662,8 +663,8 @@ Workflow
662663
- Changes should be submitted via a `GitHub pull request
663664
<https://github.com/labgrid-project/labgrid/pulls>`_.
664665
- Try to limit each commit to a single conceptual change.
665-
- Add a signed-of-by line to your commits according to the `Developer's
666-
Certificate of Origin` (see below).
666+
- Add a signed-of-by line to your commits according to the *Developer's
667+
Certificate of Origin* (see below).
667668
- Check that the tests still work before submitting the pull request. Also
668669
check the CI's feedback on the pull request after submission.
669670
- When adding new drivers or resources, please also add the corresponding

doc/getting_started.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Getting Started
33

44
This section of the manual contains introductory tutorials for installing
55
labgrid, running your first test and setting up the distributed infrastructure.
6-
For an overview about the basic design and components of `labgrid`, read the
6+
For an overview about the basic design and components of *labgrid*, read the
77
:ref:`overview` first.
88

99
Installation
@@ -80,24 +80,24 @@ installation. An example for snmp support is:
8080
8181
Onewire
8282
+++++++
83-
Onewire support requires the `libow` library with headers, installable on debian
84-
via the `libow-dev` package. Use the `onewire` extra to install the correct
83+
Onewire support requires the ``libow`` library with headers, installable on debian
84+
via the ``libow-dev`` package. Use the ``onewire`` extra to install the correct
8585
onewire library version in addition to the normal installation.
8686

8787
SNMP
8888
++++
89-
SNMP support requires to additional packages, `pysnmp` and `pysnmpmibs`. They
90-
are included in the `snmp` extra.
89+
SNMP support requires to additional packages, ``pysnmp`` and ``pysnmpmibs``. They
90+
are included in the ``snmp`` extra.
9191

9292
Modbus
9393
++++++
94-
Modbus support requires an additional package `pyModbusTCP`. It is included in
95-
the `modbus` extra.
94+
Modbus support requires an additional package ``pyModbusTCP``. It is included in
95+
the ``modbus`` extra.
9696

9797
ModbusRTU
9898
+++++++++
99-
Modbus support requires an additional package `minimalmodbus`. It is included in
100-
the `modbusrtu` extra.
99+
Modbus support requires an additional package ``minimalmodbus``. It is included in
100+
the ``modbusrtu`` extra.
101101

102102
Running Your First Test
103103
-----------------------
@@ -198,8 +198,8 @@ Each group contains one or more resource declarations and optionally a location
198198
string.
199199

200200
For example, to export a ``USBSerialPort`` with ``ID_SERIAL_SHORT`` of
201-
``ID23421JLK``, the group name `example-group` and the location
202-
`example-location`:
201+
``ID23421JLK``, the group name ``example-group`` and the location
202+
``example-location``:
203203

204204
.. code-block:: yaml
205205
@@ -251,7 +251,7 @@ More information about the exporter configuration file can be found
251251
Restart the exporter to activate the new configuration.
252252

253253
.. Attention::
254-
The `ManagedFile` will create temporary uploads in the exporters
254+
The :any:`ManagedFile` will create temporary uploads in the exporters
255255
``/var/cache/labgrid`` directory. This directory needs to be created manually
256256
and should allow write access for users. The ``/contrib`` directory in the
257257
labgrid-project contains a tmpfiles configuration example to automatically
@@ -276,7 +276,7 @@ Finally we can test the client functionality, run:
276276
kiwi/example-group-2/NetworkSerialPort
277277
278278
You can see the available resources listed by the coordinator. The groups
279-
`example-group` and `example-group-2` should be available there.
279+
``example-group`` and ``example-group-2`` should be available there.
280280

281281
To show more details on the exported resources, use ``-v`` (or ``-vv``):
282282

@@ -420,7 +420,7 @@ Follow these instructions to install the systemd files on your machine(s):
420420
# systemctl start labgrid-exporter
421421
422422
#. Optionally, for users being able to upload files to the exporter, add them
423-
to the `labgrid` group on the exporter machine:
423+
to the ``labgrid`` group on the exporter machine:
424424

425425
.. code-block:: console
426426
@@ -450,4 +450,4 @@ retrieve it in your test and call the ``transition(status)`` function.
450450
See the section about the various :ref:`shipped strategies <conf-strategies>`
451451
for examples on this.
452452

453-
An example using the pytest plugin is provided under `examples/strategy`.
453+
An example using the pytest plugin is provided under ``examples/strategy``.

0 commit comments

Comments
 (0)