[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 00/15] python: absorb scripts/qmp/qom-* tooling
From: |
John Snow |
Subject: |
[PATCH 00/15] python: absorb scripts/qmp/qom-* tooling |
Date: |
Wed, 21 Oct 2020 14:51:53 -0400 |
Based-on: <20201020193555.1493936-1-jsnow@redhat.com>
[PATCH v3 00/15] python: create installable package
This is a bit of a demonstration of the direction I want to take our
python tooling, and how it *might* work.
By moving items from ./scripts/*.py over to ./python/qemu/* somewhere,
they can be checked with the same isort/flake8/pylint/mypy tooling as
everything else. This will help prevent regressions.
I would like to, over time, move all applicable python scripts from
./scripts to ./python. That will be a long, gradual stream of changes,
but the more we do it, the better off we'll be for these tools.
Reviewer notes:
- I just rewrote qom-xxx entirely, though it is based on the original
scripts. Doing it brick by brick was too slow.
- I added a symlink to the qom-fuse file under the python/ tree so I
could check it with the usual linters. This causes some future
knowledge to bleed through in a few places; notably I update the
python setup.cfg several times in the middle of the series where it
doesn't seem like that should have an effect.
- qom-fuse disappears from the tree for a single commit, but that
preserves git-blame history. Best I could do.
John Snow (15):
python/qmp: Add qom script rewrites
python/qmp: add qom script entry points
scripts/qmp: redirect qom-xxx scripts to python/qemu/qmp/
scripts/qom-fuse: apply isort rules
scripts/qom-fuse: apply flake8 rules
python: Add 'fh' to known-good variable names
scripts/qom-fuse: Apply pylint rules
scripts/qom-fuse: Add docstrings
scripts/qom-fuse: Convert to QOMCommand
scripts/qom-fuse: use QOMCommand.qom_list()
scripts/qom-fuse: ensure QOMFuse.read always returns bytes
scripts/qom-fuse: add static type hints
scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py
scripts/qom-fuse: add redirection shim to python/qemu/qmp/qom-fuse.py
python: add fuse command to 'qom' tools
python/qemu/qmp/qom.py | 217 ++++++++++++++++++++++++++++++++++
python/qemu/qmp/qom_common.py | 153 ++++++++++++++++++++++++
python/qemu/qmp/qom_fuse.py | 207 ++++++++++++++++++++++++++++++++
python/setup.cfg | 24 +++-
scripts/qmp/qom-fuse | 144 +---------------------
scripts/qmp/qom-get | 66 +----------
scripts/qmp/qom-list | 63 +---------
scripts/qmp/qom-set | 63 +---------
scripts/qmp/qom-tree | 74 +-----------
9 files changed, 618 insertions(+), 393 deletions(-)
create mode 100644 python/qemu/qmp/qom.py
create mode 100644 python/qemu/qmp/qom_common.py
create mode 100644 python/qemu/qmp/qom_fuse.py
--
2.26.2
- [PATCH 00/15] python: absorb scripts/qmp/qom-* tooling,
John Snow <=
- [PATCH 03/15] scripts/qmp: redirect qom-xxx scripts to python/qemu/qmp/, John Snow, 2020/10/21
- [PATCH 10/15] scripts/qom-fuse: use QOMCommand.qom_list(), John Snow, 2020/10/21
- [PATCH 13/15] scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py, John Snow, 2020/10/21
- [PATCH 08/15] scripts/qom-fuse: Add docstrings, John Snow, 2020/10/21
- [PATCH 07/15] scripts/qom-fuse: Apply pylint rules, John Snow, 2020/10/21
- [PATCH 12/15] scripts/qom-fuse: add static type hints, John Snow, 2020/10/21
- [PATCH 11/15] scripts/qom-fuse: ensure QOMFuse.read always returns bytes, John Snow, 2020/10/21