Skip to main content

Git-Patchwork integration tool

Project description

PyPi Status Documentation Status Build Status

git-pw is a tool for integrating Git with Patchwork, the web-based patch tracking system.

Installation

The easiest way to install git-pw and its dependencies is using pip. To do so, run:

$ pip install git-pw

You can also install git-pw manually. First, install the required dependencies. On Fedora, run:

$ sudo dnf install python3-requests python3-click python3-pbr \
    python3-arrow python3-tabulate python3-yaml

On Ubuntu, run:

$ sudo apt-get install python3-requests python3-click python3-pbr \
    python3-arrow python3-tabulate python3-yaml

Once dependencies are installed, clone this repo and install with pip:

$ git clone https://github.com/getpatchwork/git-pw
$ cd git-pw
$ pip install --user .

Getting Started

To begin, you’ll need to configure Git settings appropriately. The following settings are required:

pw.server

The URL for the Patchwork instance’s API. This should include the API version:

https://patchwork.ozlabs.org/api/1.3

You can discover the API version supported by your instance by comparing the server version, found at /about, with the API versions provided in the documentation. For example, if your server is running Patchwork version 3.2.x, you should use API version 1.3.

pw.project

The project name or list-id. This will appear in the URL when using the web UI:

https://patchwork.ozlabs.org/project/{project_name}/list/

For read-write access, you also need authentication - you can use either API tokens or a username/password combination:

pw.token

The API token for your Patchwork account.

pw.username

The username for your Patchwork account.

pw.password

The password for your Patchwork account.

If only read-only access is desired, credentials can be omitted.

The following settings are optional and may need to be set depending on your Patchwork instance’s configuration:

pw.states

The states that can be applied to a patch using the git pw patch update command. Should be provided in slug form (changes-requested instead of Changes Requested). Only required if your Patchwork instance uses non-default states.

You can set these settings using the git config command. This should be done in the repo in which you intend to apply patches. For example, to configure the Patchwork project, run:

$ git config pw.server 'https://patchwork.ozlabs.org/api/1.1/'
$ git config pw.project 'patchwork'

Development

If you’re interested in contributing to git-pw, first clone the repo:

$ git clone https://github.com/getpatchwork/git-pw
$ cd git-pw

Create a virtualenv, then install the package in editable mode:

$ virtualenv .venv
$ source .venv/bin/activate
$ pip install --editable .

Documentation

Documentation is available on Read the Docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git_pw-2.7.0.tar.gz (45.5 kB view details)

Uploaded Source

Built Distribution

git_pw-2.7.0-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file git_pw-2.7.0.tar.gz.

File metadata

  • Download URL: git_pw-2.7.0.tar.gz
  • Upload date:
  • Size: 45.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for git_pw-2.7.0.tar.gz
Algorithm Hash digest
SHA256 99cb0b4a603386127c8205358d9780428a0468f8b1cb73ace804a5a466a28ef4
MD5 6a13a425840a0c21e32bc8e049c99cca
BLAKE2b-256 ed646832fdddf93d5193d61478bd6171447561e18b75d9f64f25e7af67120429

See more details on using hashes here.

File details

Details for the file git_pw-2.7.0-py3-none-any.whl.

File metadata

  • Download URL: git_pw-2.7.0-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for git_pw-2.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 892e2211fbbc10a0dd4d3f795fab80e3792a7b2d436967817af136c4863bb7b3
MD5 59ad56bbde2b896610469e342b5ea3a3
BLAKE2b-256 dd0453030cfba916477128d59df9a62051cb8079293ad1dc150b3540bf00eddb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page