Skip to content

python: add QAPI and qapidoc et al to python tests

John Snow qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 of 6 patches 6 repliesIn review
  2. v46 patches 2 repliesSuperseded
  3. v36 patches 1 replySuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v25 patches1 replySuperseded
v15 patches15 repliesSuperseded

Changes in v5 from the cover letter

- Fixed test failure on GitLab CI. As far as I can tell, the problem stems from Sphinx requiring a version of packaging that is old enough that some newer versions of setuptools break when it is installed. Fix this by pinning setuptools to an older version, for now. Note that this only applies to the "minreqs" test and not general installation.

5 of 6 patches are in this archive. The cover letter announces 6.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
2/6docs/qapidoc: linting fixesdocs/sphinx/qapi_domain.py docs/sphinx/qapidoc.py+17 -130 replies
3/6python: update missing dependencies from minreqspython/tests/minreqs.txt+4 -00 replies
4/6python: add qapi static analysis testspython/setup.cfg python/tests/minreqs.txt python/tests/qapi-flake8.sh +4 more+55 -04 replies
5/6python: Drop redundant warn_unused_configs = Truepython/setup.cfg+0 -10 replies
6/6qapi: delete un-needed python static analysis configsscripts/qapi/.flake8 scripts/qapi/.isort.cfg scripts/qapi/mypy.ini+0 -140 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMarkus Armbruster
SeriesR-b
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/6] python: add QAPI and qapidoc et al to python tests

Hiya, this series turns on automated linting for scripts/qapi, docs/sphinx/qapidoc.py and docs/sphinx/qapi_domain.py.

This includes flake8/isort/pylint/mypy for scripts/qapi, but omits mypy from the Sphinx plugins owing to my inability to strictly type the extensions given the wide versions of Sphinx we actually support.

[Maybe this will change soon, but it's not true just yet.]

Though I have been using black in my own development, I have not yet enabled it anywhere automatically. Maybe soon.

V5:
- Fixed test failure on GitLab CI. As far as I can tell, the problem stems from Sphinx requiring a version of packaging that is old enough that some newer versions of setuptools break when it is installed. Fix this by pinning setuptools to an older version, for now. Note that this only applies to the "minreqs" test and not general installation.

(This change applies only to patch 4/6.)

(Note that I am still carrying a patch to bump the Sphinx version, but I wanted to get this series out of the way first... I'll revisit this pinning again shortly.)

V4:
- Rebase and resend. Pull Request imminent.

V3:
- Folded in Markus's commit to clean up setup.cfg.

V2:
- Mostly commit message updates based on Markus's's's review.

John Snow (5):
qapi: Add some pylint ignores
docs/qapidoc: linting fixes
python: update missing dependencies from minreqs
python: add qapi static analysis tests
qapi: delete un-needed python static analysis configs

Markus Armbruster (1):
python: Drop redundant warn_unused_configs = True

 docs/sphinx/qapi_domain.py  | 25 ++++++++++++++-----------
 docs/sphinx/qapidoc.py      |  5 +++--
 python/setup.cfg            |  2 +-
 python/tests/minreqs.txt    | 31 +++++++++++++++++++++++++++++++
 python/tests/qapi-flake8.sh |  6 ++++++
 python/tests/qapi-isort.sh  |  8 ++++++++
 python/tests/qapi-mypy.sh   |  4 ++++
 python/tests/qapi-pylint.sh |  8 ++++++++
 scripts/qapi/.flake8        |  3 ---
 scripts/qapi/.isort.cfg     |  7 -------
 scripts/qapi/backend.py     |  2 ++
 scripts/qapi/mypy.ini       |  4 ----
 scripts/qapi/pylintrc       |  1 +
 13 files changed, 78 insertions(+), 28 deletions(-)
 create mode 100755 python/tests/qapi-flake8.sh
 create mode 100755 python/tests/qapi-isort.sh
 create mode 100755 python/tests/qapi-mypy.sh
 create mode 100755 python/tests/qapi-pylint.sh
 delete mode 100644 scripts/qapi/.flake8
 delete mode 100644 scripts/qapi/.isort.cfg
 delete mode 100644 scripts/qapi/mypy.ini
Signature · 1 line
2.48.1