All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] docs/sphinx: change default `role` to "any"
@ 2021-08-05  0:48 John Snow
  2021-08-05  0:48 ` [PATCH 1/2] docs: remove non-reference uses of single backticks John Snow
  2021-08-05  0:48 ` [PATCH 2/2] docs/sphinx: change default role to "any" John Snow
  0 siblings, 2 replies; 5+ messages in thread
From: John Snow @ 2021-08-05  0:48 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, Eduardo Habkost, Alex Bennée,
	Markus Armbruster, John Snow, Alexander Bulekov, Bandan Das,
	Stefan Hajnoczi, Paolo Bonzini, Eric Blake

The first patch that I've been carrying for quite a while got real small
recently ... Apologies to Peter Maydell who re-did all that work.

John Snow (2):
  docs: remove non-reference uses of single backticks
  docs/sphinx: change default role to "any"

 docs/conf.py                           |  3 +++
 docs/devel/fuzzing.rst                 | 10 ++++++----
 docs/interop/live-block-operations.rst |  2 +-
 docs/system/guest-loader.rst           |  2 +-
 qapi/block-core.json                   |  4 ++--
 include/qemu/module.h                  |  6 +++---
 6 files changed, 16 insertions(+), 11 deletions(-)

-- 
2.31.1




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] docs: remove non-reference uses of single backticks
  2021-08-05  0:48 [PATCH 0/2] docs/sphinx: change default `role` to "any" John Snow
@ 2021-08-05  0:48 ` John Snow
  2021-08-05  9:06   ` Peter Maydell
  2021-08-05  0:48 ` [PATCH 2/2] docs/sphinx: change default role to "any" John Snow
  1 sibling, 1 reply; 5+ messages in thread
From: John Snow @ 2021-08-05  0:48 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, Eduardo Habkost, Alex Bennée,
	Markus Armbruster, John Snow, Alexander Bulekov, Bandan Das,
	Stefan Hajnoczi, Paolo Bonzini, Eric Blake

The single backtick markup in ReST is the "default role". Currently,
Sphinx's default role is called "content". Sphinx suggests you can use
the "Any" role instead to turn any single-backtick enclosed item into a
cross-reference.

This is useful for things like autodoc for Python docstrings, where it's
often nicer to reference other types with `foo` instead of the more
laborious :py:meth:`foo`.

Before we do that, though, we'll need to turn all existing usages of the
"content" role to inline verbatim markup wherever it does not correctly
resolve into a cross-refernece by using double backticks instead.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 docs/devel/fuzzing.rst                 | 10 ++++++----
 docs/interop/live-block-operations.rst |  2 +-
 docs/system/guest-loader.rst           |  2 +-
 qapi/block-core.json                   |  4 ++--
 include/qemu/module.h                  |  6 +++---
 5 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/docs/devel/fuzzing.rst b/docs/devel/fuzzing.rst
index 2749bb9bed3..5f735bb1e91 100644
--- a/docs/devel/fuzzing.rst
+++ b/docs/devel/fuzzing.rst
@@ -182,10 +182,12 @@ The output should contain a complete list of matched MemoryRegions.
 
 OSS-Fuzz
 --------
-QEMU is continuously fuzzed on `OSS-Fuzz` __(https://github.com/google/oss-fuzz).
-By default, the OSS-Fuzz build will try to fuzz every fuzz-target. Since the
-generic-fuzz target requires additional information provided in environment
-variables, we pre-define some generic-fuzz configs in
+
+QEMU is continuously fuzzed on `OSS-Fuzz
+<https://github.com/google/oss-fuzz>`_. By default, the OSS-Fuzz build
+will try to fuzz every fuzz-target. Since the generic-fuzz target
+requires additional information provided in environment variables, we
+pre-define some generic-fuzz configs in
 ``tests/qtest/fuzz/generic_fuzz_configs.h``. Each config must specify:
 
 - ``.name``: To identify the fuzzer config
diff --git a/docs/interop/live-block-operations.rst b/docs/interop/live-block-operations.rst
index 9e3635b2338..814c29bbe1d 100644
--- a/docs/interop/live-block-operations.rst
+++ b/docs/interop/live-block-operations.rst
@@ -640,7 +640,7 @@ at this point:
         (QEMU) block-job-complete device=job0
 
 In either of the above cases, if you once again run the
-`query-block-jobs` command, there should not be any active block
+``query-block-jobs`` command, there should not be any active block
 operation.
 
 Comparing 'commit' and 'mirror': In both then cases, the overlay images
diff --git a/docs/system/guest-loader.rst b/docs/system/guest-loader.rst
index 4320d1183f7..9ef9776bf07 100644
--- a/docs/system/guest-loader.rst
+++ b/docs/system/guest-loader.rst
@@ -51,4 +51,4 @@ The full syntax of the guest-loader is::
 
 ``bootargs=<args>``
   This is an optional field for kernel blobs which will pass command
-  like via the `/chosen/module@<addr>/bootargs` node.
+  like via the ``/chosen/module@<addr>/bootargs`` node.
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 675d8265ebf..4246a44da71 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -446,11 +446,11 @@
 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
 #
 # @recording: true if the bitmap is recording new writes from the guest.
-#             Replaces `active` and `disabled` statuses. (since 4.0)
+#             Replaces ``active`` and ``disabled`` statuses. (since 4.0)
 #
 # @busy: true if the bitmap is in-use by some operation (NBD or jobs)
 #        and cannot be modified via QMP or used by another operation.
-#        Replaces `locked` and `frozen` statuses. (since 4.0)
+#        Replaces ``locked`` and ``frozen`` statuses. (since 4.0)
 #
 # @persistent: true if the bitmap was stored on disk, is scheduled to be stored
 #              on disk, or both. (since 4.0)
diff --git a/include/qemu/module.h b/include/qemu/module.h
index 3deac0078b9..5fcc323b2a7 100644
--- a/include/qemu/module.h
+++ b/include/qemu/module.h
@@ -77,14 +77,14 @@ void module_allow_arch(const char *arch);
 /**
  * DOC: module info annotation macros
  *
- * `scripts/modinfo-collect.py` will collect module info,
+ * ``scripts/modinfo-collect.py`` will collect module info,
  * using the preprocessor and -DQEMU_MODINFO.
  *
- * `scripts/modinfo-generate.py` will create a module meta-data database
+ * ``scripts/modinfo-generate.py`` will create a module meta-data database
  * from the collected information so qemu knows about module
  * dependencies and QOM objects implemented by modules.
  *
- * See `*.modinfo` and `modinfo.c` in the build directory to check the
+ * See ``*.modinfo`` and ``modinfo.c`` in the build directory to check the
  * script results.
  */
 #ifdef QEMU_MODINFO
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] docs/sphinx: change default role to "any"
  2021-08-05  0:48 [PATCH 0/2] docs/sphinx: change default `role` to "any" John Snow
  2021-08-05  0:48 ` [PATCH 1/2] docs: remove non-reference uses of single backticks John Snow
@ 2021-08-05  0:48 ` John Snow
  2021-08-05 18:59   ` Eric Blake
  1 sibling, 1 reply; 5+ messages in thread
From: John Snow @ 2021-08-05  0:48 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, Eduardo Habkost, Alex Bennée,
	Markus Armbruster, John Snow, Alexander Bulekov, Bandan Das,
	Stefan Hajnoczi, Paolo Bonzini, Eric Blake

This interprets single-backtick syntax in all of our Sphinx docs as a
cross-reference to *something*, including Python symbols. If it doesn't
resolve, or resolves to too more than one thing, Sphinx will emit a
warning and the build will fail.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 docs/conf.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/docs/conf.py b/docs/conf.py
index ff6e92c6e2e..acaf883704a 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -85,6 +85,9 @@
 # The master toctree document.
 master_doc = 'index'
 
+# Interpret `this` to be a cross-reference to "anything".
+default_role = 'any'
+
 # General information about the project.
 project = u'QEMU'
 copyright = u'2021, The QEMU Project Developers'
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] docs: remove non-reference uses of single backticks
  2021-08-05  0:48 ` [PATCH 1/2] docs: remove non-reference uses of single backticks John Snow
@ 2021-08-05  9:06   ` Peter Maydell
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2021-08-05  9:06 UTC (permalink / raw)
  To: John Snow
  Cc: Thomas Huth, Eduardo Habkost, Alex Bennée, QEMU Developers,
	Markus Armbruster, Alexander Bulekov, Bandan Das,
	Stefan Hajnoczi, Paolo Bonzini, Eric Blake

On Thu, 5 Aug 2021 at 01:48, John Snow <jsnow@redhat.com> wrote:
>
> The single backtick markup in ReST is the "default role". Currently,
> Sphinx's default role is called "content". Sphinx suggests you can use
> the "Any" role instead to turn any single-backtick enclosed item into a
> cross-reference.
>
> This is useful for things like autodoc for Python docstrings, where it's
> often nicer to reference other types with `foo` instead of the more
> laborious :py:meth:`foo`.
>
> Before we do that, though, we'll need to turn all existing usages of the
> "content" role to inline verbatim markup wherever it does not correctly
> resolve into a cross-refernece by using double backticks instead.
>
> Signed-off-by: John Snow <jsnow@redhat.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] docs/sphinx: change default role to "any"
  2021-08-05  0:48 ` [PATCH 2/2] docs/sphinx: change default role to "any" John Snow
@ 2021-08-05 18:59   ` Eric Blake
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Blake @ 2021-08-05 18:59 UTC (permalink / raw)
  To: John Snow
  Cc: Peter Maydell, Thomas Huth, Eduardo Habkost, qemu-devel,
	Markus Armbruster, Alexander Bulekov, Bandan Das,
	Stefan Hajnoczi, Paolo Bonzini, Alex Bennée

On Wed, Aug 04, 2021 at 08:48:37PM -0400, John Snow wrote:
> This interprets single-backtick syntax in all of our Sphinx docs as a
> cross-reference to *something*, including Python symbols. If it doesn't
> resolve, or resolves to too more than one thing, Sphinx will emit a

s/too //

> warning and the build will fail.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  docs/conf.py | 3 +++
>  1 file changed, 3 insertions(+)
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-05 19:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05  0:48 [PATCH 0/2] docs/sphinx: change default `role` to "any" John Snow
2021-08-05  0:48 ` [PATCH 1/2] docs: remove non-reference uses of single backticks John Snow
2021-08-05  9:06   ` Peter Maydell
2021-08-05  0:48 ` [PATCH 2/2] docs/sphinx: change default role to "any" John Snow
2021-08-05 18:59   ` Eric Blake

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.