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 run setup.py:

$ git clone https://github.com/getpatchwork/git-pw
$ cd git-pw
$ pip install --user .  # or 'sudo python setup.py install'

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.2

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.0.x, you should use API version 1.2.

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.2.0.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_pw-2.2.0-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file git-pw-2.2.0.tar.gz.

File metadata

  • Download URL: git-pw-2.2.0.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for git-pw-2.2.0.tar.gz
Algorithm Hash digest
SHA256 2c0be42c9b073acf7377836826453e1f8342458c91d1de2f0d6feeb758b4e69c
MD5 35cee2695eb7368c7952c75c87f216fb
BLAKE2b-256 66e12945882feafb73963fdc141048ab5d8433d7497e9e24475e18d0079be12e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: git_pw-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for git_pw-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eab03a98a0f1632863b19fa23cafbd3e37222a51cf618fd53d49668c656c808b
MD5 bd7c6d88c9897af60e8338e2f8a570a8
BLAKE2b-256 492ea0a672797fe85c3eea020904b8a792c1b3c967a5a6c752d5db721a903402

See more details on using hashes here.

Supported by

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