qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: Eduardo Habkost <eduardo@habkost.net>,
	"Daniel P . Berrange" <berrange@redhat.com>,
	Beraldo Leal <bleal@redhat.com>,
	Wainer dos Santos Moschetta <wainersm@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>, Cleber Rosa <crosa@redhat.com>,
	John Snow <jsnow@redhat.com>
Subject: [RFC qemu.qmp PATCH 07/24] Move PACKAGE.rst to README.rst and update
Date: Wed, 15 Dec 2021 16:06:17 -0500	[thread overview]
Message-ID: <20211215210634.3779791-8-jsnow@redhat.com> (raw)
In-Reply-To: <20211215210634.3779791-1-jsnow@redhat.com>

The README here will reflect both what is shown on GitLab and on the
PyPI landing page. Update it accordingly.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 INDEX.rst   |   2 +-
 MANIFEST.in |   2 +-
 PACKAGE.rst |  43 ------------------
 README.rst  | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 setup.cfg   |   2 +-
 5 files changed, 132 insertions(+), 46 deletions(-)
 delete mode 100644 PACKAGE.rst
 create mode 100644 README.rst

diff --git a/INDEX.rst b/INDEX.rst
index 45b0dbf..9c45740 100644
--- a/INDEX.rst
+++ b/INDEX.rst
@@ -54,10 +54,10 @@ Files in this directory
   Try ``make help`` to see available targets.
 - ``MANIFEST.in`` is read by python setuptools, it specifies additional files
   that should be included by a source distribution.
-- ``PACKAGE.rst`` is used as the README file that is visible on PyPI.org.
 - ``Pipfile`` is used by Pipenv to generate ``Pipfile.lock``.
 - ``Pipfile.lock`` is a set of pinned package dependencies that this package
   is tested under in our CI suite. It is used by ``make check-pipenv``.
+- ``README.rst`` is used as the README file that is visible on PyPI.org.
 - ``setup.cfg`` houses setuptools package configuration.
 - ``setup.py`` is the setuptools installer used by pip; See above.
 - ``VERSION`` contains the PEP-440 compliant version used to describe
diff --git a/MANIFEST.in b/MANIFEST.in
index 639caae..2a3fc58 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,2 +1,2 @@
 include VERSION
-include PACKAGE.rst
+include README.rst
diff --git a/PACKAGE.rst b/PACKAGE.rst
deleted file mode 100644
index b0b86cc..0000000
--- a/PACKAGE.rst
+++ /dev/null
@@ -1,43 +0,0 @@
-QEMU Python Tooling
-===================
-
-This package provides QEMU tooling used by the QEMU project to build,
-configure, and test QEMU. It is not a fully-fledged SDK and it is subject
-to change at any time.
-
-Usage
------
-
-The ``qemu.qmp`` subpackage provides a library for communicating with
-QMP servers. The ``qemu.machine`` subpackage offers rudimentary
-facilities for launching and managing QEMU processes. Refer to each
-package's documentation
-(``>>> help(qemu.qmp)``, ``>>> help(qemu.machine)``)
-for more information.
-
-Contributing
-------------
-
-This package is maintained by John Snow <jsnow@redhat.com> as part of
-the QEMU source tree. Contributions are welcome and follow the `QEMU
-patch submission process
-<https://wiki.qemu.org/Contribute/SubmitAPatch>`_, which involves
-sending patches to the QEMU development mailing list.
-
-John maintains a `GitLab staging branch
-<https://gitlab.com/jsnow/qemu/-/tree/python>`_, and there is an
-official `GitLab mirror <https://gitlab.com/qemu-project/qemu>`_.
-
-Please report bugs on the `QEMU issue tracker
-<https://gitlab.com/qemu-project/qemu/-/issues>`_ and tag ``@jsnow`` in
-the report.
-
-Optional packages necessary for running code quality analysis for this
-package can be installed with the optional dependency group "devel":
-``pip install qemu[devel]``.
-
-``make develop`` can be used to install this package in editable mode
-(to the current environment) *and* bring in testing dependencies in one
-command.
-
-``make check`` can be used to run the available tests.
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..bd4a301
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,129 @@
+QEMU Monitor Protocol (QMP) Library
+===================================
+
+This package provides an asyncio library used for communicating with
+QEMU Monitor Protocol ("QMP") servers. It requires Python 3.6+ and has
+no other dependencies.
+
+This library can be used for communicating with QEMU emulators or with
+the QEMU Guest Agent (QGA), QEMU Storage Daemon (QSD) or any other
+utility or application that speaks QMP.
+
+This library makes as little assumptions as possible about the actual
+version or what type of endpoint it will be communicating with;
+i.e. this library does not contain command definitions and does not seek
+to be an SDK or a replacement for tools like libvirt/virsh. It is
+"simply" the protocol (QMP) and not the vocabulary (QAPI). It is up to
+the programmer (you!) to know which commands and arguments you want to
+send.
+
+
+Who is this library for?
+------------------------
+
+It is firstly for developers of QEMU themselves; as the test
+infrastructure of QEMU itself needs a convenient and scriptable
+interface for testing QEMU. This library was split out of the QEMU
+source tree in order to share a reference version of a QMP library that
+was usable both within and outside of the QEMU source tree.
+
+Second, it's for those who are developing *for* QEMU by adding new
+architectures, devices, or functionality; as well as targeting those who
+are developing *with* QEMU, i.e. developers working on integrating QEMU
+features into other projects such as libvirt, kubevirt, kata
+containers, etc. Occasionally, using existing VM management stacks that
+integrate QEMU+kvm can make developing, testing, and debugging features
+difficult and more 'raw' access is required. This library is for you.
+
+Lastly, it's for power users who already use QEMU directly without the
+aid of libvirt because they require the raw control and power this
+affords them.
+
+
+Who is this library NOT for?
+----------------------------
+
+It is not designed for anyone looking for a turn-key solution for VM
+management. QEMU is a low-level component that resembles a swiss army
+knife with 5,000 attachments. This library does not manage that
+complexity at all and is largely "QEMU ignorant", and so it is not a
+replacement for projects like libvirt, virtual machine manager, boxes,
+etc.
+
+
+Installing
+----------
+
+This package can be installed with pip using ``pip3 install qemu.qmp``.
+
+
+Usage
+-----
+
+At its simplest, script-style usage looks like this::
+
+  from qemu.qmp import QMPClient
+
+  qmp = QMPClient('my-vm-nickname')
+  await qmp.connect('/path/to/qmp.sockfile')
+
+  res = await qmp.execute('query-status')
+  print(f"VM status: {res['status']}")
+
+  await qmp.disconnect()
+
+
+The above script will connect to the UNIX socket located at
+``/path/to/qmp.sockfile`` and query the VM's runstate and print it out
+to the terminal.
+
+For more complex usages, especially those that make full advantage of
+monitoring asynchronous events; refer to the online documentation or
+type ``help(qemu.qmp)`` in your Python terminal of choice.
+
+
+Contributing
+------------
+
+Contributions are quite welcome! Please file bugs using the `GitLab
+issue tracker <https://gitlab.com/jsnow/qemu.qmp/-/issues>`_. This
+project will accept GitLab merge requests, but due to the close
+association with the QEMU project, there are some additional guidelines:
+
+1. Please use the "Signed-off-by" tag in your commit messages. See
+   https://wiki.linuxfoundation.org/dco for more information on this
+   requirement.
+
+2. This repository won't squash merge requests into a single commit on
+   pull; each commit should seek to be self-contained (within reason).
+
+3. Owing to the above, each commit sent as part of a merge request
+   should not introduce any temporary regressions, even if fixed later
+   in the same merge request. This is done to preserve bisectability.
+
+4. Please associate every merge request with at least one GitLab
+   issue. This helps with generating Changelog text and staying
+   organized. Thank you 🙇
+
+
+Developing
+^^^^^^^^^^
+
+Optional packages necessary for running code quality analysis for this
+package can be installed with the optional dependency group "devel":
+``pip install qemu.qmp[devel]``.
+
+``make develop`` can be used to install this package in editable mode
+(to the current environment) *and* bring in testing dependencies in one
+command.
+
+``make check`` can be used to run the available tests. Consult ``make
+help`` for other targets and tests that make sense for different
+occasions. (Personally: I run ``make check-tox && make check-pipenv``
+locally before submitting to GitLab CI as my due diligence.)
+
+
+Changelog
+---------
+
+- No public release yet.
diff --git a/setup.cfg b/setup.cfg
index 0f14bda..f4a02d6 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -10,7 +10,7 @@ url = https://gitlab.com/jsnow/qemu.qmp
 download_url = https://gitlab.com/jsnow/qemu.qmp/-/packages
 # NOTE: Remember to update the commit message when changing these URLs.
 description = QEMU Monitor Protocol library.
-long_description = file:PACKAGE.rst
+long_description = file:README.rst
 long_description_content_type = text/x-rst
 classifiers =
     Development Status :: 3 - Alpha
-- 
2.31.1



  parent reply	other threads:[~2021-12-15 21:17 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 21:06 [RFC qemu.qmp PATCH 00/24] Python: Fork qemu.qmp Python lib into independent repo John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 01/24] Fork qemu.qmp from qemu.git John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 02/24] Update VERSION to 0.0.0a1 John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 03/24] Update maintainer metadata John Snow
2021-12-16 10:43   ` Daniel P. Berrangé
2021-12-16 16:34     ` John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 04/24] Update project description John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 05/24] Update project URLs John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 06/24] Move README.rst to INDEX.rst and update John Snow
2021-12-15 21:06 ` John Snow [this message]
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 08/24] Update Pipfile.lock John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 09/24] Remove sub-dependency pins from Pipfile John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 10/24] Add build and test container to gitlab CI configuration John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 11/24] Add package build step to GitLab CI John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 12/24] GitLab CI: Add check-dco script John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 13/24] GitLab CI: Add pipenv and tox tests John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 14/24] GitLab CI: Add avocado junit XML output to tests John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 15/24] GitLab CI: Publish python packages to GitLab package repo John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 16/24] Add setuptools_scm package versioning John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 17/24] Makefile: add build and publish targets John Snow
2021-12-16 10:48   ` Daniel P. Berrangé
2021-12-16 23:35     ` John Snow
2021-12-17 13:45       ` Daniel P. Berrangé
2022-01-11 19:48         ` John Snow
2022-01-12 10:07           ` Daniel P. Berrangé
2022-01-12 17:30             ` John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 18/24] add Sphinx documentation config stub John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 19/24] python: configure sphinx John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 20/24] python: adjust apidoc stubs John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 21/24] Fix doc cross-reference regressions John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 22/24] docs: add Makefile target John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 23/24] docs: add doc build to GitLab CI build step John Snow
2021-12-15 21:06 ` [RFC qemu.qmp PATCH 24/24] v0.0.1 John Snow
2021-12-16 10:41 ` [RFC qemu.qmp PATCH 00/24] Python: Fork qemu.qmp Python lib into independent repo Daniel P. Berrangé
2021-12-16 16:18   ` John Snow
2022-01-12 21:41   ` John Snow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211215210634.3779791-8-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=berrange@redhat.com \
    --cc=bleal@redhat.com \
    --cc=crosa@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).