Skip to main content

🥞 Manage ghstack pull requests 🥞

Project description

pullman

Pull request manager for PyTorch ghstack developers.

pullman lists your open ghstack pull requests, checks them out, prints git references for them, prints or opens URLs, and can download unit test failures from the CI.

You can specify pull requests with a pull request ID, or any commit ID which has ghstack information in it, or using string search.

None of this would be useful without a local cache: getting all the needed information from github takes one to two seconds per pull request the first time.

A quick tour

$ pullman
#131354: [dynamo] Fix constant propagation in builtins and UserClasses
#145150: [inductor] Simplify _inductor/utils.py slightly
#145636: Simplify functional composition in _aot_autograd/dispatch_and_compile_graph.py
#146845: Fix non-bitwise type annotations for Tensor operators (see #145838)
#148959: Move token linter code into tools/linter/adaptors/_linter/
#149958: [inductor] Add some typing to _inductor/ir.py
#149959: [inductor] Add more typing to _inductor/ir.py
#150767: [inductor] Clean typing in codegen/common.py and codecache.py

$ git log -1 --oneline $(pullman ref slightly)
c2f0f86cff2 (upstream/gh/rec/124/orig) [inductor] Simplify _inductor/utils.py slightly

$ pullman url -o functional  # Also opens #145636 in the browser
https://github.com/pytorch/pytorch/pull/145636

$ pullman errors constant
Writing unit-test-failures.sh for https://github.com/pytorch/pytorch/pull/131354
Loading jobs for 12893911506, segment=pull...
run_id='12893911506', len(jobs)=86, len(failed)=44
Loading jobs for 12893912723, segment=inductor...
run_id='12893912723', len(jobs)=38, len(failed)=27

# Wrote an executable shell file with commands to run the failed unit tests,
# or at least the ones the program can figure out...

$ pullman checkout --fetch --rewrite -r token
# Throws away the pullman cache, then calls
#
#    git fetch upstream
#    ghstack checkout https://github.com/pytorch/pytorch/pull/148959
#    git rebase upstream/viable/strict
#    git submodule update --init --recursive

Commands

You can use any prefix of any of these commands, like pullman l or pullman ch.

pullman list: list all your pull requests

$ pullman
$ pullman l
$ pullman list

#131354: [dynamo] Fix constant propagation in builtins and UserClasses
#144621: [inductor] Add tests for new docstring_linter features (fix #142496)
#144622: [inductor] Enable docstring_linter on _inductor
...

$ pullman list Add tests
$ pullman Add tests

#144621: [inductor] Add tests for new docstring_linter features (fix #142496)

pullman url|commit_url|hud_url|ref_url: print a URL, optionally open in a browser

$ pullman url  # Looks at ghstack information in HEAD
https://github.com/pytorch/pytorch/pull/148358

$ pullman url other-branch  # Looks at ghstack information in some other branch
https://github.com/pytorch/pytorch/pull/148358

# Use :/ to force a string search
$ pullman url :/other-branch
ERROR: Can't find any commits matching ':/other-branch'

$ pullman url linter  # searches for pull requests matching "linter"
https://github.com/pytorch/pytorch/pull/144621

$ pullman url -o  # Also opens the URL in the browser
https://github.com/pytorch/pytorch/pull/148358

$ pullman hud_url
https://hudtorch.org/pr/148358

pullman checkout: run ghstack checkout on a matching pull request

$ pullman checkout
# Calls `ghstack checkout` on the pull request that matches HEAD

$ pullman ref :/linter
upstream/gh/rec/137/orig

pullman ref: print ghstack branch git ref

$ pullman ref
upstream/gh/rec/136/orig

$ pullman ref linter
upstream/gh/rec/137/orig

pullman errors: download errors from a pull request

$ pullman errors
$ pull

# Werite a file with failed unit tests, like this:
#
# python test/inductor/test_torchinductor_dynamic_shapes.py ...
# PYTORCH_TEST_WITH_DYNAMO=1 python test/inductor/test_cpu_cpp_wrapper.py ...
....

How to install

Download the file pullman.py from here and put it in your path.

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

pullman-0.12.0.tar.gz (35.8 kB view details)

Uploaded Source

Built Distribution

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

pullman-0.12.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file pullman-0.12.0.tar.gz.

File metadata

  • Download URL: pullman-0.12.0.tar.gz
  • Upload date:
  • Size: 35.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pullman-0.12.0.tar.gz
Algorithm Hash digest
SHA256 8e5494cbc8d03ee76f780b0162447f02c430db73ec8556714b5b92000b32e266
MD5 53e2668c82b8c9f4df17ca686bf35a61
BLAKE2b-256 c7173cf526a6bd3a3f49196b04c82339fc09ef80aa9526871ff67f3cb5fde91e

See more details on using hashes here.

File details

Details for the file pullman-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: pullman-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pullman-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf427ec267674deee5e22d604f99e5fc22e78c8679219b2e9f6bd7b0e6357899
MD5 0df21a103ddc2377212c7c57f1be8b5e
BLAKE2b-256 eed701e0d3ad3c7b490388f76e51cf89344e09f0aeeb1b38be2c41483aab3576

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