Re: [PATCH v2 6/9] qapi: convert "Example" sections without titles

2024-07-17 Thread John Snow
On Wed, Jul 17, 2024, 3:44 AM Markus Armbruster wrote: > John Snow writes: > > > Use the no-option form of ".. qmp-example::" to convert any Examples > > that do not have any form of caption or explanation whatsoever. Note > > that in a few cases, example s

Re: [PATCH v2 0/9] qapi: convert example sections to qmp-example rST directives

2024-07-17 Thread John Snow
On Wed, Jul 17, 2024, 6:47 AM Markus Armbruster wrote: > John Snow writes: > > > This patchset focuses on converting example sections to rST directives > > using a new `.. qmp-example::` directive. > > Queued, thanks! > Yay! >

[PATCH v2 7/9] qapi: convert "Example" sections with titles

2024-07-16 Thread John Snow
ve syntax. See commit+2: "qapi: remove "Example" doc section" for a detailed explanation of why. Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- qapi/block-core.json | 24 qapi/block.json | 13 +

[PATCH v2 8/9] qapi: convert "Example" sections with longer prose

2024-07-16 Thread John Snow
that was better to convert all at once. See commit-5: "docs/qapidoc: create qmp-example directive", for a detailed explanation of this custom directive syntax. See commit+1: "qapi: remove "Example" doc section" for a detailed explan

[PATCH v2 9/9] qapi: remove "Example" doc section

2024-07-16 Thread John Snow
alid examples.) NOTE: As with the "Notes" conversion (d461c279737), this patch (and the three preceding) may change the rendering order for Examples in the current generator. The forthcoming qapidoc rewrite will fix this by always generating documentation in source o

[PATCH v2 3/9] docs/qapidoc: create qmp-example directive

2024-07-16 Thread John Snow
es this behavior to assume all "::" code blocks within this directive are QMP blocks. Signed-off-by: John Snow Acked-by: Markus Armbruster --- docs/sphinx/qapidoc.py | 55 ++ 1 file changed, 55 insertions(+) diff --git a/docs/sphinx/qapidoc.py b/

[PATCH v2 1/9] [DO-NOT-MERGE]: Add some ad-hoc linting helpers.

2024-07-16 Thread John Snow
after this series. Sorry about that! Signed-off-by: John Snow --- scripts/qapi-lint.sh | 61 +++ scripts/qapi/Makefile | 5 2 files changed, 66 insertions(+) create mode 100755 scripts/qapi-lint.sh create mode 100644 scripts/qapi/Makefile diff

[PATCH v2 6/9] qapi: convert "Example" sections without titles

2024-07-16 Thread John Snow
xplanation of why. Note: an empty "TODO" line was added to announce-self to keep the example from floating up into the body; this will be addressed more rigorously in the new qapidoc generator. Signed-off-by: John Snow --- qapi/acpi.json | 4 +-- qapi/block-core.json |

[PATCH v2 4/9] docs/qapidoc: add QMP highlighting to annotated qmp-example blocks

2024-07-16 Thread John Snow
ve. Note, if the default language is *already* QMP, this directive will not generate and restore redundant highlight configuration nodes. We may well decide that the default language ought to be QMP for any QAPI reference pages, but this way the directive behaves consistently no matter where it i

[PATCH v2 2/9] docs/qapidoc: factor out do_parse()

2024-07-16 Thread John Snow
Factor out the compatibility parser helper into a base class, so it can be shared by other directives. Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- docs/sphinx/qapidoc.py | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/docs

[PATCH v2 5/9] docs/sphinx: add CSS styling for qmp-example directive

2024-07-16 Thread John Snow
From: Harmonie Snow Add CSS styling for qmp-example directives to increase readability and consistently style all example blocks. Signed-off-by: Harmonie Snow Signed-off-by: John Snow Acked-by: Markus Armbruster --- docs/sphinx-static/theme_overrides.css | 49 ++ 1

[PATCH v2 0/9] qapi: convert example sections to qmp-example rST directives

2024-07-16 Thread John Snow
ted with a section on how to write examples. - Various minor tweaks to comments, commit messages, docs, etc. Harmonie Snow (1): docs/sphinx: add CSS styling for qmp-example directive John Snow (8): [DO-NOT-MERGE]: Add some ad-hoc linting helpers. docs/qapidoc: factor out do_parse() do

[PULL 5/6] Python: bump minimum sphinx version to 3.4.3

2024-07-15 Thread John Snow
nSUSE Leap 15.4: EOL OpenSUSE Leap 15.5: 2.3.1, 4.2.0 and 7.2.6 RHEL9 / CentOS Stream 9 becomes the new defining factor in staying at Sphinx 3.4.3 due to downstream offline build requirements that force us to use platform Sphinx instead of newer packages from PyPI. Signed-off-by: John Snow Acked-by:

[PULL 6/6] docs: remove Sphinx 1.x compatibility code

2024-07-15 Thread John Snow
In general, the Use_SSI workaround is no longer needed, and neither is the pre-1.6 logging shim for kerneldoc. Signed-off-by: John Snow Acked-by: Markus Armbruster Reviewed-by: Thomas Huth Message-id: 20240703175235.239004-3-js...@redhat.com [rebased on top of origin/master. --js] Signed-off

[PULL 2/6] python: Do not use pylint 3.2.4 with python 3.8

2024-07-15 Thread John Snow
There is a bug in this version, see: https://github.com/pylint-dev/pylint/issues/9751 Signed-off-by: John Snow Reviewed-by: Alex Bennée Message-id: 20240626232230.408004-3-js...@redhat.com Signed-off-by: John Snow --- python/setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/python

[PULL 1/6] python: linter changes for pylint 3.x

2024-07-15 Thread John Snow
ng variable 'sock' before assignment (possibly-used-before-assignment) qemu/utils/qemu_ga_client.py:168:4: R1711: Useless return at end of function or method (useless-return) Signed-off-by: John Snow Reviewed-by: Alex Bennée Message-id: 20240626232230.408004-2-js...@redhat.com Signed-

[PULL 3/6] iotests: Change imports for Python 3.13

2024-07-15 Thread John Snow
Python 3.13 isn't out yet, but it's in beta and Fedora is ramping up to make it the default system interpreter for Fedora 41. They moved our cheese for where ContextManager lives; add a conditional to locate it while we support both pre-3.9 and 3.13+. Signed-off-by: John Snow

[PULL 4/6] python: enable testing for 3.13

2024-07-15 Thread John Snow
Python 3.13 is in beta and Fedora 41 is preparing to make it the default system interpreter; enable testing for it. (In the event problems develop prior to release, it should only impact the check-python-tox job, which is not run by default and is allowed to fail.) Signed-off-by: John Snow

[PULL 0/6] Python patches

2024-07-15 Thread John Snow
nx minver bump ---- John Snow (6): python: linter changes for pylint 3.x python: Do not use pylint 3.2.4 with python 3.8 iotests: Change imports for Python 3.13 python: enable testing for 3.13 Python: bump minimum sphinx version to 3.4.3 docs: remove Sphinx 1.x compatibili

Re: [PATCH 8/8] qapi: remove "Example" doc section

2024-07-10 Thread John Snow
On Wed, Jul 10, 2024 at 1:45 AM Markus Armbruster wrote: > John Snow writes: > > > On Tue, Jul 9, 2024 at 6:52 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > Fully eliminate the "Example" sections in QAPI

Re: [PATCH 8/8] qapi: remove "Example" doc section

2024-07-09 Thread John Snow
On Tue, Jul 9, 2024 at 6:52 AM Markus Armbruster wrote: > John Snow writes: > > > Fully eliminate the "Example" sections in QAPI doc blocks now that they > > have all been converted to arbitrary rST syntax using the > > ".. qmp-example::" directive.

Re: [PATCH 7/8] qapi: convert "Example" sections with longer prose

2024-07-09 Thread John Snow
On Tue, Jul 9, 2024 at 7:35 AM Markus Armbruster wrote: > John Snow writes: > > > These examples require longer explanations or have explanations that > > require markup to look reasonable when rendered and so use the longer > > form of the ".. qmp-example::&quo

Re: [PATCH 4/8] docs/sphinx: add CSS styling for qmp-example directive

2024-07-09 Thread John Snow
On Tue, Jul 9, 2024 at 6:34 AM Markus Armbruster wrote: > John Snow writes: > > > From: Harmonie Snow > > > > Add CSS styling for qmp-example directives to increase readability and > > consistently style all example blocks. > > > > Signed-off-by: H

Re: [PATCH 3/8] docs/qapidoc: add QMP highlighting to annotated qmp-example blocks

2024-07-09 Thread John Snow
On Tue, Jul 9, 2024 at 6:33 AM Markus Armbruster wrote: > John Snow writes: > > > For any code literal blocks inside of a qmp-example directive, apply and > > enforce the QMP lexer/highlighter to those blocks. > > > > This way, you won't need to wr

Re: [PATCH 1/8] docs/qapidoc: factor out do_parse()

2024-07-06 Thread John Snow
On Sat, Jul 6, 2024, 10:47 AM Markus Armbruster wrote: > John Snow writes: > > > Factor out the compatibility parser helper into a base class, so it can > > be shared by other directives. > > > > Signed-off-by: John Snow > > R-by stands. > Assuming

Re: [PATCH 5/8] qapi: convert "Example" sections without titles

2024-07-06 Thread John Snow
On Sat, Jul 6, 2024, 10:42 AM Markus Armbruster wrote: > John Snow writes: > > > Use the no-option form of ".. qmp-example::" to convert any Examples > > that do not have any form of caption or explanation whatsoever. Note > > that in a few cases, example s

Re: [PATCH 0/4] Python: Add 3.13 support, play linter whackamole

2024-07-05 Thread John Snow
On Wed, Jun 26, 2024, 7:22 PM John Snow wrote: > Fix some regressions in check-python-tox that have crept in since Pylint > 3.x, and add Python 3.13 support to the pipeline. > > GitLab pipeline (before I fixed the missing DCO, but let's be honest, it > can't possibly be

[PATCH 5/8] qapi: convert "Example" sections without titles

2024-07-03 Thread John Snow
een two or more logically independent examples. See commit-3: "docs/qapidoc: create qmp-example directive", for a detailed explanation of this custom directive syntax. See commit+3: "qapi: remove "Example" doc section" for a detailed expla

[PATCH 8/8] qapi: remove "Example" doc section

2024-07-03 Thread John Snow
lly valid examples.) NOTE: As with the "Notes" conversion patch, this patch (and those preceding) may change the rendering order for Examples in the current generator. The forthcoming qapidoc rewrite will fix this by always generating documentation in source order. Sign

[PATCH 6/8] qapi: convert "Example" sections with titles

2024-07-03 Thread John Snow
ve syntax. See commit+2: "qapi: remove "Example" doc section" for a detailed explanation of why. Signed-off-by: John Snow --- qapi/block-core.json | 24 qapi/block.json | 13 ++--- qapi/migration.json | 25 ++---

[PATCH 4/8] docs/sphinx: add CSS styling for qmp-example directive

2024-07-03 Thread John Snow
From: Harmonie Snow Add CSS styling for qmp-example directives to increase readability and consistently style all example blocks. Signed-off-by: Harmonie Snow Signed-off-by: John Snow --- docs/sphinx-static/theme_overrides.css | 49 ++ 1 file changed, 49 insertions

[PATCH 7/8] qapi: convert "Example" sections with longer prose

2024-07-03 Thread John Snow
that was better to convert all at once. See commit-5: "docs/qapidoc: create qmp-example directive", for a detailed explanation of this custom directive syntax. See commit+1: "qapi: remove "Example" doc section" for a detailed explanation of w

[PATCH 3/8] docs/qapidoc: add QMP highlighting to annotated qmp-example blocks

2024-07-03 Thread John Snow
ve. Note, if the default language is *already* QMP, this directive will not generate and restore redundant highlight configuration nodes. We may well decide that the default language ought to be QMP for any QAPI reference pages, but this way the directive behaves consistently no matter where it i

[PATCH 2/8] docs/qapidoc: create qmp-example directive

2024-07-03 Thread John Snow
es this behavior to assume all "::" code blocks within this directive are QMP blocks. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 55 ++ 1 file changed, 55 insertions(+) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index 43

[PATCH 0/8] qapi: convert example sections to qmp-example rST directives

2024-07-03 Thread John Snow
dy now! Thanks Harmonie! - Dependence on SphinxDirective was removed, but it will likely re-appear in the next series anyway. - qapi-code-gen.rst was updated with a section on how to write examples. - Various minor tweaks to comments, commit messages, docs, etc. Harmonie Snow (1): docs/sphinx: add CSS styling

[PATCH 1/8] docs/qapidoc: factor out do_parse()

2024-07-03 Thread John Snow
Factor out the compatibility parser helper into a base class, so it can be shared by other directives. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 64 +++--- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/docs/sphinx/qapidoc.py b

Re: [PATCH 3/4] iotests: Change imports for Python 3.13

2024-07-03 Thread John Snow
On Tue, Jul 2, 2024, 1:51 PM Nir Soffer wrote: > > On 2 Jul 2024, at 17:44, John Snow wrote: > > > > On Tue, Jul 2, 2024 at 7:52 AM Nir Soffer wrote: > >> On Thu, Jun 27, 2024 at 2:23 AM John Snow wrote: >> > >> > Python 3.13 isn't out

Re: [PATCH 3/4] iotests: Change imports for Python 3.13

2024-07-02 Thread John Snow
On Tue, Jul 2, 2024 at 7:52 AM Nir Soffer wrote: > On Thu, Jun 27, 2024 at 2:23 AM John Snow wrote: > > > > Python 3.13 isn't out yet, but it's in beta and Fedora is ramping up to > > make it the default system interpreter for Fedora 41. > > > > The

Re: [PATCH 3/4] iotests: Change imports for Python 3.13

2024-07-01 Thread John Snow
Ping - happy to merge this series myself but didn't wanna change iotests without at least an ack from the lord of that castle. On Wed, Jun 26, 2024, 7:22 PM John Snow wrote: > Python 3.13 isn't out yet, but it's in beta and Fedora is ramping up to > make it the default s

Re: [PATCH v2 10/21] qapi: convert "Note" sections to plain rST

2024-06-28 Thread John Snow
On Fri, Jun 28, 2024, 5:52 AM Markus Armbruster wrote: > John Snow writes: > > > We do not need a dedicated section for notes. By eliminating a specially > > parsed section, these notes can be treated as normal rST paragraphs in > > the new QMP reference manual, and

Re: [PATCH v2 07/21] docs/qapidoc: fix nested parsing under untagged sections

2024-06-28 Thread John Snow
On Fri, Jun 28, 2024, 11:10 AM John Snow wrote: > > > On Fri, Jun 28, 2024, 3:55 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Sphinx does not like sections without titles, because it wants to >> > convert every section into a reference.

Re: [PATCH v2 15/21] docs/qapidoc: create qmp-example directive

2024-06-28 Thread John Snow
On Fri, Jun 28, 2024, 9:24 AM Markus Armbruster wrote: > John Snow writes: > > > This is a directive that creates a syntactic sugar for creating > > "Example" boxes very similar to the ones already used in the bitmaps.rst > > document, please see e.g. >

Re: [PATCH v2 14/21] docs/qapidoc: factor out do_parse()

2024-06-28 Thread John Snow
On Fri, Jun 28, 2024, 9:09 AM Markus Armbruster wrote: > John Snow writes: > > > Factor out the compatibility parser helper so it can be shared by other > > directives. > > Suggest "Factor out the compatibility parser helper into a base class, > so it can be sha

Re: [PATCH v2 07/21] docs/qapidoc: fix nested parsing under untagged sections

2024-06-28 Thread John Snow
On Fri, Jun 28, 2024, 3:55 AM Markus Armbruster wrote: > John Snow writes: > > > Sphinx does not like sections without titles, because it wants to > > convert every section into a reference. When there is no title, it > > struggles to do this and transf

Re: [PATCH v2 04/21] docs/qapidoc: delint a tiny portion of the module

2024-06-28 Thread John Snow
On Fri, Jun 28, 2024, 3:29 AM Markus Armbruster wrote: > John Snow writes: > > > In a forthcoming series that adds a new QMP documentation generator, it > > will be helpful to have a linting baseline. However, there's no need to > > shuffle around the deck chairs t

Re: [PATCH v2 05/21] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-26 Thread John Snow
On Thu, Jun 27, 2024, 2:25 AM Markus Armbruster wrote: > John Snow writes: > > > Change get_doc_indented() to preserve indentation on all subsequent text > > lines, and create a compatibility dedent() function for qapidoc.py that > > removes indentation the same wa

Re: [PATCH v2 03/21] docs/qapidoc: remove unused intersperse function

2024-06-26 Thread John Snow
On Thu, Jun 27, 2024, 2:02 AM Markus Armbruster wrote: > John Snow writes: > > > This function has been unused since fd62bff901b. > > > > Signed-off-by: John Snow > > Reviewed-by: Markus Armbruster > > I assume you won't mind me adding a bit of po

[PATCH 0/4] Python: Add 3.13 support, play linter whackamole

2024-06-26 Thread John Snow
jsnow/qemu/-/pipelines/1349737188 John Snow (4): python: linter changes for pylint 3.x python: Do not use pylint 3.2.4 with python 3.8 iotests: Change imports for Python 3.13 python: enable testing for 3.13 python/qemu/machine/machine.py | 1 + python/qemu/utils/qemu_ga_client

[PATCH 1/4] python: linter changes for pylint 3.x

2024-06-26 Thread John Snow
ng variable 'sock' before assignment (possibly-used-before-assignment) qemu/utils/qemu_ga_client.py:168:4: R1711: Useless return at end of function or method (useless-return) Signed-off-by: John Snow --- python/qemu/machine/machine.py | 1 + python/qemu/utils/qemu_ga_client.py | 2 +-

[PATCH 2/4] python: Do not use pylint 3.2.4 with python 3.8

2024-06-26 Thread John Snow
There is a bug in this version, see: https://github.com/pylint-dev/pylint/issues/9751 Signed-off-by: John Snow --- python/setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/python/setup.cfg b/python/setup.cfg index 48668609d3e..8ebd345d7ed 100644 --- a/python/setup.cfg +++ b/python

[PATCH 4/4] python: enable testing for 3.13

2024-06-26 Thread John Snow
Python 3.13 is in beta and Fedora 41 is preparing to make it the default system interpreter; enable testing for it. (In the event problems develop prior to release, it should only impact the check-python-tox job, which is not run by default and is allowed to fail.) Signed-off-by: John Snow

[PATCH 3/4] iotests: Change imports for Python 3.13

2024-06-26 Thread John Snow
Python 3.13 isn't out yet, but it's in beta and Fedora is ramping up to make it the default system interpreter for Fedora 41. They moved our cheese for where ContextManager lives; add a conditional to locate it while we support both pre-3.9 and 3.13+. Signed-off-by: John Snow ---

[PATCH v2 15/21] docs/qapidoc: create qmp-example directive

2024-06-26 Thread John Snow
his commit, the code-block rST syntax "::" does not apply QMP highlighting; you would need to use ".. code-block:: QMP". The very next commit changes this behavior to assume all "::" code blocks within this directive are QMP blocks. Signed-off-by: Joh

[PATCH v2 21/21] qapi: remove "Example" doc section

2024-06-26 Thread John Snow
lly valid examples.) NOTE: As with the "Notes" conversion patch, this patch (and those preceding) may change the rendering order for Examples in the current generator. The forthcoming qapidoc rewrite will fix this by always generating documentation in source order. Signe

[PATCH v2 07/21] docs/qapidoc: fix nested parsing under untagged sections

2024-06-26 Thread John Snow
tion (free paragraphs), skip making a hollow section and instead append the parse results to the prior section. Many Bothans died to bring us this information. Signed-off-by: John Snow Acked-by: Markus Armbruster --- docs/sphinx/qapidoc.py | 16 +++- 1 file changed, 11 insertions(+), 5

[PATCH v2 20/21] qapi: convert "Example" sections with longer prose

2024-06-26 Thread John Snow
that was better to convert all at once. See commit-5: "docs/qapidoc: create qmp-example directive", for a detailed explanation of this custom directive syntax. See commit+1: "qapi: remove "Example" doc section" for a detailed explanation of w

[PATCH v2 10/21] qapi: convert "Note" sections to plain rST

2024-06-26 Thread John Snow
gged section" to an "untagged section" means that rendering order for some notes *may change* as a result of this patch. The forthcoming qapidoc.py rewrite strictly preserves source ordering in the rendered documentation, so this issue will be rectified in the new generator. Sign

[PATCH v2 02/21] qapi: linter fixups

2024-06-26 Thread John Snow
Fix minor irritants to pylint/flake8 et al. (Yes, these need to be guarded by the Python tests. That's a work in progress, a series that's quite likely to follow once I finish this Sphinx project. Please pardon the temporary irritation.) Signed-off-by: John Snow Reviewed-by: Markus

[PATCH v2 13/21] qapi/parser: don't parse rST markup as section headers

2024-06-26 Thread John Snow
The double-colon synax is rST formatting that precedes a literal code block. We do not want to capture these as QAPI-specific sections. Coerce blocks that start with e.g. "Example::" to be parsed as untagged paragraphs instead of special tagged sections. Signed-off-by: John Snow --

[PATCH v2 18/21] qapi: convert "Example" sections without titles

2024-06-26 Thread John Snow
mit+3: "qapi: remove "Example" doc section" for a detailed explanation of why. Signed-off-by: John Snow --- qapi/acpi.json | 4 +-- qapi/block-core.json | 64 +--- qapi/block.json | 18 ++

[PATCH v2 14/21] docs/qapidoc: factor out do_parse()

2024-06-26 Thread John Snow
Factor out the compatibility parser helper so it can be shared by other directives. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 64 +++--- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx

[PATCH v2 16/21] docs/qapidoc: add QMP highlighting to annotated qmp-example blocks

2024-06-26 Thread John Snow
; } ``` But instead, simply: ``` .. qmp-example:: :annotated: Blah blah:: -> { "lorem": "ipsum" } ``` Once the directive block is exited, whatever the previous default highlight language was will be restored; localizing the forced QMP lexing to exclusively this dir

[PATCH v2 17/21] docs/sphinx: add CSS styling for qmp-example directive

2024-06-26 Thread John Snow
From: Harmonie Snow Add CSS styling for qmp-example directives to increase readability and consistently style all example blocks. Signed-off-by: Harmonie Snow Signed-off-by: John Snow --- docs/sphinx-static/theme_overrides.css | 46 ++ 1 file changed, 46 insertions

[PATCH v2 01/21] [DO-NOT-MERGE]: Add some ad-hoc linting helpers.

2024-06-26 Thread John Snow
after this series. Sorry about that! Signed-off-by: John Snow --- scripts/qapi-lint.sh | 61 +++ scripts/qapi/Makefile | 5 2 files changed, 66 insertions(+) create mode 100755 scripts/qapi-lint.sh create mode 100644 scripts/qapi/Makefile diff

[PATCH v2 12/21] qapi: add markup to note blocks

2024-06-26 Thread John Snow
masse in a subsequent patch after the new QAPI doc generator is merged. Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- qapi/control.json | 4 ++-- qapi/misc.json | 8 qapi/qdev.json | 2 +- qapi/run-state.json | 2 +- qapi/sockets.json | 2 +- qapi/ui.json

[PATCH v2 19/21] qapi: convert "Example" sections with titles

2024-06-26 Thread John Snow
ve syntax. See commit+2: "qapi: remove "Example" doc section" for a detailed explanation of why. Signed-off-by: John Snow --- qapi/block-core.json | 24 qapi/block.json | 13 ++--- qapi/migration.json | 25 ++---

[PATCH v2 04/21] docs/qapidoc: delint a tiny portion of the module

2024-06-26 Thread John Snow
am. Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- docs/sphinx/qapidoc.py | 62 +- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index 3c0565d0ceb..659e507353a 100644 --

[PATCH v2 11/21] qapi: update prose in note blocks

2024-06-26 Thread John Snow
Where I've noticed, rephrase the note to read more fluently. Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- qapi/block-core.json | 4 ++-- qga/qapi-schema.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json

[PATCH v2 06/21] qapi/parser: fix comment parsing immediately following a doc block

2024-06-26 Thread John Snow
llows a doc block. Fixes: 3d035cd2cca6 (qapi: Rewrite doc comment parser) Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- scripts/qapi/parser.py | 2 +- tests/qapi-schema/doc-good.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/parser.py b/scr

[PATCH v2 08/21] qapi: fix non-compliant JSON examples

2024-06-26 Thread John Snow
examples have been adjusted to support that format here. Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- qapi/control.json | 3 ++- qapi/machine.json | 2 +- qapi/migration.json | 2 +- qapi/misc.json | 3 ++- qapi/net.json | 6 +++--- qapi/rocker.json| 2 +- qapi/ui.

[PATCH v2 09/21] qapi: nail down convention that Errors sections are lists

2024-06-26 Thread John Snow
By unstated convention, Errors sections are rST lists. Document the convention, and make the one exception conform. Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- docs/devel/qapi-code-gen.rst | 7 +++ qapi/transaction.json| 2 +- 2 files changed, 8 insertions(+), 1

[PATCH v2 05/21] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-26 Thread John Snow
will not be needed any longer and can be dropped. Signed-off-by: John Snow [Edited commit message and code comments per review --js] Reviewed-by: Markus Armbruster --- docs/sphinx/qapidoc.py | 27 ++- scripts/qapi/parser.py | 4 ++-- tests/qapi-schema/doc

[PATCH v2 00/21] qapi: convert "Note" and "Example" sections to rST

2024-06-26 Thread John Snow
ox styling and sphinx directive macro - Addressed... most? list feedback. (But not the indent split.) Known issues: - The Example boxes are styled a little wonkily if prose follows the code-block instead of precedes it, fixup will be tomorrow. --js Harmonie Snow (1): docs/sphinx: add CSS stylin

[PATCH v2 03/21] docs/qapidoc: remove unused intersperse function

2024-06-26 Thread John Snow
This function has been unused since fd62bff901b. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 10 -- 1 file changed, 10 deletions(-) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index f270b494f01..3c0565d0ceb 100644 --- a/docs/sphinx/qapidoc.py +++ b/docs

Re: [PATCH 13/13] qapi: convert "Example" sections to rST

2024-06-26 Thread John Snow
On Wed, Jun 26, 2024, 1:18 AM Markus Armbruster wrote: > John Snow writes: > > > Eliminate the "Example" sections in QAPI doc blocks, converting them > > into QMP example code blocks. This is generally done in this patch by > > converting "Example:&qu

Re: [PATCH 05/20] qapi/parser: adjust info location for doc body section

2024-06-21 Thread John Snow
On Mon, May 27, 2024 at 7:58 AM Markus Armbruster wrote: > John Snow writes: > > > On Thu, May 16, 2024, 1:58 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > Instead of using the info object for the doc block as a who

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-21 Thread John Snow
On Fri, Jun 21, 2024 at 8:23 AM Markus Armbruster wrote: > John Snow writes: > > > On Thu, Jun 20, 2024 at 11:46 AM John Snow wrote: > > > >> > >> > >> On Thu, Jun 20, 2024, 9:35 AM Markus Armbruster > wrote: > >> > &g

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-21 Thread John Snow
On Fri, Jun 21, 2024 at 8:08 AM Markus Armbruster wrote: > John Snow writes: > > > We do not need a dedicated section for notes. By eliminating a specially > > parsed section, these notes can be treated as normal rST paragraphs in > > the new QMP reference manual, and

Re: [PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-21 Thread John Snow
On Fri, Jun 21, 2024 at 2:38 AM Markus Armbruster wrote: > John Snow writes: > > > On Thu, Jun 20, 2024, 11:07 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > On Wed, Jun 19, 2024, 8:03 AM Markus Ar

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 Thread John Snow
On Thu, Jun 20, 2024 at 11:46 AM John Snow wrote: > > > On Thu, Jun 20, 2024, 9:35 AM Markus Armbruster wrote: > >> Markus Armbruster writes: >> >> > John Snow writes: >> >> [...] >> >> >> diff --git a/qga/qapi-schema.json b/q

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 Thread John Snow
On Thu, Jun 20, 2024, 9:55 AM Markus Armbruster wrote: > John Snow writes: > > > We do not need a dedicated section for notes. By eliminating a specially > > parsed section, these notes can be treated as normal rST paragraphs in > > the new QMP reference manual, and

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 Thread John Snow
On Thu, Jun 20, 2024, 9:35 AM Markus Armbruster wrote: > Markus Armbruster writes: > > > John Snow writes: > > [...] > > >> diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json > >> index b3de1fb6b3a..57598331c5c 100644 > >> --- a/qga/

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 Thread John Snow
On Wed, Jun 19, 2024, 9:07 AM Markus Armbruster wrote: > John Snow writes: > > > We do not need a dedicated section for notes. By eliminating a specially > > parsed section, these notes can be treated as normal rST paragraphs in > > the new QMP reference manual, and

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 Thread John Snow
On Wed, Jun 19, 2024, 8:49 AM Markus Armbruster wrote: > John Snow writes: > > > We do not need a dedicated section for notes. By eliminating a specially > > parsed section, these notes can be treated as normal rST paragraphs in > > the new QMP reference manual, and

Re: [PATCH 08/13] qapi: ensure all errors sections are uniformly typset

2024-06-20 Thread John Snow
On Wed, Jun 19, 2024, 8:10 AM Markus Armbruster wrote: > John Snow writes: > > > Transactions have the only instance of an Errors section that isn't a > > rST list; turn it into one. > > > > Signed-off-by: John Snow > > Let;s explain the "why"

Re: [PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-20 Thread John Snow
On Thu, Jun 20, 2024, 11:07 AM Markus Armbruster wrote: > John Snow writes: > > > On Wed, Jun 19, 2024, 8:03 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > Change get_doc_indented() to preserve indentation on all subsequ

Re: [PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-20 Thread John Snow
On Wed, Jun 19, 2024, 8:03 AM Markus Armbruster wrote: > John Snow writes: > > > Change get_doc_indented() to preserve indentation on all subsequent text > > lines, and create a compatibility dedent() function for qapidoc.py to > > remove that indentation. This is being

Re: [PATCH 13/13] qapi: convert "Example" sections to rST

2024-06-19 Thread John Snow
On Wed, Jun 19, 2024, 9:20 AM Markus Armbruster wrote: > John Snow writes: > > > Eliminate the "Example" sections in QAPI doc blocks, converting them > > into QMP example code blocks. This is generally done in this patch by > > converting "Example:&qu

Re: [PATCH 03/13] docs/qapidoc: delint a tiny portion of the module

2024-06-19 Thread John Snow
On Wed, Jun 19, 2024, 2:28 AM Markus Armbruster wrote: > John Snow writes: > > > In a forthcoming series that adds a new QMP documentation generator, it > > will be helpful to have a linting baseline. However, there's no need to > > shuffle around the deck chairs t

[PATCH 13/13] qapi: convert "Example" sections to rST

2024-06-18 Thread John Snow
ons that no longer parse successfully by attempting the doc build, convert annotations into captions manually. (Tedious, oh well.) 3. Add captions where still needed: sed -zi 's|# .. code-block:: QMP\n#\n|# .. code-block:: QMP\n#:caption: Example\n#\n|g' *.json Not fully ideal, but

[PATCH 12/13] qapi/parser: don't parse rST markup as section headers

2024-06-18 Thread John Snow
The double-colon synax is rST formatting that precedes a literal code block. We do not want to capture these as QAPI-specific sections. Coerce blocks that start with e.g. "Example::" to be parsed as untagged paragraphs instead of special tagged sections. Signed-off-by: John Snow --

[PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-18 Thread John Snow
anual/interop/qemu-storage-daemon-qmp-ref.html Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 29 - scripts/qapi/parser.py | 5 +++-- tests/qapi-schema/doc-good.out | 32 3 files changed, 43 insertions(+), 23 dele

[PATCH 10/13] qapi: update prose in note blocks

2024-06-18 Thread John Snow
Where I've noticed, rephrase the note to read more fluently. Signed-off-by: John Snow --- qapi/block-core.json | 4 ++-- qga/qapi-schema.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index cacedfb771c..9ef23ec02ae 1

[PATCH 11/13] qapi: add markup to note blocks

2024-06-18 Thread John Snow
masse in a subsequent patch after the new QAPI doc generator is merged. Signed-off-by: John Snow --- qapi/control.json | 4 ++-- qapi/misc.json | 8 qapi/qdev.json | 2 +- qapi/run-state.json | 2 +- qapi/sockets.json | 2 +- qapi/ui.json| 2 +- 6 files changed, 10

[PATCH 01/13] [DO-NOT-MERGE]: Add some ad-hoc linting helpers.

2024-06-18 Thread John Snow
after this series. Sorry about that! Signed-off-by: John Snow --- scripts/qapi-lint.sh | 59 +++ scripts/qapi/Makefile | 5 2 files changed, 64 insertions(+) create mode 100755 scripts/qapi-lint.sh create mode 100644 scripts/qapi/Makefile diff

[PATCH 08/13] qapi: ensure all errors sections are uniformly typset

2024-06-18 Thread John Snow
Transactions have the only instance of an Errors section that isn't a rST list; turn it into one. Signed-off-by: John Snow --- docs/devel/qapi-code-gen.rst | 7 +++ qapi/transaction.json| 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/devel/qapi

[PATCH 07/13] qapi: fix non-compliant JSON examples

2024-06-18 Thread John Snow
een adjusted to support that format here. Signed-off-by: John Snow --- qapi/control.json | 3 ++- qapi/machine.json | 2 +- qapi/migration.json | 2 +- qapi/misc.json | 3 ++- qapi/net.json | 6 +++--- qapi/rocker.json| 2 +- qapi/ui.json| 2 +- 7 files changed, 11 inserti

[PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-18 Thread John Snow
here, with just two "caution" directives. ".. admonition:: notes" is used in a few places where we had an ordered list of multiple notes that would not make sense as standalone/separate admonitions. Signed-off-by: John Snow Acked-by: Stefan Hajnoczi [for block*.json] ---

[PATCH 03/13] docs/qapidoc: delint a tiny portion of the module

2024-06-18 Thread John Snow
am. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 66 +- 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index f270b494f01..e675966defa 100644 --- a/docs/sphinx/qapidoc.py +++ b/docs/sp

[PATCH 06/13] docs/qapidoc: fix nested parsing under untagged sections

2024-06-18 Thread John Snow
tion (free paragraphs), skip making a hollow section and instead append the parse results to the prior section. Many Bothans died to bring us this information. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/d

  1   2   3   4   5   6   7   8   9   10   >