pwclient is a VCS-agnostic tool for interacting with Patchwork, the web-based patch tracking system.
The easiest way to install pwclient and its dependencies is using pip
. To
do so, run:
$ pip install pwclient
You can also install pwclient manually. First, install the required dependencies. On Fedora, run:
$ sudo dnf install python-pbr
On Ubuntu, run:
$ sudo apt-get install python-pbr
Once dependencies are installed, clone this repo and run setup.py
:
(Preferred method for SIGNAL)
$ git clone https://github.com/getpatchwork/pwclient
$ cd pwclient
$ pip install --user . # or 'sudo python setup.py install'
To use pwclient, you will need a .pwclientrc
file, located in your home
directory ($HOME
or ~
). Patchwork itself provides sample
.pwclientrc
files for projects at /project/{projectName}/pwclientrc/
.
For example, here is the .pwclientrc
file for Patchwork itself.
```toml # Sample .pwclientrc file for the patchwork project, # running on patchwork.kernel.org. THIS IS USED in SIGNAL. # # Just append this file to your existing ~/.pwclientrc # If you do not already have a ~/.pwclientrc, then copy this file to # ~/.pwclientrc, and uncomment the following two lines: [options] default=linux-block
[linux-block] url = https://patchwork.kernel.org/xmlrpc/
[linux-omap] url = https://patchwork.kernel.org/xmlrpc/ ```
In this example, I used one of the submitters fetched by the mailing-list-scrapper: Alex Shi. The goal was to see if that user had any patches in patchwork.kernel.org. If found, then it means we can use this tool to make the connection between mailing list's emails and patches. This will be useful for SIGNAL.
`shell
› pwclient list --submitter "Alex Shi" --in-depth --format csv > all_patches_by_alex.csv
› pwclient list --submitter "Alex Shi" --state Accepted --in-depth --format csv > all_accepted_patches_by_alex.csv
`
If you're interested in contributing to pwclient, first clone the repo:
$ git clone https://github.com/getpatchwork/pwclient
$ cd pwclient
Create a virtualenv, then install the package in editable mode:
$ virtualenv .venv
$ source .venv/bin/activate
$ pip install --editable .
Documentation is available on Read the Docs