qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v5 00/17] qapi doc generation (whole version, squashed)
@ 2016-11-17 15:54 Marc-André Lureau
  2016-11-17 15:54 ` [Qemu-devel] [PATCH v5 01/17] qapi: improve device_add schema Marc-André Lureau
                   ` (17 more replies)
  0 siblings, 18 replies; 48+ messages in thread
From: Marc-André Lureau @ 2016-11-17 15:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: eblake, armbru, Marc-André Lureau

Add a qapi2texi script to generate the documentation from the qapi
schemas.

The 15th patch in this series is a squashed version of the
documentation move from qmp-commands.txt to the schemas. The whole
version (not sent on the ML to avoid spamming) is in the following git
branch: https://github.com/elmarco/qemu/commits/qapi-doc

PDF preview:
https://fedorapeople.org/~elmarco/qemu-qmp-ref.pdf

v5:
- many parser and generator fixes and improvements after v4 review:
 - simplified current section handling by using a Section object
 - adding a line is more stateful: either freeform or symbol comment
 - always check_docs() when parsing with QAPISchema
 - simplified some code and comments
 - do not break current section on empty line, but break after a non
   indented paragraph in an argument section. This seems to reflects
   the way documentation is written:

   ##
   # @foo:
   # @arg: fluctuat nec mergitur
   #       - continues here
   #
   #       Since: 1853
   #
   # Body
   #
   ##

   Other sections (Note/Examples etc) are not indented (it seems), but
   could use a similar rule. I prefer to keep this only for args, for
   styling reasons (bikeshedding?).

- better handling of flat-union in generator
- list all enum values (even when not documented)
- added qapi-doc parsing tests and more error checking
- pep8/pylint fixes
- some more schema doc fixes
- do not move logo to docs/

v4:
- more device_add schema fixes
- do not merge docs/qmp-intro.txt in qemu-qmp-ref.texi
- remove needless @ifinfo, add GPL copying text
- added qemu logo to pdf
- added some r-b tags

v3:
- many improvements to the doc parser:
  - throws an error in various malformated conditions
  - allows multiple meta-sections, except for "Since:" and "Return:"
  - build a list of docs, instead of attaching docs to expressions
  - accept() breaks on new doc block, and get_doc() returns a QAPIDoc
- fix more documentation to fit the new parser
- use a master texi file that includes the generated file, instead of
  templated texi file
- texi fixes after Markus review
- only build and install html and man pages by default
- fix .gitignore

v2:
- change licence to be lgpl2+
- fix some comments & commit message
- add more code comments
- improve the doc parsing to treat only "Since" as a special case not
  requiring ":" (common notation in the doc)
- include some early schema doc fixes (to fix generated doc)
- include the squashed version of the doc move
- include the man page and installation build changes

Marc-André Lureau (17):
  qapi: improve device_add schema
  qga/schema: fix double-return in doc
  qga/schema: improve guest-set-vcpus Returns: section
  qapi: fix schema symbol sections
  qapi: fix missing symbol @prefix
  qapi: fix various symbols mismatch in documentation
  qapi: use one symbol per line
  qapi: add missing colon-ending for section name
  qapi: add some sections in docs
  qapi: improve TransactionAction doc
  docs: add master qapi texi files
  qapi: rename QAPIExprError/QAPILineError
  qapi: add qapi2texi script
  texi2pod: learn quotation, deftp and deftypefn
  (SQUASHED) move doc to schema
  docs: add qemu logo
  build-sys: add qapi doc generation targets

 Makefile                                     |   57 +-
 tests/Makefile.include                       |   17 +
 scripts/qapi.py                              |  361 ++-
 scripts/qapi2texi.py                         |  331 +++
 scripts/texi2pod.pl                          |   53 +-
 .gitignore                                   |   11 +-
 docs/qapi-code-gen.txt                       |   54 +-
 docs/qemu-ga-ref.texi                        |   82 +
 docs/qemu-qmp-ref.texi                       |   82 +
 docs/qemu_logo.pdf                           |  Bin 0 -> 9117 bytes
 docs/qmp-commands.txt                        | 3824 --------------------------
 docs/qmp-events.txt                          |  731 -----
 docs/qmp-intro.txt                           |    3 +-
 qapi-schema.json                             | 1662 +++++++++--
 qapi/block-core.json                         |  894 +++++-
 qapi/block.json                              |   82 +-
 qapi/common.json                             |   52 +-
 qapi/crypto.json                             |   41 +-
 qapi/event.json                              |  304 +-
 qapi/introspect.json                         |   28 +-
 qapi/rocker.json                             |   63 +-
 qapi/trace.json                              |   25 +-
 qga/qapi-schema.json                         |   64 +-
 tests/qapi-schema/doc-bad-args.err           |    1 +
 tests/qapi-schema/doc-bad-args.exit          |    1 +
 tests/qapi-schema/doc-bad-args.json          |    6 +
 tests/qapi-schema/doc-bad-args.out           |    0
 tests/qapi-schema/doc-bad-symbol.err         |    1 +
 tests/qapi-schema/doc-bad-symbol.exit        |    1 +
 tests/qapi-schema/doc-bad-symbol.json        |    4 +
 tests/qapi-schema/doc-bad-symbol.out         |    0
 tests/qapi-schema/doc-duplicated-arg.err     |    1 +
 tests/qapi-schema/doc-duplicated-arg.exit    |    1 +
 tests/qapi-schema/doc-duplicated-arg.json    |    5 +
 tests/qapi-schema/doc-duplicated-arg.out     |    0
 tests/qapi-schema/doc-duplicated-return.err  |    1 +
 tests/qapi-schema/doc-duplicated-return.exit |    1 +
 tests/qapi-schema/doc-duplicated-return.json |    6 +
 tests/qapi-schema/doc-duplicated-return.out  |    0
 tests/qapi-schema/doc-duplicated-since.err   |    1 +
 tests/qapi-schema/doc-duplicated-since.exit  |    1 +
 tests/qapi-schema/doc-duplicated-since.json  |    6 +
 tests/qapi-schema/doc-duplicated-since.out   |    0
 tests/qapi-schema/doc-empty-arg.err          |    1 +
 tests/qapi-schema/doc-empty-arg.exit         |    1 +
 tests/qapi-schema/doc-empty-arg.json         |    4 +
 tests/qapi-schema/doc-empty-arg.out          |    0
 tests/qapi-schema/doc-empty-section.err      |    1 +
 tests/qapi-schema/doc-empty-section.exit     |    1 +
 tests/qapi-schema/doc-empty-section.json     |    6 +
 tests/qapi-schema/doc-empty-section.out      |    0
 tests/qapi-schema/doc-empty-symbol.err       |    1 +
 tests/qapi-schema/doc-empty-symbol.exit      |    1 +
 tests/qapi-schema/doc-empty-symbol.json      |    3 +
 tests/qapi-schema/doc-empty-symbol.out       |    0
 tests/qapi-schema/doc-invalid-end.err        |    1 +
 tests/qapi-schema/doc-invalid-end.exit       |    1 +
 tests/qapi-schema/doc-invalid-end.json       |    3 +
 tests/qapi-schema/doc-invalid-end.out        |    0
 tests/qapi-schema/doc-invalid-end2.err       |    1 +
 tests/qapi-schema/doc-invalid-end2.exit      |    1 +
 tests/qapi-schema/doc-invalid-end2.json      |    3 +
 tests/qapi-schema/doc-invalid-end2.out       |    0
 tests/qapi-schema/doc-invalid-return.err     |    1 +
 tests/qapi-schema/doc-invalid-return.exit    |    1 +
 tests/qapi-schema/doc-invalid-return.json    |    5 +
 tests/qapi-schema/doc-invalid-return.out     |    0
 tests/qapi-schema/doc-invalid-section.err    |    1 +
 tests/qapi-schema/doc-invalid-section.exit   |    1 +
 tests/qapi-schema/doc-invalid-section.json   |    4 +
 tests/qapi-schema/doc-invalid-section.out    |    0
 tests/qapi-schema/doc-invalid-start.err      |    1 +
 tests/qapi-schema/doc-invalid-start.exit     |    1 +
 tests/qapi-schema/doc-invalid-start.json     |    3 +
 tests/qapi-schema/doc-invalid-start.out      |    0
 tests/qapi-schema/doc-missing-expr.err       |    1 +
 tests/qapi-schema/doc-missing-expr.exit      |    1 +
 tests/qapi-schema/doc-missing-expr.json      |    3 +
 tests/qapi-schema/doc-missing-expr.out       |    0
 tests/qapi-schema/doc-missing-space.err      |    1 +
 tests/qapi-schema/doc-missing-space.exit     |    1 +
 tests/qapi-schema/doc-missing-space.json     |    4 +
 tests/qapi-schema/doc-missing-space.out      |    0
 tests/qapi-schema/qapi-schema-test.json      |   58 +
 tests/qapi-schema/qapi-schema-test.out       |   49 +
 tests/qapi-schema/test-qapi.py               |   12 +
 86 files changed, 3922 insertions(+), 5113 deletions(-)
 create mode 100755 scripts/qapi2texi.py
 create mode 100644 docs/qemu-ga-ref.texi
 create mode 100644 docs/qemu-qmp-ref.texi
 create mode 100644 docs/qemu_logo.pdf
 delete mode 100644 docs/qmp-commands.txt
 delete mode 100644 docs/qmp-events.txt
 create mode 100644 tests/qapi-schema/doc-bad-args.err
 create mode 100644 tests/qapi-schema/doc-bad-args.exit
 create mode 100644 tests/qapi-schema/doc-bad-args.json
 create mode 100644 tests/qapi-schema/doc-bad-args.out
 create mode 100644 tests/qapi-schema/doc-bad-symbol.err
 create mode 100644 tests/qapi-schema/doc-bad-symbol.exit
 create mode 100644 tests/qapi-schema/doc-bad-symbol.json
 create mode 100644 tests/qapi-schema/doc-bad-symbol.out
 create mode 100644 tests/qapi-schema/doc-duplicated-arg.err
 create mode 100644 tests/qapi-schema/doc-duplicated-arg.exit
 create mode 100644 tests/qapi-schema/doc-duplicated-arg.json
 create mode 100644 tests/qapi-schema/doc-duplicated-arg.out
 create mode 100644 tests/qapi-schema/doc-duplicated-return.err
 create mode 100644 tests/qapi-schema/doc-duplicated-return.exit
 create mode 100644 tests/qapi-schema/doc-duplicated-return.json
 create mode 100644 tests/qapi-schema/doc-duplicated-return.out
 create mode 100644 tests/qapi-schema/doc-duplicated-since.err
 create mode 100644 tests/qapi-schema/doc-duplicated-since.exit
 create mode 100644 tests/qapi-schema/doc-duplicated-since.json
 create mode 100644 tests/qapi-schema/doc-duplicated-since.out
 create mode 100644 tests/qapi-schema/doc-empty-arg.err
 create mode 100644 tests/qapi-schema/doc-empty-arg.exit
 create mode 100644 tests/qapi-schema/doc-empty-arg.json
 create mode 100644 tests/qapi-schema/doc-empty-arg.out
 create mode 100644 tests/qapi-schema/doc-empty-section.err
 create mode 100644 tests/qapi-schema/doc-empty-section.exit
 create mode 100644 tests/qapi-schema/doc-empty-section.json
 create mode 100644 tests/qapi-schema/doc-empty-section.out
 create mode 100644 tests/qapi-schema/doc-empty-symbol.err
 create mode 100644 tests/qapi-schema/doc-empty-symbol.exit
 create mode 100644 tests/qapi-schema/doc-empty-symbol.json
 create mode 100644 tests/qapi-schema/doc-empty-symbol.out
 create mode 100644 tests/qapi-schema/doc-invalid-end.err
 create mode 100644 tests/qapi-schema/doc-invalid-end.exit
 create mode 100644 tests/qapi-schema/doc-invalid-end.json
 create mode 100644 tests/qapi-schema/doc-invalid-end.out
 create mode 100644 tests/qapi-schema/doc-invalid-end2.err
 create mode 100644 tests/qapi-schema/doc-invalid-end2.exit
 create mode 100644 tests/qapi-schema/doc-invalid-end2.json
 create mode 100644 tests/qapi-schema/doc-invalid-end2.out
 create mode 100644 tests/qapi-schema/doc-invalid-return.err
 create mode 100644 tests/qapi-schema/doc-invalid-return.exit
 create mode 100644 tests/qapi-schema/doc-invalid-return.json
 create mode 100644 tests/qapi-schema/doc-invalid-return.out
 create mode 100644 tests/qapi-schema/doc-invalid-section.err
 create mode 100644 tests/qapi-schema/doc-invalid-section.exit
 create mode 100644 tests/qapi-schema/doc-invalid-section.json
 create mode 100644 tests/qapi-schema/doc-invalid-section.out
 create mode 100644 tests/qapi-schema/doc-invalid-start.err
 create mode 100644 tests/qapi-schema/doc-invalid-start.exit
 create mode 100644 tests/qapi-schema/doc-invalid-start.json
 create mode 100644 tests/qapi-schema/doc-invalid-start.out
 create mode 100644 tests/qapi-schema/doc-missing-expr.err
 create mode 100644 tests/qapi-schema/doc-missing-expr.exit
 create mode 100644 tests/qapi-schema/doc-missing-expr.json
 create mode 100644 tests/qapi-schema/doc-missing-expr.out
 create mode 100644 tests/qapi-schema/doc-missing-space.err
 create mode 100644 tests/qapi-schema/doc-missing-space.exit
 create mode 100644 tests/qapi-schema/doc-missing-space.json
 create mode 100644 tests/qapi-schema/doc-missing-space.out

-- 
2.10.0

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

end of thread, other threads:[~2016-12-07 16:06 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-17 15:54 [Qemu-devel] [PATCH v5 00/17] qapi doc generation (whole version, squashed) Marc-André Lureau
2016-11-17 15:54 ` [Qemu-devel] [PATCH v5 01/17] qapi: improve device_add schema Marc-André Lureau
2016-11-17 17:38   ` Markus Armbruster
2016-11-17 19:49   ` Eric Blake
2016-11-17 15:54 ` [Qemu-devel] [PATCH v5 02/17] qga/schema: fix double-return in doc Marc-André Lureau
2016-11-17 17:38   ` Markus Armbruster
2016-11-17 15:54 ` [Qemu-devel] [PATCH v5 03/17] qga/schema: improve guest-set-vcpus Returns: section Marc-André Lureau
2016-11-17 17:39   ` Markus Armbruster
2016-11-18  8:49     ` Marc-André Lureau
2016-11-18 14:07       ` Markus Armbruster
2016-11-17 15:54 ` [Qemu-devel] [PATCH v5 04/17] qapi: fix schema symbol sections Marc-André Lureau
2016-11-17 17:39   ` Markus Armbruster
2016-11-17 15:54 ` [Qemu-devel] [PATCH v5 05/17] qapi: fix missing symbol @prefix Marc-André Lureau
2016-11-17 17:40   ` Markus Armbruster
2016-11-17 15:54 ` [Qemu-devel] [PATCH v5 06/17] qapi: fix various symbols mismatch in documentation Marc-André Lureau
2016-11-17 17:40   ` Markus Armbruster
2016-11-17 15:54 ` [Qemu-devel] [PATCH v5 07/17] qapi: use one symbol per line Marc-André Lureau
2016-11-17 17:40   ` Markus Armbruster
2016-11-17 15:54 ` [Qemu-devel] [PATCH v5 08/17] qapi: add missing colon-ending for section name Marc-André Lureau
2016-11-17 17:41   ` Markus Armbruster
2016-11-17 15:54 ` [Qemu-devel] [PATCH v5 09/17] qapi: add some sections in docs Marc-André Lureau
2016-11-17 17:43   ` Markus Armbruster
2016-11-30 15:38   ` Markus Armbruster
2016-11-30 16:07     ` Marc-André Lureau
2016-11-17 15:54 ` [Qemu-devel] [PATCH v5 10/17] qapi: improve TransactionAction doc Marc-André Lureau
2016-11-17 18:03   ` Markus Armbruster
2016-11-17 15:54 ` [Qemu-devel] [PATCH v5 11/17] docs: add master qapi texi files Marc-André Lureau
2016-11-18  9:09   ` Markus Armbruster
2016-11-17 15:54 ` [Qemu-devel] [PATCH v5 12/17] qapi: rename QAPIExprError/QAPILineError Marc-André Lureau
2016-11-18 10:17   ` Markus Armbruster
2016-11-18 10:31     ` Marc-André Lureau
2016-11-18 14:13       ` Markus Armbruster
2016-11-17 15:55 ` [Qemu-devel] [PATCH v5 13/17] qapi: add qapi2texi script Marc-André Lureau
2016-11-30 16:06   ` Markus Armbruster
2016-12-05 17:35     ` Marc-André Lureau
2016-12-06 11:50       ` Markus Armbruster
2016-12-06 13:07         ` Marc-André Lureau
2016-12-07 16:05           ` Markus Armbruster
2016-11-17 15:55 ` [Qemu-devel] [PATCH v5 14/17] texi2pod: learn quotation, deftp and deftypefn Marc-André Lureau
2016-11-17 15:55 ` [Qemu-devel] [PATCH v5 15/17] (SQUASHED) move doc to schema Marc-André Lureau
2016-11-17 15:55 ` [Qemu-devel] [PATCH v5 16/17] docs: add qemu logo Marc-André Lureau
2016-11-18 12:52   ` Markus Armbruster
2016-11-21 10:50     ` Marc-André Lureau
2016-11-21 12:07       ` Markus Armbruster
2016-11-17 15:55 ` [Qemu-devel] [PATCH v5 17/17] build-sys: add qapi doc generation targets Marc-André Lureau
2016-11-18 12:31   ` Markus Armbruster
2016-11-21 12:30     ` Marc-André Lureau
2016-12-05 16:53 ` [Qemu-devel] [PATCH v5 00/17] qapi doc generation (whole version, squashed) Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).