All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Kashyap Chamarthy <kchamart@redhat.com>
Cc: Daniel Berrange <berrange@redhat.com>,
	Beraldo Leal <bleal@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>,
	Cleber Rosa <crosa@redhat.com>, Eric Blake <eblake@redhat.com>
Subject: Re: [qemu.qmp PATCH 09/13] [FIXME] move PACKAGE.rst to README.rst and update
Date: Fri, 1 Apr 2022 13:31:55 -0400	[thread overview]
Message-ID: <CAFn=p-YLJuHRjbQn8KmrAX2mm3-cwQjs6ge_BUktYNTiEg0Upw@mail.gmail.com> (raw)
In-Reply-To: <Ykcq5LSltMThruoM@paraplu>

[-- Attachment #1: Type: text/plain, Size: 5319 bytes --]

On Fri, Apr 1, 2022, 12:40 PM Kashyap Chamarthy <kchamart@redhat.com> wrote:

> On Wed, Mar 30, 2022 at 02:24:20PM -0400, John Snow wrote:
> > The README here will reflect both what is shown on GitLab and on the
> > PyPI landing page. Update it accordingly, and freshen it up.
> >
> > FIXME: Update URLs when pushing to the production repo.
> >
> > Suggested-by: Kashyap Chamarthy <kchamart@redhat.com>
> > Signed-off-by: John Snow <jsnow@redhat.com>
> > ---
>
> Hi,
>
> This version reads good to me. :)
>
> [...]
>
> > +
> > +Who isn't this library 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 particularly
> > +impressive Swiss Army knife. This library does not manage that
> > +complexity and is largely "VM-ignorant". It's not a replacement for
> > +projects like `libvirt <https://libvirt.org/>`_, `virt-manager
> > +<https://virt-manager.org/>`_, `GNOME Boxes
> > +<https://wiki.gnome.org/Apps/Boxes>`_, etc.
> > +
> > +
> > +Installing
> > +----------
> > +
> > +This package can be installed from PyPI with pip: ``> pip3 install
> > +qemu.qmp``.
> >
> > +
> > +Usage
> > +-----
> > +
> > +Launch QEMU with a monitor, e.g.::
> > +
> > +  > qemu-system-x86_64 -qmp unix:qmp.sock,server=on,wait=off
> > +
> > +
> > +Then, at its simplest, script-style usage looks like this::
> > +
> > +  import asyncio
> > +  from qemu.qmp import QMPClient
> > +
> > +  async def main():
> > +      qmp = QMPClient('my-vm-nickname')
> > +      await qmp.connect('qmp.sock')
> > +
> > +      res = await qmp.execute('query-status')
> > +      print(f"VM status: {res['status']}")
> > +
> > +      await qmp.disconnect()
> > +
> > +  asyncio.run(main())
>
> Tested the exmaple; this works!
>
> > +The above script will connect to the UNIX socket located at
> > +``qmp.sock``, query the VM's runstate, then print it out
> > +to the terminal::
> > +
> > +  > python3 example.py
> > +  VM status: running
> > +
> > +
> > +For more complex usages, especially those that make full advantage of
> > +monitoring asynchronous events, refer to the `online documentation
> > +<https://jsnow.gitlab.io/qemu.qmp/>`_ or type ``import qemu.qmp;
> > +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
> > +   <https://gitlab.com/jsnow/qemu.qmp/-/issues>`_. This helps with
> > +   generating Changelog text and staying organized. Thank you 🙇
>
> /me didn't miss the Japanese bow.
>
> > +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.
> > +
> > +Before submitting a pull request, consider running ``make check-tox &&
> > +make check-pipenv`` locally to spot any issues that will cause the CI to
> > +fail. These checks use their own virtual environments and won't pollute
> > +your working space.
>
> Nit: Consider hyper-linking "virtual environments" to:
> https://docs.python.org/3/library/venv.html#module-venv
>
> (I realize, within context people will recognize the term "virtual
> environment" is not a virtual guest environment, but a Python venv.  I
> have a mild preference for being explicit here.)
>

OK. it's tough: there's a dual audience in mind here. People who are
familiar with Python development and QEMU devs who are not!

A link would suffice, but how to install, develop, and use python packages
can get a little complex. Longer than a paragraph, anyway.

Hard to know which complexities to omit and which to front-load.

¯\_(ツ)_/¯


> FWIW:
>
> Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com>


Thanks for your review prior to sending, and thanks for your re-review here
🙂


>
> [...]
>
>
> --
> /kashyap
>
>

[-- Attachment #2: Type: text/html, Size: 8015 bytes --]

  reply	other threads:[~2022-04-01 17:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30 18:24 [qemu.qmp PATCH 00/13] python: fork qemu.qmp python lib into independent repo John Snow
2022-03-30 18:24 ` [qemu.qmp PATCH 01/13] pylint hotfix John Snow
2022-03-30 18:24 ` [qemu.qmp PATCH 02/13] fork qemu.qmp from qemu.git John Snow
2022-04-01 17:05   ` Kashyap Chamarthy
2022-04-04 18:54     ` John Snow
2022-04-04 18:56       ` John Snow
2022-04-05  8:50         ` Kashyap Chamarthy
2022-04-05 15:28           ` John Snow
2022-03-30 18:24 ` [qemu.qmp PATCH 03/13] update VERSION to 0.0.0a1 John Snow
2022-03-30 18:24 ` [qemu.qmp PATCH 04/13] update maintainer metadata John Snow
2022-03-30 18:24 ` [qemu.qmp PATCH 05/13] update project description John Snow
2022-04-01 16:52   ` Beraldo Leal
2022-03-30 18:24 ` [qemu.qmp PATCH 06/13] [FIXME] update project URLs John Snow
2022-03-30 18:24 ` [qemu.qmp PATCH 07/13] add a couple new trove classifiers John Snow
2022-04-01 16:54   ` Beraldo Leal
2022-03-30 18:24 ` [qemu.qmp PATCH 08/13] move README.rst to FILES.rst and update John Snow
2022-03-30 18:24 ` [qemu.qmp PATCH 09/13] [FIXME] move PACKAGE.rst to README.rst " John Snow
2022-04-01 16:40   ` Kashyap Chamarthy
2022-04-01 17:31     ` John Snow [this message]
2022-03-30 18:24 ` [qemu.qmp PATCH 10/13] docs: add versioning policy to README John Snow
2022-04-05  9:16   ` Damien Hedde
2022-04-05 15:47     ` John Snow
2022-03-30 18:24 ` [qemu.qmp PATCH 11/13] add LGPLv2+ and GPLv2 LICENSE files John Snow
2022-03-30 18:24 ` [qemu.qmp PATCH 12/13] update Pipfile John Snow
2022-03-30 18:24 ` [qemu.qmp PATCH 13/13] remove sub-dependency pins from Pipfile 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='CAFn=p-YLJuHRjbQn8KmrAX2mm3-cwQjs6ge_BUktYNTiEg0Upw@mail.gmail.com' \
    --to=jsnow@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=bleal@redhat.com \
    --cc=crosa@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kchamart@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.