Skip to main content

git-pw

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

Metadata

Release files for git-pw 2.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-pw 2.9.0
File Size Uploaded Provenance
git_pw-2.9.0.tar.gz 27.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for git-pw 2.9.0
File Interpreter ABI Platform
git_pw-2.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.0 kB

Release files / git_pw-2.9.0.tar.gz

Download URL git_pw-2.9.0.tar.gz
Size 27.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6d7f5c9aaf57cdd9bbb7f8de76083d62a7775d36052ae81c6215d578e6c1792c
BLAKE2b-256 checksum
How to use checksums
603b220caf65ba254f378122d3eaf0534cad92659f5128e297050e6c0a29db84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Release files / git_pw-2.9.0-py3-none-any.whl

Download URL git_pw-2.9.0-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a66a5fe1e1da0f7e64a546516cfc9e09c3b542beb0a3f9798d42c47ed4c3002
BLAKE2b-256 checksum
How to use checksums
4ba973d8398ac790aaf62c8f21f6fd20c59332120fbe6f2a866daa1eda6140cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Security for git-pw 2.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

2.9.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page